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
This commit is contained in:
parent
f9c3dcb8fc
commit
1f1f2d4e4d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue