all repos — nixfiles @ 89a9b4c1ee8ec9fd76e3ee559da6bc81c2bb315e

System and user configuration, managed by nix and home-manager

Emacs: Delete to trash correctly on OSX

Alan Pearce
commit

89a9b4c1ee8ec9fd76e3ee559da6bc81c2bb315e

parent

d5c79a6dfb57d24523ce0aaeb2e17b26cf07d963

1 file changed, 6 insertions(+), 1 deletion(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -518,7 +518,12 @@ (setq backup-directory-alist `((".*" . ,backup-dir))
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