From 32b37420a307f80997ad0c90586cd9c9a2ffbf77 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Fri, 1 Jan 2021 00:00:33 +0000 Subject: [PATCH] Load mu4e in a more-portable way --- config.org | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/config.org b/config.org index 92567b8..d4ff4bd 100644 --- a/config.org +++ b/config.org @@ -602,20 +602,14 @@ needs to be set up to install them if they aren't already. =mu4e= is a bit annoying as it's bundled along with =mu= rather than being loaded from ELPA or MELPA, so it can't be loaded with =use-package=. Indeed, how to load it depends on how =mu= was - packaged. On NixOS at least, =mu4e= gets put in a place where Emacs - is able to find it, so it just needs to be =require='d. + packaged. On NixOS, =mu4e= gets automagically introduced to Emacs, + but on OpenBSD we have to add its location to =load-path= ourselves. #+begin_src emacs-lisp - (require 'mu4e) - #+end_src - - I'm /sure/ this will break at some point; when it does, probably - makes sense to do something like: - - #+begin_src emacs-lisp :tangle no (let ((uname-output (shell-command-to-string "uname -a"))) (cond ((string-match-p "NixOS" uname-output) nil) - ...)) + ((string-match-p "OpenBSD" uname-output) + (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")))) (require 'mu4e) #+end_src