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'
|
;; on OS X, install `trash' from `homebrew'
|
||||||
(setq delete-by-moving-to-trash t)
|
(setq delete-by-moving-to-trash t)
|
||||||
(when (system-is-mac)
|
(when (system-is-mac)
|
||||||
|
;; use trash if installed
|
||||||
|
(if (executable-find "trash")
|
||||||
(defun system-move-file-to-trash (file)
|
(defun system-move-file-to-trash (file)
|
||||||
"Use `trash' to move FILE to the system trash.
|
"Use `trash' to move FILE to the system trash.
|
||||||
When using homebrew, install it using `brew install trash'."
|
Can be installed with `brew install trash'."
|
||||||
(let ((trash (executable-find "trash")))
|
(call-process (executable-find "trash") nil 0 nil file))
|
||||||
(if trash (call-process (executable-find "trash")
|
;; regular move to trash directory
|
||||||
nil 0 nil file)))))
|
(setq trash-directory "~/.Trash/emacs")))
|
||||||
(setq system-trash-exclude-matches '("#[^/]+#$"
|
|
||||||
".*~$"))
|
|
||||||
(setq system-trash-exclude-paths '(spacemacs-cache-directory
|
|
||||||
(concat user-emacs-directory "elpa/")
|
|
||||||
"/tmp"))
|
|
||||||
|
|
||||||
;; ---------------------------------------------------------------------------
|
;; ---------------------------------------------------------------------------
|
||||||
;; UI
|
;; UI
|
||||||
|
|
Loading…
Reference in a new issue