On 27/05/2025 16:32, Christian Moe wrote:
Christoph writes:
the thunderbird addons thunderlink and cb_thunderlink do not work
anymore for thunderbird 138.
[...]
I'm copying Bruno Barbier and Max Nikulin, who contributed to that
discussion and the FAQ update about cb_thunderlink.
The FAQ entry was describing thunderlink that is a XUL extension, so it
is incompatible with new WebExtensions API. I considered, it is better
to mention cb_thunderlink. Personally, I decided to not use
cb_thuderlink however, so I am unaware what has happened with it.
Breaking of extension API is a known "feature" of Thunderbird. If so
then its developer has chance to fix issues later. I am using a couple
of my own add-ons to create links and to open from Thunderbird Org files
at the point where the message is linked.
https://www.reddit.com/r/Thunderbird/comments/pb6sif/creating_a_link_to_an_email_in_thunderbird/
[...]
where my_message_id is the unique id that thunderbird gives to each
mail (without the angle brackets!).
Strictly speaking, Message-ID is assigned by sender's mail user agent or
by a mail server the message is submitted to. It appears in mail server
logs and may be used e.g. to drop extra copy of the same message (when
received through mailing list and direct copy).
However, from
the Reddit thread I see that Message-ID can be added as a custom message
header in the Thunderbird view and simply copied by right-click,
At least in Thunderbird-128 there is a "show all headers" checkbox, but
it is unrelated to Message-ID and I do not like the idea to waste
vertical screen space to always show more headers. I have not tried to
find if there is a more flexible option in about:config.
and there's also an add-on (still working?) to add a button to easily
copy it.
https://addons.thunderbird.net/en-us/thunderbird/addon/copy-message-id/
Perhaps there are more add-ons. I have not tried them. I have not
noticed anything alarming in the code of this particular one. I do not
mind if a happy user will add it to FAQ. Looking at the issues I see
some limitations (that should not be excessively hard to fix).
(defun thunderblink-open (path _)
(let ((clean-path (replace-regexp-in-string "[<>]" "" path)))
(start-process "thunderbird" nil "thunderbird" (concat "mid:"
clean-path))))
Spawning an external process is tricky in Emacs. I suspect some issues
with the following scenario. No thunderbird is running, open link, quit
from Emacs. If I do not confuse function then prompt to kill thunderbird
should appear since it should be direct child of Emacs.
Nowadays in Linux, desktop environments start applications with clean
environment as transient systemd units. That is why I believe it is
better to update system-wide handler defined for the URL scheme.
I recall thunderlink may use other options like sender, date, etc.
instead of Message-ID and cb_thunderlink added base64 encoding. So I
expect that the function may deal only with specific kind of links.
https://github.com/lordnik22/ol-thunderbird/blob/main/ol-thunderbird.el
I would not recommend it due to unsafe (and unnecessary) usage of shell.
The Worg FAQ discusses a different approach: defining a `mid' link type
with a follow function that uses browse-url instead of invoking
thunderbird from the shell.
I still believe that is better to delegate link handling to
`browse-url', so other Emacs packages may use it as well. When
system-wide handler is properly defined then links may be opened from
other applications. Association of mid: and thunderbird at the org-link
level has too narrow scope to my taste.
The FAQ advice may feel overwhelming to a Thunderbird user who's new to
Org. It would be good if we could clearly outline one relatively simple
approach before getting too technical about other options.
Unfortunately I can not suggest links how to configure XDG handler on
Linux. `browse-url' reference is already linked from FAQ.