diff options
| author | Michael Albinus | 2021-05-07 14:31:17 +0200 |
|---|---|---|
| committer | Michael Albinus | 2021-05-07 14:31:17 +0200 |
| commit | f50577ea07fd85a1798cc2d41251ab1418fd802f (patch) | |
| tree | 944493c8f3f5c5362233ebc2225bc497734ff8b5 | |
| parent | 3ad239e1bc1228407ae656440327a29e7373f977 (diff) | |
| download | emacs-f50577ea07fd85a1798cc2d41251ab1418fd802f.tar.gz emacs-f50577ea07fd85a1798cc2d41251ab1418fd802f.zip | |
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'.
| -rw-r--r-- | lisp/files.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index 27074beffc1..93a0e07aba0 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -7559,7 +7559,10 @@ only these files will be asked to be saved." | |||
| 7559 | (setq file-arg-indices (cdr file-arg-indices)))) | 7559 | (setq file-arg-indices (cdr file-arg-indices)))) |
| 7560 | (pcase method | 7560 | (pcase method |
| 7561 | ('identity (car arguments)) | 7561 | ('identity (car arguments)) |
| 7562 | ('add (file-name-quote (apply operation arguments) t)) | 7562 | ('add |
| 7563 | ;; This is `file-truename'. We don't want file name handlers | ||
| 7564 | ;; to expand this. | ||
| 7565 | (file-name-quote (let (tramp-mode) (apply operation arguments)) t)) | ||
| 7563 | ('buffer-file-name | 7566 | ('buffer-file-name |
| 7564 | (let ((buffer-file-name (file-name-unquote buffer-file-name t))) | 7567 | (let ((buffer-file-name (file-name-unquote buffer-file-name t))) |
| 7565 | (apply operation arguments))) | 7568 | (apply operation arguments))) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 57be9ecf006..3ce74a2cf1a 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." | |||
| 2371 | ;; can be handled. We don't set a timeout, because | 2371 | ;; can be handled. We don't set a timeout, because |
| 2372 | ;; the copying of large files can last longer than 60 | 2372 | ;; the copying of large files can last longer than 60 |
| 2373 | ;; secs. | 2373 | ;; secs. |
| 2374 | p (apply | 2374 | p (let ((default-directory (tramp-compat-temporary-file-directory))) |
| 2375 | #'start-process | 2375 | (apply |
| 2376 | (tramp-get-connection-name v) | 2376 | #'start-process |
| 2377 | (tramp-get-connection-buffer v) | 2377 | (tramp-get-connection-name v) |
| 2378 | copy-program copy-args)) | 2378 | (tramp-get-connection-buffer v) |
| 2379 | copy-program copy-args))) | ||
| 2379 | (tramp-message orig-vec 6 "%s" (string-join (process-command p) " ")) | 2380 | (tramp-message orig-vec 6 "%s" (string-join (process-command p) " ")) |
| 2380 | (process-put p 'vector orig-vec) | 2381 | (process-put p 'vector orig-vec) |
| 2381 | (process-put p 'adjust-window-size-function #'ignore) | 2382 | (process-put p 'adjust-window-size-function #'ignore) |