1

I've been using this guide to set up email in Emacs on macOS. I managed the offlineimap connection and replication into a Maildir. I installed mu with brew install mu:

$ which mu
/usr/local/bin/mu

But I cannot find anything in the Emacs site-lisp to launch mu4e:

$ ls /usr/local/share/emacs/site-lisp/mu/ ls: /usr/local/share/emacs/site-lisp/mu/: No such file or directory

But the website suggests that mu4e is installed:

mu includes an emacs-based e-mail client (mu4e)

I tried building from git and using brew in this way:

EMACS=$(which emacs) brew install mu --with-emacs --HEAD

and in both cases I get:

configure: error: Package requirements (gmime-3.0) were not met:

No package 'gmime-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GMIME_CFLAGS
and GMIME_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

and this package is not in brew:

Error: No formulae found in taps.

Furthermore, on my home computer the command EMACS=$(which emacs) brew install mu --with-emacs --HEAD reinstalls emacs with brew, despite it being already installed.

Another attempt is to install mu, then just copy the mu4e files to site-lisp:

brew install mu
git clone git://github.com/djcb/mu.git
mkdir /usr/local/share/emacs/site-lisp/mu/
cp -r mu4e /usr/local/share/emacs/site-lisp/mu/

and adding this in ~/.emacs:

(require 'mu4e)
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e")

But I get the error Cannot open load file: No such file or directory, mu4e-meta. And still, M-x mu4e doesn't work.

How can I install mu4e?

  • And your .emacs configuration? is mu4e required? is the mail path loaded? can you please provide a link to your config? or paste the relevant par there? – manandearth Nov 22 '18 at 22:00
  • I had not added (require 'mu4e), which I now updated the question with. Those two lines are the relevant part of .emacs. – miguelmorin Nov 23 '18 at 9:34
1

To get elisp files installed together with mu using brew in OSX, you need to run:

brew install mu --with-emacs

The available arguments to mu install is shown with brew info mu.

You can get the list of all installed files with brew ls --verbose mu. At the moment, the directory /usr/local/Cellar/mu/1.0/share/emacs/site-lisp/mu/mu4e/ gets symlinked to /usr/local/share/emacs/site-lisp/mu/mu4e.

The mu configuration in your emacs init file needs to first call add-to-list pointing to the directory where mu4e files are, followed by the form (require mu4e) and all other variable settings:

(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e")
(require 'mu4e)
 ...

If mu4e fails to start even after require'ing it, you should try adding (setq mu4e-mu-binary "/usr/local/bin/mu"). mu4e has tons more variables you can set to get the behavior you want.

  • I ran that, and got ls: /usr/local/Cellar/mu/1.0/share/emacs/site-lisp/mu/mu4e/: No such file or directory. – miguelmorin Nov 23 '18 at 9:27
  • Find out where the files are with brew ls --verbose mu – Heikki Nov 24 '18 at 12:52
  • You need to add-to-list the relavant directory before you require. – Heikki Nov 24 '18 at 13:24
  • These changes worked: brew install mu --wtih-emacs and add-to-list before require! I then configured mu4e with this minimal configuration. Can you include those changes so I accept the answer? – miguelmorin Nov 27 '18 at 10:41
  • Changes included. – Heikki Nov 27 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.