Link directly to emails from Emacs Orgmode using Thunderbird and Thunderlink
Contents
On macOS, links of the form message://message-id
are by default supported by
the system.
Using a tool such as org-mac-link, it is straight-forward to link directly to relevant emails from Orgmode tasks and notes.
It does not matter if you have moved the mail around. When you open the link from Orgmode, the relevant email is instantly shown in Mac mail.
Fortunately, similar functionality can be configured on Windows and Linux using the Thunderbird mail client, an add-on called ThunderLink, and a touch of Emacs Lisp.
This post will show you exactly how.
I should mention at this point that you could opt to use thunderlink://
format links directly. However, my Orgmode files are filled with the slightly
more standard message://
links from my recently ended (paused?) macOS phase,
and I would prefer to continue using this MUA-agnostic convention just in case
I end up switching operating systems and/or mail clients again in the future.
Install and configure the ThunderLink add-on
It hopefully goes without saying that for this solution you need to have Thunderbird setup to access your email account. I am currently using version 60.6.1.
Install the ThunderLink add-on.
In Thunderbird, go to Tools | Add-on Options | ThunderLink and then configure the add-on as follows (textual explanation follows the screenshot):
Show ThunderLinked emails in the context of their folders.
By default, ThunderLinked emails will be opened in their own windows, without any sort of thread context.
Change the “when running, open TLs” to “by selecting in mailbox” to show the opened email selected in the main mail list UI, which is in my opinion much more useful.
Add an extra copy format for Emacs Orgmode.
Under the first open tab (in my case this was String 7), add the following link format:
|
|
… and title it “Emacs Orgmode Link” or something else memorable.
Configure Orgmode to invoke Thunderbird on message: links.
Add the following Lisp to your init.el
after configuring the correct path to the
thunderbird binary as the value of thunderbird-program
.
|
|
Link those emails!
This is as simple as right-clicking on the relevant email in Thunderbird, and
then selecting ThunderLink | Emacs Orgmode Link
from the context menu.
You can now paste the fully formed Orgmode message://
link into any Orgmode
file.
If you open this link with C-c C-o
or M-x org-open-at-point
, your
Thunderbird should appear in short order with the relevant email open, ready
for you to take care of the associated task.
May all of your links LLAP.
By sticking to the message://
convention, and using org-link-set-parameters
as demonstrated above to link to the mail reader of your choice at that moment,
your Orgmode email links should easily survive all of your future operating
system and mail user agent changes.