Hi,
I am trying to configure Emacs to react to "mailto:" links by configuring the appropriate XDG
mimetype, which by default (at least on Debian) is:
$ xdg-mime query default x-scheme-handler/mailto
emacs-mail.desktop
That .desktop file executes:
Exec=emacs -f message-mailto %u
which in my case is not sufficient to start emacs, then mu4e, then compose an email.
What I probably would like to happen is the equivalent of running:
$ emacs --eval '(mu4e) (mu4e-compose-new "%u")'
But that doesn't work either. I have found an old SO post[0] suggesting to set:
--8<---------------cut here---------------start------------->8---
(setq
mail-user-agent #'mu4e-user-agent
message-mail-user-agent t)
--8<---------------cut here---------------end--------------->8---
to have mu4e handle the `message-mailto` but, again, this doesn't seem to work for me. I see an
error in *Messages*
mu4e-error: [mu4e] Root maildir unknown; did you start mu4e?
I am a bit confused about what to do: has anyone suggestions to share?
I would like the following to happen:
- if Emacs is not running, start Emacs and open a mu4e compose buffer prepopulating email fields
(To, Cc, Subject, ...) based on the input
- if Emacs is running, open a new buffer mu4e compose buffer in the current instance
Thanks!
[0]:
https://emacs.stackexchange.com/a/77624