diff options
| author | Michael Albinus | 2010-02-04 17:25:57 +0100 |
|---|---|---|
| committer | Michael Albinus | 2010-02-04 17:25:57 +0100 |
| commit | d5b3979c8a0129ab007179a8d6e554dfbcfaa24d (patch) | |
| tree | 29a4f60bb891e4e4f8f5136b1215f9229f446a26 | |
| parent | 6c594ec63d2a81aabd59883d0ae1baffa77b2dd0 (diff) | |
| download | emacs-d5b3979c8a0129ab007179a8d6e554dfbcfaa24d.tar.gz emacs-d5b3979c8a0129ab007179a8d6e554dfbcfaa24d.zip | |
* dired.el (dired-revert): If DIRED-DIRECTORY is a cons cell, call
`dired-uncache' for every elemnt which is an absolute file name.
* net/tramp.el (tramp-handle-dired-uncache): When DIR is not a
directory, handle its directory component.
(tramp-handle-file-remote-p): Let-bind `tramp-verbose' to 3; this
function is called permanently and creates noise, otherwise.
* net/tramp-imap.el (tramp-imap-handle-insert-directory):
* net/tramp-smb.el (tramp-smb-handle-insert-directory):
Handle the case, FILENAME is not in `default-directory'. (Bug#5478)
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/dired.el | 8 | ||||
| -rw-r--r-- | lisp/net/tramp-imap.el | 14 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 11 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 35 |
5 files changed, 56 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de3446fd524..baf62e0b013 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2010-02-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * dired.el (dired-revert): If DIRED-DIRECTORY is a cons cell, call | ||
| 4 | `dired-uncache' for every elemnt which is an absolute file name. | ||
| 5 | |||
| 6 | * net/tramp.el (tramp-handle-dired-uncache): When DIR is not a | ||
| 7 | directory, handle its directory component. | ||
| 8 | (tramp-handle-file-remote-p): Let-bind `tramp-verbose' to 3; this | ||
| 9 | function is called permanently and creates noise, otherwise. | ||
| 10 | |||
| 11 | * net/tramp-imap.el (tramp-imap-handle-insert-directory): | ||
| 12 | * net/tramp-smb.el (tramp-smb-handle-insert-directory): | ||
| 13 | Handle the case, FILENAME is not in `default-directory'. (Bug#5478) | ||
| 14 | |||
| 1 | 2010-02-04 David Burger <dburger@google.com> (tiny change) | 15 | 2010-02-04 David Burger <dburger@google.com> (tiny change) |
| 2 | 16 | ||
| 3 | * macros.el (apply-macro-to-region-lines): | 17 | * macros.el (apply-macro-to-region-lines): |
diff --git a/lisp/dired.el b/lisp/dired.el index 1fc90c308b1..c3d1435401e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1144,8 +1144,12 @@ Preserves old cursor, marks/flags, hidden-p." | |||
| 1144 | (setq mark-alist;; only after dired-remember-hidden since this unhides: | 1144 | (setq mark-alist;; only after dired-remember-hidden since this unhides: |
| 1145 | (dired-remember-marks (point-min) (point-max))) | 1145 | (dired-remember-marks (point-min) (point-max))) |
| 1146 | ;; treat top level dir extra (it may contain wildcards) | 1146 | ;; treat top level dir extra (it may contain wildcards) |
| 1147 | (dired-uncache | 1147 | (if (not (consp dired-directory)) |
| 1148 | (if (consp dired-directory) (car dired-directory) dired-directory)) | 1148 | (dired-uncache dired-directory) |
| 1149 | (dired-uncache (car dired-directory)) | ||
| 1150 | (dolist (dir (cdr dired-directory)) | ||
| 1151 | (if (file-name-absolute-p dir) | ||
| 1152 | (dired-uncache dir)))) | ||
| 1149 | ;; Run dired-after-readin-hook just once, below. | 1153 | ;; Run dired-after-readin-hook just once, below. |
| 1150 | (let ((dired-after-readin-hook nil)) | 1154 | (let ((dired-after-readin-hook nil)) |
| 1151 | (dired-readin) | 1155 | (dired-readin) |
diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el index 6f20d527713..60c19c1a43c 100644 --- a/lisp/net/tramp-imap.el +++ b/lisp/net/tramp-imap.el | |||
| @@ -472,14 +472,18 @@ SIZE MODE WEIRD INODE DEVICE)." | |||
| 472 | (nth 6 x)))) ; date | 472 | (nth 6 x)))) ; date |
| 473 | ;; For the file name, we set the `dired-filename' | 473 | ;; For the file name, we set the `dired-filename' |
| 474 | ;; property. This allows to handle file names with | 474 | ;; property. This allows to handle file names with |
| 475 | ;; leading or trailing spaces as well. | 475 | ;; leading or trailing spaces as well. The inserted name |
| 476 | ;; could be from somewhere else, so we use the relative | ||
| 477 | ;; file name of `default-directory'. | ||
| 476 | (let ((pos (point))) | 478 | (let ((pos (point))) |
| 477 | (insert (format "%s" (nth 0 x))) ; file name | 479 | (insert |
| 478 | (put-text-property pos (point) 'dired-filename t)) | 480 | (format |
| 479 | (insert "\n") | 481 | "%s\n" |
| 482 | (file-relative-name (expand-file-name (nth 0 x) filename)))) | ||
| 483 | (put-text-property pos (1- (point)) 'dired-filename t)) | ||
| 480 | (forward-line) | 484 | (forward-line) |
| 481 | (beginning-of-line))) | 485 | (beginning-of-line))) |
| 482 | entries))))) | 486 | entries))))) |
| 483 | 487 | ||
| 484 | (defun tramp-imap-handle-insert-file-contents | 488 | (defun tramp-imap-handle-insert-file-contents |
| 485 | (filename &optional visit beg end replace) | 489 | (filename &optional visit beg end replace) |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index e9051f0a435..a8c8345c446 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -716,7 +716,7 @@ PRESERVE-UID-GID is completely ignored." | |||
| 716 | (when (tramp-smb-get-stat-capability v) | 716 | (when (tramp-smb-get-stat-capability v) |
| 717 | (ignore-errors | 717 | (ignore-errors |
| 718 | (file-attributes | 718 | (file-attributes |
| 719 | (expand-file-name (nth 0 x)) 'string))))) | 719 | (expand-file-name (nth 0 x) filename) 'string))))) |
| 720 | (insert | 720 | (insert |
| 721 | (format | 721 | (format |
| 722 | "%10s %3d %-8s %-8s %8s %s " | 722 | "%10s %3d %-8s %-8s %8s %s " |
| @@ -732,9 +732,14 @@ PRESERVE-UID-GID is completely ignored." | |||
| 732 | "%b %e %R" | 732 | "%b %e %R" |
| 733 | "%b %e %Y") | 733 | "%b %e %Y") |
| 734 | (nth 3 x)))) ; date | 734 | (nth 3 x)))) ; date |
| 735 | ;; We mark the filename. | 735 | ;; We mark the file name. The inserted name could be |
| 736 | ;; from somewhere else, so we use the relative file | ||
| 737 | ;; name of `default-directory'. | ||
| 736 | (let ((start (point))) | 738 | (let ((start (point))) |
| 737 | (insert (format "%s\n" (nth 0 x))) ; file name | 739 | (insert |
| 740 | (format | ||
| 741 | "%s\n" | ||
| 742 | (file-relative-name (expand-file-name (nth 0 x) filename)))) | ||
| 738 | (put-text-property start (1- (point)) 'dired-filename t)) | 743 | (put-text-property start (1- (point)) 'dired-filename t)) |
| 739 | (forward-line) | 744 | (forward-line) |
| 740 | (beginning-of-line)))) | 745 | (beginning-of-line)))) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 28a30155a66..a573a75afe2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4035,9 +4035,11 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 4035 | (concat file ".z")) | 4035 | (concat file ".z")) |
| 4036 | (t nil))))))))) | 4036 | (t nil))))))))) |
| 4037 | 4037 | ||
| 4038 | (defun tramp-handle-dired-uncache (dir) | 4038 | (defun tramp-handle-dired-uncache (dir &optional dir-p) |
| 4039 | "Like `dired-uncache' for Tramp files." | 4039 | "Like `dired-uncache' for Tramp files." |
| 4040 | (with-parsed-tramp-file-name dir nil | 4040 | ;; DIR-P is valid for XEmacs only. |
| 4041 | (with-parsed-tramp-file-name | ||
| 4042 | (if (or dir-p (file-directory-p dir)) dir (file-name-directory dir)) nil | ||
| 4041 | (tramp-flush-file-property v localname))) | 4043 | (tramp-flush-file-property v localname))) |
| 4042 | 4044 | ||
| 4043 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm | 4045 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm |
| @@ -4663,20 +4665,21 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." | |||
| 4663 | 4665 | ||
| 4664 | (defun tramp-handle-file-remote-p (filename &optional identification connected) | 4666 | (defun tramp-handle-file-remote-p (filename &optional identification connected) |
| 4665 | "Like `file-remote-p' for Tramp files." | 4667 | "Like `file-remote-p' for Tramp files." |
| 4666 | (when (tramp-tramp-file-p filename) | 4668 | (let ((tramp-verbose 3)) |
| 4667 | (let* ((v (tramp-dissect-file-name filename)) | 4669 | (when (tramp-tramp-file-p filename) |
| 4668 | (p (tramp-get-connection-process v)) | 4670 | (let* ((v (tramp-dissect-file-name filename)) |
| 4669 | (c (and p (processp p) (memq (process-status p) '(run open))))) | 4671 | (p (tramp-get-connection-process v)) |
| 4670 | ;; We expand the file name only, if there is already a connection. | 4672 | (c (and p (processp p) (memq (process-status p) '(run open))))) |
| 4671 | (with-parsed-tramp-file-name | 4673 | ;; We expand the file name only, if there is already a connection. |
| 4672 | (if c (expand-file-name filename) filename) nil | 4674 | (with-parsed-tramp-file-name |
| 4673 | (and (or (not connected) c) | 4675 | (if c (expand-file-name filename) filename) nil |
| 4674 | (cond | 4676 | (and (or (not connected) c) |
| 4675 | ((eq identification 'method) method) | 4677 | (cond |
| 4676 | ((eq identification 'user) user) | 4678 | ((eq identification 'method) method) |
| 4677 | ((eq identification 'host) host) | 4679 | ((eq identification 'user) user) |
| 4678 | ((eq identification 'localname) localname) | 4680 | ((eq identification 'host) host) |
| 4679 | (t (tramp-make-tramp-file-name method user host "")))))))) | 4681 | ((eq identification 'localname) localname) |
| 4682 | (t (tramp-make-tramp-file-name method user host ""))))))))) | ||
| 4680 | 4683 | ||
| 4681 | (defun tramp-find-file-name-coding-system-alist (filename tmpname) | 4684 | (defun tramp-find-file-name-coding-system-alist (filename tmpname) |
| 4682 | "Like `find-operation-coding-system' for Tramp filenames. | 4685 | "Like `find-operation-coding-system' for Tramp filenames. |