From 89a9b4c1ee8ec9fd76e3ee559da6bc81c2bb315e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 12 Aug 2016 15:55:04 +0200 Subject: Emacs: Delete to trash correctly on OSX --- tag-emacs/emacs.d/init.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 40317634..a89a4c5d 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -518,7 +518,12 @@ trash for deleting on OS X. backup-by-copying-when-linked t backup-by-copying-when-mismatch t)) (if (eq system-type 'darwin) - (setq delete-by-moving-to-trash t)) + (setq delete-by-moving-to-trash t) + (if (and (executable-find "trash") (not (fboundp #'system-move-file-to-trash))) + (defun system-move-file-to-trash (file) + (call-process (executable-find "trash") + nil 0 nil + file)))) #+END_SRC ** autorevert -- cgit 1.4.1