I have been using org-mode for a while and started using mu and mu4e recently.

The following capture template stores a link from a "normal" file but not from a mu4e message:

(setq org-capture-templates
  '(("f" "Todo (linked to file)" entry (file+headline "~/org/gtd.org" "project")
 "* TODO %?\n%a"))

In a buffer with a mu4e message, I do M-x org-store-link and get this message in the minibuffer:

No method for storing a link from this buffer`.

The author of this thread reported that

The link (%a) gets initialized,

and the only other thread I found is two years old and mentions that the problem went away with version 0.9.18 of mu.

I am running Org mode version 9.1.9 and mu version 1.0.

How can I get the link to work?

  • not sure about the template but M-x org-store-link from the body of the email message does store a link that can be copied into org with 'M-x org-insert-link` and opened with follow-link or C-c C-o. I'll look further. – manandearth Dec 7 '18 at 19:08
  • and this is for a hyperlink and not for a capture ..by the way. – manandearth Dec 7 '18 at 19:16
  • 1
    I guess you need (require 'org-mu4e) somewhere in your init – andrej Dec 7 '18 at 20:52

This is an example that works for me and that I have somewhere from the mu4e-pages

(require 'org-mu4e)

(setq org-capture-templates
   '(("T" "todo with link" entry (file "~/org/inbox.org")
      "* TODO %i%? \n:PROPERTIES: \n:CREATED: %U \n:END: \n %a\n")
     ("p" "Process" entry (file+headline "~/org/gtd.org" "Tasks")
      "* TODO [#A] Process mail from %:fromname on %:subject\nSCHEDULED:%t\nDEADLINE: %(org-insert-time-stamp (org-read-date nil t \"+2d\"))\n:PROPERTIES:\n:CREATED: %U\n:END:\n %a" :immediate-finish t :prepend t)))

For an explanation see https://orgmode.org/manual/Adding-hyperlink-types.html and note that in org-mu4e among other things different kinds of hyperlink types for mu4e are defined.

  • (require 'org-mu4e) is all I needed to make the capture template work. Thanks! – mmorin Dec 10 '18 at 9:41

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.