From 1f1f2d4e4de6aa8692b3603c186e6745c018e96c Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 10 Dec 2014 21:59:59 -0500 Subject: [PATCH] Fixes #237 Spacemacs finds orphan packages every time Occurred on OS X because of a critical bug in spacemacs which prevented emacs from effectively deleting the files --- spacemacs/config.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/spacemacs/config.el b/spacemacs/config.el index 9159e63c9..04c3719b6 100644 --- a/spacemacs/config.el +++ b/spacemacs/config.el @@ -76,17 +76,14 @@ ;; on OS X, install `trash' from `homebrew' (setq delete-by-moving-to-trash t) (when (system-is-mac) - (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'." - (let ((trash (executable-find "trash"))) - (if trash (call-process (executable-find "trash") - nil 0 nil file))))) -(setq system-trash-exclude-matches '("#[^/]+#$" - ".*~$")) -(setq system-trash-exclude-paths '(spacemacs-cache-directory - (concat user-emacs-directory "elpa/") - "/tmp")) + ;; use trash if installed + (if (executable-find "trash") + (defun system-move-file-to-trash (file) + "Use `trash' to move FILE to the system trash. +Can be installed with `brew install trash'." + (call-process (executable-find "trash") nil 0 nil file)) + ;; regular move to trash directory + (setq trash-directory "~/.Trash/emacs"))) ;; --------------------------------------------------------------------------- ;; UI