Is there a best, most future-proof method of setting emacs on OS X to delete files to the trash?
I tried the instructions here:
(setq delete-by-moving-to-trash t) (defun system-move-file-to-trash (file) "Use \"trash\" to move FILE to the system trash. When using Homebrew, install it using \"brew install trash\"." (call-process (executable-find "trash") nil 0 nil file))
but they don't work:
Trashing... (wrong-type-argument stringp nil)
Also, it feels wrong to have to install a separate program in order for Emacs to be able to trash files. Furthermore, I won't remember to install the "trash" program the next time I do a clean OS X install.
Update: I added this to my .emacs and removed the call to
trash and it seems to work. I wonder why Emacs on OSX defaults to the FreeDesktop
(setq trash-directory "~/.Trash")