emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f50577e: Fix some annoyances wrt file-name-non-special


From: Michael Albinus
Subject: master f50577e: Fix some annoyances wrt file-name-non-special
Date: Fri, 7 May 2021 08:31:26 -0400 (EDT)

branch: master
commit f50577ea07fd85a1798cc2d41251ab1418fd802f
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix some annoyances wrt file-name-non-special
    
    * lisp/files.el (file-name-non-special): Do not expand `file-truename'.
    
    * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
    Use local `default-directory' for `start-process'.
---
 lisp/files.el        |  5 ++++-
 lisp/net/tramp-sh.el | 11 ++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 27074be..93a0e07 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7559,7 +7559,10 @@ only these files will be asked to be saved."
        (setq file-arg-indices (cdr file-arg-indices))))
     (pcase method
       ('identity (car arguments))
-      ('add (file-name-quote (apply operation arguments) t))
+      ('add
+       ;; This is `file-truename'.  We don't want file name handlers
+       ;; to expand this.
+       (file-name-quote (let (tramp-mode) (apply operation arguments)) t))
       ('buffer-file-name
        (let ((buffer-file-name (file-name-unquote buffer-file-name t)))
          (apply operation arguments)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 57be9ec..3ce74a2 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2371,11 +2371,12 @@ The method used must be an out-of-band method."
                 ;; can be handled.  We don't set a timeout, because
                 ;; the copying of large files can last longer than 60
                 ;; secs.
-                p (apply
-                   #'start-process
-                   (tramp-get-connection-name v)
-                   (tramp-get-connection-buffer v)
-                   copy-program copy-args))
+                p (let ((default-directory 
(tramp-compat-temporary-file-directory)))
+                    (apply
+                     #'start-process
+                     (tramp-get-connection-name v)
+                     (tramp-get-connection-buffer v)
+                     copy-program copy-args)))
                (tramp-message orig-vec 6 "%s" (string-join (process-command p) 
" "))
                (process-put p 'vector orig-vec)
                (process-put p 'adjust-window-size-function #'ignore)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]