From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OD2BGJ3N22NnUAAAbAwnHQ (envelope-from ) for ; Thu, 02 Feb 2023 15:50:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +P0yGJ3N22N0hAEAauVa8A (envelope-from ) for ; Thu, 02 Feb 2023 15:50:05 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 139D414A79 for ; Thu, 2 Feb 2023 15:50:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNat5-0000bS-3h; Thu, 02 Feb 2023 09:48:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNase-0008SI-9t for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 09:48:04 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNasc-0006w2-96 for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 09:48:03 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pNasX-0007y3-PR for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 15:47:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: PATCH for worg about cb_thunderlink (Re: Link from orgmode file to E-Mail (using kmail or notmuch)) Date: Thu, 2 Feb 2023 21:47:49 +0700 Message-ID: References: <3218434.44csPzL39Z@linux.fritz.box> <21750362.EfDdHjke4D@linux.fritz.box> <939b62c1-34ee-051e-405a-328b841d3d16@gmail.com> <1888293.taCxCBeP46@localhost.localdomain> <63d01412.050a0220.9611.9c4d@mx.google.com> <2d36ea04-4ad9-fcda-a09b-0f9600987ff9@gmail.com> <63d4db30.050a0220.3be9c.a1dc@mx.google.com> <69e4caf6-716d-373d-efb6-3d153f4a1253@gmail.com> <63d9704e.5d0a0220.c3c8c.b45c@mx.google.com> <9011bf51-074e-6d3d-5e29-c0488f2c6c14@gmail.com> <63daaa6a.1c0a0220.16ec9.65c2@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: <63daaa6a.1c0a0220.16ec9.65c2@mx.google.com> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.09, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675349405; a=rsa-sha256; cv=none; b=UcscIn06w8kTO+ZwZ0kzqwVECiczNTeXla6XPTTbE/dXEPflRlKGKBBWtY66bw945DkUNp KyPO1116UL6hE2/W4DUniSc6O41RdLpEru6IukXohIiJ0Om+afxm2ZKaBE3A3vMKGEtGt7 pNu02f62hna/Cs6izv7OGHUuSvg0nUprgI/BuCO6k+1xsleeTt+12UdUFRss/xqQSy2OCe ez9bQfAlc1ULgUusnz/NIIoT+QrqLA5ecJJPWmrN5lDDxjfligBuvbbEWXTb1VWx3RivNZ do+DOLUWQT74MQjGVjSftEoY7yKL9t6fBS26HPa18dI6ANG16FgeIVbfpHd/IA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675349405; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Oh4gicJ3OnezElkBdaGbxlb1+3r23iJwqBUIEnA5v84=; b=sfYwf0ioq6Zj54Q6/mygxjlpyBP3Uj3KQBZgZm5lpCHd6GSwHHgDKm6EuJ6nxHTK+gC354 0OJTzYl11EfGZjjzTrjMzq+U4h6EI+jYg4PqaWyhamoJLnb50WwcBoImEfvxsQurwU4fOp dL7oEnwBsCTySWscg770AELQKwsbSrgqhw7E5waABEQl64HCSgXBeCvZRnWO2CArB4dHAg gIne90CFi37uMdurzrodQBN/E2fGI4zKxqxgsgrHTgr/LTQ+3/R+DGNs+z29DJDZlWkLER zsFgnt+nTlBh2Su+ls9cBFxO+SSQ1f9C+Eb/gY/B3Yka7HOFoq+qDmeTh5tALg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 4.12 X-Spam-Score: 4.12 X-Migadu-Queue-Id: 139D414A79 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) X-TUID: qCpeObNZnR8Y On 02/02/2023 01:16, Bruno Barbier wrote: > Max Nikulin 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. The author suggests to install from github assets instead of official add-on catalog for some reason. Perhaps it is just survived since times when cb_thunderlink was not published yet. >>> +#+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: Thank you for clarification, I forgot about it. >> 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. ... > I'm not using `browse-url' (except for web pages) and I wasn't aware of > `goto-address-mode'. My idea was to push '("\\`mid:" . custom/browse-url-mid) to `browse-url-handlers' having (untested) (defun custom/browse-url-mid (url &optional _ignored) (browse-url (replace-regexp-in-string "\\`mid:" "thunderlink:/message-id=" url))) I am unsure concerning double slash after protocol since host name expected after double slash. At least KDE may try to resolve hostname and to distort URI. I hope, Message-ID never contains characters that may require percent encoding when used in query parameter value. `browse-url-xdg-open' had a lot of revisions before current `call-process' settled inside. It is the reason why I will prefer to avoid explicit calls to `start-process' (alternatives known to me are even worse) and to delegate as much as possible to `browse-url'. >> 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. Since you suggest thunderlink: links instead of built-in mid: (already described in FAQ), I assume that the former approach has some advantage over the latter. Nobody forbids to have several handlers for some protocol and to let user decide which one their prefer, built-in or cb_thunderlink. If cb_thunderlink configures mid: handler then it will become available for configuration at the level of desktop environment.