From 70e46f189c59d6c90ff0e960cc509ea2c4e04321 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 18 Apr 2020 23:19:20 +0100 Subject: [PATCH] dot/emacs: Don't use the `trash' on Emacs 23. It doesn't actually work. Specifically, if you try to delete a file on, say, `/tmp', then Emacs tries to rename it and fails with `EXDEV'. This is especially troublesome because it breaks `emacs --daemon'. Emacs doesn't usually delete its socket when it quits, so it gets left behind as `/tmp/mdw/emacs1000/server' or something. When you run `emacs --daemon' later, it finds the old socket and tries to delete it, which fails. And /then/ you get left with a strange half-daemonized Emacs which has crashed during startup, and the husk of its parent, and neither of them can do anything very useful. --- dot/emacs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot/emacs b/dot/emacs index d918bcd..be0d918 100644 --- a/dot/emacs +++ b/dot/emacs @@ -343,7 +343,7 @@ eshell-cmpl-cycle-completions nil) (setq dired-deletion-confirmer ;Make deletion easier in dired (symbol-function 'y-or-n-p) - delete-by-moving-to-trash t + delete-by-moving-to-trash (mdw-emacs-version-p 24) dired-listing-switches "-alF" ;Do `ls -F' things in dired windows wdired-allow-to-change-permissions 'advanced) (setq read-quoted-char-radix 16) ;C-q HEX-STUFF [RET] -- 2.11.0