[mu4e] Load from nix install, if available

This commit is contained in:
Marcel Kapfer 2022-10-13 20:22:43 +02:00
parent c998ff3beb
commit 9d90a8c4ec
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -1949,11 +1949,14 @@ Not all distributions that I use have a enough up-to-date package of mu/maildir-
(defun mmk2410/mu4e-load-path ()
(let* ((mu4e-site-lisp-path "/share/emacs/site-lisp/mu4e")
(mu4e-load-path-usr (concat "/usr" mu4e-site-lisp-path))
(mu4e-load-path-usr-local (concat "/usr/local" mu4e-site-lisp-path)))
(cond ((file-directory-p mu4e-load-path-usr)
mu4e-load-path-usr)
(mu4e-load-path-usr-local (concat "/usr/local" mu4e-site-lisp-path))
(mu4e-load-path-nix (concat (getenv "HOME") "/.nix-profile" mu4e-site-lisp-path)))
(cond ((file-directory-p mu4e-load-path-nix)
mu4e-load-path-nix)
((file-directory-p mu4e-load-path-usr-local)
mu4e-load-path-usr-local)
((file-directory-p mu4e-load-path-usr)
mu4e-load-path-usr-local)
(t (error "mu4e not found!"))))))
#+end_src