diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2024-04-23 13:54:09 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2024-04-23 13:54:09 +0200 |
commit | 956821672eb5306d4eeeae0dc07df4664cef230a (patch) | |
tree | 067e3d5e09730345dc20a40cac7b2b1668942533 /lisp/files.el | |
parent | 0e139ca741a5a98abc199c9bce277d5d1f262bf3 (diff) | |
download | emacs-956821672eb5306d4eeeae0dc07df4664cef230a.tar.gz |
Support remote trash-directory
* doc/misc/tramp.texi (Frequently Asked Questions): Describe how
to manipulate trash-directory.
Explain tramp-inhibit-errors-if-setting-file-attributes-fail.
* lisp/files.el (move-file-to-trash): Use connection-local value
of `trash-directory'. (Bug#70421)
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 9f5ed85ce60..7dec67c5cf0 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -8812,9 +8812,10 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, ;; If `system-move-file-to-trash' is defined, use it. (cond ((fboundp 'system-move-file-to-trash) (system-move-file-to-trash filename)) - (trash-directory + ((connection-local-value trash-directory) ;; If `trash-directory' is non-nil, move the file there. - (let* ((trash-dir (expand-file-name trash-directory)) + (let* ((trash-dir (expand-file-name + (connection-local-value trash-directory))) (fn (directory-file-name (expand-file-name filename))) (new-fn (concat (file-name-as-directory trash-dir) (file-name-nondirectory fn)))) |