On 29/05/2025 02:42, Christoph wrote:
On 5/28/25 17:29, Max Nikulin wrote:

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/

I have checked it. Yes it is working on thunderbird 138.

It should be inconvenient to copy sender, recipient, subject, and date separately.

     (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.
This is exactly what is happening. May be
(call-process "thunderbird" nil 0 nil (concat "mid:" path))
would be the solution to this?

The downside of `call-process' with 0 is that it is purely shoot and forget approach and no error handling is possible. Unfortunately I can not suggest a better Emacs function.

However I would consider using it indirectly:

    (browse-url-default-browser (concat "mid:" path))

preferably by configuring `browse-url-handlers'. It should invoke xdg-open and so desktop environment handler for URL scheme. Unfortunately xdg-open does not use systemd-run in fallback when no supported desktop environment is detected. I mean something like

    systemd-run --user --slice=app.slice -- thunderbird MID_URL

(Side note: there is a chance that systemd D-Bus API may allow to catch some errors to notify user in the case of failure)

P.S. If you have informative links describing what has happened with cb_thunderlink in your browser history, please, post them. I have no plans to touch my tools related to thunderbird till next major ESR update will appear in Debian stable.


Reply via email to