Max Nikulin <maniku...@gmail.com> writes:
> On 01/02/2023 02:56, Bruno Barbier wrote: > Is it intentional that you and the linked page avoid cb_thunderlink page > on the official add-on site? > https://addons.thunderbird.net/en-us/thunderbird/addon/cb_thunderlink/ No. But visiting the author site being mandatory to install it, I thought it was simpler to point directly there. >> +To install the =cb_thunderlink=, see this web page: >> + >> + https://camiel.bouchier.be/en/cb_thunderlink/installation?with_menu=1 >> + >> +You need to install both the add-on and the OS integration. > > Often I prefer to see URL I am going to visit, however in this case I > would consider in-text link with description text hiding the address. ok. >> +#+begin_src elisp >> +(defvar cbthunderlink-app nil >> + "The full path where you've installed your cb_thunderlink application.") >> + >> +(defun cbthunderlink-open (message-id) >> + "Open the given email. MESSAGE-ID is the message id." >> + (start-process "cb_thunderlink" " *cb_thunderlink*" > --------------------------------------^ Yes. This is a buffer that is uninteresting to the user, see: (info "(elisp) Buffer Names") > is it intentional space? >> + cbthunderlink-app >> + (concat "thunderlink://messageid=" message-id))) >> +(org-add-link-type "mid" 'org-email-open) >> +#+end_src > > I am in doubts if `org-add-link-type' should be recommended since > > (make-obsolete 'org-add-link-type "use `org-link-set-parameters' > instead." "9.0") Oops. Right. I should change that, thanks (and use my new function name `cbthunderlink-open', not the old one `org-email-open'). > > I checked > https://camiel.bouchier.be/en/cb_thunderlink/installation/windows > https://camiel.bouchier.be/en/cb_thunderlink/installation/linux > in both cases it promises to register thunderlink:// and > cbthunderlink:// handlers. From my point of view it may be a reason to > take advantage of `browse-url' package. It should allow to avoid > explicit code to start process and to delegate the task to this package > and to handle mid: links by `goto-address-mode' in non-org buffers. That is what I first thought. But, I couldn't find an Emacs function that would pass that URL to the OS desktop, asking it to open the document. I'm not using `browse-url' (except for web pages) and I wasn't aware of `goto-address-mode'. > By the way, if cb_thunderlink is more convenient than built-in way to > handle mid: links in thunderbird then support of mid: URI protocol is a > valid feature request for cb_thunderlink. I'm not sure to understand. The `cb_thunderlink' add-on allow to build the link in one click from inside Thunderbird; that the part that I find really useful. And if Thunderbird is able to open an email from its "mid:" URL, the prefered method should probably be to install only the add-on inside Thunderbird, and use Thunderbird to reopen the "mid:" link. > > Let's wait several days, there is a chance that somebody else will add > more comments. ok. Thanks for your comments. Bruno