summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-02-12 09:04:14 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-02-12 09:04:14 +0100
commite0198986d25487acc7b4f4d77451d5e6789e310c (patch)
tree42accbd7c2c7df10b585fd6037bff4789b8b804e /doc/emacs
parentc4da0d331291d531dddc08e7fef1548e638c4663 (diff)
downloademacs-e0198986d25487acc7b4f4d77451d5e6789e310c.tar.gz
emacs-e0198986d25487acc7b4f4d77451d5e6789e310c.tar.bz2
emacs-e0198986d25487acc7b4f4d77451d5e6789e310c.zip
Add documentation on how to delete files from Trash
* doc/emacs/files.texi (Misc File Ops): Note trick to make `D' work in Trash directories (bug#44059).
Diffstat (limited to 'doc/emacs')
-rw-r--r--doc/emacs/files.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 84eb7275da7..c5cb6fd17b6 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1828,6 +1828,22 @@ argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes
them delete outright, instead of using the Trash, regardless of
@code{delete-by-moving-to-trash}.
+ If you have @code{delete-by-moving-to-trash} set, and you want to
+delete files manually in Emacs from the Trash directory, using
+commands like @kbd{D} (@code{dired-do-delete}) doesn't work well in
+the Trash directory (it'll just give the file a new name, but won't
+delete anything). If you want to be able to do this, you should
+create a @code{.dir-locals.el} file containing something like the
+following in the Trash directory:
+
+@example
+((dired-mode . ((delete-by-moving-to-trash . nil))))
+@end example
+
+ Note, however, if you use the system ``empty trash'' command, it's
+liable to also delete this @code{.dir-locals.el} file, so this should
+only be done if you delete files from the Trash directory manually.
+
@ifnottex
If a file is under version control (@pxref{Version Control}), you
should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x