diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-07-23 19:45:24 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-07-23 19:45:24 +0200 |
commit | b4067394dcf33d64e0372bf553cec5b6f9c4af1c (patch) | |
tree | 30c7345ef1373a91cb63cbc75f8e31d01c0bdcc6 /lisp/net/tramp-archive.el | |
parent | 2529e8200232aa8ce252084634d81a2809fb26fa (diff) | |
download | emacs-b4067394dcf33d64e0372bf553cec5b6f9c4af1c.tar.gz emacs-b4067394dcf33d64e0372bf553cec5b6f9c4af1c.tar.bz2 emacs-b4067394dcf33d64e0372bf553cec5b6f9c4af1c.zip |
Set `default-directory' of Tramp archive connection buffer
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Set `default-directory' of Tramp connection buffer. (Bug#56628)
Diffstat (limited to 'lisp/net/tramp-archive.el')
-rw-r--r-- | lisp/net/tramp-archive.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 4b649edaabd..33348ca21ef 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -339,6 +339,13 @@ arguments to pass to the OPERATION." (tramp-archive-run-real-handler #'file-directory-p (list archive))) (tramp-archive-run-real-handler operation args) + ;; The default directory of the Tramp connection buffer + ;; cannot be accessed. (Bug#56628) + ;; FIXME: It is superfluous to set it every single loop. + ;; But there is no place to set it when creating the buffer. + (with-current-buffer + (tramp-get-buffer (tramp-archive-dissect-file-name filename)) + (setq default-directory (file-name-as-directory archive))) ;; Now run the handler. (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) (tramp-gvfs-methods tramp-archive-all-gvfs-methods) |