mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
Fix quoted local file name parts in Tramp
* lisp/net/tramp.el (tramp-handle-directory-file-name): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay): Handle quoted local file name part.
This commit is contained in:
parent
1f998d11a5
commit
28a276efe8
2 changed files with 8 additions and 5 deletions
|
|
@ -59,8 +59,9 @@
|
||||||
|
|
||||||
;;; Fontification of `read-file-name':
|
;;; Fontification of `read-file-name':
|
||||||
|
|
||||||
(defvar tramp-rfn-eshadow-overlay)
|
;; An overlay covering the shadowed part of the filename (local to the
|
||||||
(make-variable-buffer-local 'tramp-rfn-eshadow-overlay)
|
;; minibuffer).
|
||||||
|
(defvar-local tramp-rfn-eshadow-overlay nil)
|
||||||
|
|
||||||
(defun tramp-rfn-eshadow-setup-minibuffer ()
|
(defun tramp-rfn-eshadow-setup-minibuffer ()
|
||||||
"Set up a minibuffer for `file-name-shadow-mode'.
|
"Set up a minibuffer for `file-name-shadow-mode'.
|
||||||
|
|
@ -104,7 +105,8 @@ been set up by `rfn-eshadow-setup-minibuffer'."
|
||||||
(minibuffer-prompt-end)))
|
(minibuffer-prompt-end)))
|
||||||
;; We do not want to send any remote command.
|
;; We do not want to send any remote command.
|
||||||
(non-essential t))
|
(non-essential t))
|
||||||
(when (tramp-tramp-file-p (buffer-substring end (point-max)))
|
(when (and (tramp-tramp-file-p (buffer-substring end (point-max)))
|
||||||
|
(not (file-name-quoted-p (buffer-substring end (point-max)))))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(narrow-to-region
|
(narrow-to-region
|
||||||
|
|
|
||||||
|
|
@ -4076,6 +4076,7 @@ Let-bind it when necessary.")
|
||||||
;; Otherwise, remove any trailing slash from localname component.
|
;; Otherwise, remove any trailing slash from localname component.
|
||||||
;; Method, host, etc, are unchanged.
|
;; Method, host, etc, are unchanged.
|
||||||
(while (with-parsed-tramp-file-name directory nil
|
(while (with-parsed-tramp-file-name directory nil
|
||||||
|
(setq localname (file-name-unquote localname))
|
||||||
(and (tramp-compat-length> localname 0)
|
(and (tramp-compat-length> localname 0)
|
||||||
(eq (aref localname (1- (length localname))) ?/)
|
(eq (aref localname (1- (length localname))) ?/)
|
||||||
(not (string= localname "/"))))
|
(not (string= localname "/"))))
|
||||||
|
|
@ -4164,8 +4165,8 @@ Let-bind it when necessary.")
|
||||||
(eq (file-attribute-type (file-attributes (file-truename filename))) t)))
|
(eq (file-attribute-type (file-attributes (file-truename filename))) t)))
|
||||||
|
|
||||||
(defun tramp-handle-file-equal-p (filename1 filename2)
|
(defun tramp-handle-file-equal-p (filename1 filename2)
|
||||||
"Like `file-equalp-p' for Tramp files."
|
"Like `file-equal-p' for Tramp files."
|
||||||
;; Native `file-equalp-p' calls `file-truename', which requires a
|
;; Native `file-equal-p' calls `file-truename', which requires a
|
||||||
;; remote connection. This can be avoided, if FILENAME1 and
|
;; remote connection. This can be avoided, if FILENAME1 and
|
||||||
;; FILENAME2 are not located on the same remote host.
|
;; FILENAME2 are not located on the same remote host.
|
||||||
(when (tramp-equal-remote
|
(when (tramp-equal-remote
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue