1 |
;;; dired.el --- directory-browsing commands |
;;; dired.el --- directory-browsing commands |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 1997, 2000, 2001 |
;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 1997, 2000, 2001, 2003 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> |
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> |
59 |
:type 'string |
:type 'string |
60 |
:group 'dired) |
:group 'dired) |
61 |
|
|
62 |
; Don't use absolute paths as /bin should be in any PATH and people |
; Don't use absolute file names as /bin should be in any PATH and people |
63 |
; may prefer /usr/local/gnu/bin or whatever. However, chown is |
; may prefer /usr/local/gnu/bin or whatever. However, chown is |
64 |
; usually not in PATH. |
; usually not in PATH. |
65 |
|
|
1517 |
(replace-match newtext t literal string)))) |
(replace-match newtext t literal string)))) |
1518 |
|
|
1519 |
(defun dired-make-absolute (file &optional dir) |
(defun dired-make-absolute (file &optional dir) |
1520 |
;;"Convert FILE (a pathname relative to DIR) to an absolute pathname." |
;;"Convert FILE (a file name relative to DIR) to an absolute file name." |
1521 |
;; We can't always use expand-file-name as this would get rid of `.' |
;; We can't always use expand-file-name as this would get rid of `.' |
1522 |
;; or expand in / instead default-directory if DIR=="". |
;; or expand in / instead default-directory if DIR=="". |
1523 |
;; This should be good enough for ange-ftp, but might easily be |
;; This should be good enough for ange-ftp, but might easily be |
1679 |
(defun dired-copy-filename-as-kill (&optional arg) |
(defun dired-copy-filename-as-kill (&optional arg) |
1680 |
"Copy names of marked (or next ARG) files into the kill ring. |
"Copy names of marked (or next ARG) files into the kill ring. |
1681 |
The names are separated by a space. |
The names are separated by a space. |
1682 |
With a zero prefix arg, use the complete pathname of each marked file. |
With a zero prefix arg, use the absolute file name of each marked file. |
1683 |
With \\[universal-argument], use the relative pathname of each marked file. |
With \\[universal-argument], use the file name sans directory of each marked file. |
1684 |
|
|
1685 |
If on a subdir headerline, use subdirname instead; prefix arg is ignored |
If on a subdir headerline, use subdirname instead; prefix arg is ignored |
1686 |
in this case. |
in this case. |
1799 |
(string-match (concat "^" (regexp-quote dir)) file))) |
(string-match (concat "^" (regexp-quote dir)) file))) |
1800 |
|
|
1801 |
(defun dired-normalize-subdir (dir) |
(defun dired-normalize-subdir (dir) |
1802 |
;; Prepend default-directory to DIR if relative path name. |
;; Prepend default-directory to DIR if relative file name. |
1803 |
;; dired-get-filename must be able to make a valid filename from a |
;; dired-get-filename must be able to make a valid file name from a |
1804 |
;; file and its directory DIR. |
;; file and its directory DIR. |
1805 |
(file-name-as-directory |
(file-name-as-directory |
1806 |
(if (file-name-absolute-p dir) |
(if (file-name-absolute-p dir) |
1944 |
(defun dired-goto-file (file) |
(defun dired-goto-file (file) |
1945 |
"Go to file line of FILE in this dired buffer." |
"Go to file line of FILE in this dired buffer." |
1946 |
;; Return value of point on success, else nil. |
;; Return value of point on success, else nil. |
1947 |
;; FILE must be an absolute pathname. |
;; FILE must be an absolute file name. |
1948 |
;; Loses if FILE contains control chars like "\007" for which ls |
;; Loses if FILE contains control chars like "\007" for which ls |
1949 |
;; either inserts "?" or "\\007" into the buffer, so we won't find |
;; either inserts "?" or "\\007" into the buffer, so we won't find |
1950 |
;; it in the buffer. |
;; it in the buffer. |
2992 |
what to do with it. For directions, type \\[help-command] at that time. |
what to do with it. For directions, type \\[help-command] at that time. |
2993 |
NEWNAME may contain \\=\\<n> or \\& as in `query-replace-regexp'. |
NEWNAME may contain \\=\\<n> or \\& as in `query-replace-regexp'. |
2994 |
REGEXP defaults to the last regexp used. |
REGEXP defaults to the last regexp used. |
2995 |
With a zero prefix arg, renaming by regexp affects the complete |
With a zero prefix arg, renaming by regexp affects the full file name; |
2996 |
pathname - usually only the non-directory part of file names is used |
usually only the non-directory part of file names is used and changed." |
|
and changed." |
|
2997 |
t) |
t) |
2998 |
|
|
2999 |
(autoload 'dired-do-copy-regexp "dired-aux" |
(autoload 'dired-do-copy-regexp "dired-aux" |