From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qHSODn3722PqYgEAbAwnHQ (envelope-from ) for ; Thu, 02 Feb 2023 19:05:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +B+TDn3722P0bwEAauVa8A (envelope-from ) for ; Thu, 02 Feb 2023 19:05:49 +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 EC2171917F for ; Thu, 2 Feb 2023 19:05:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNdxD-0000mz-K4; Thu, 02 Feb 2023 13:05:00 -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 1pNdxC-0000mn-Ms for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 13:04:58 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNdxB-0006O6-0H for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 13:04:58 -0500 Received: by mail-wm1-x330.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so4337283wma.1 for ; Thu, 02 Feb 2023 10:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5f9utQhMm1tpgqj4xezjd6Y3jEZp6sOXT9uGfwbFbBU=; b=iA8NSb89nztb+ZAwgmMieBsweCNMiDvv+BvkbQEBjkFsX98oXeEvh0U799eTTSmTZH izM0YV15UIcgQ/54/t3HW7UbIGF1FASaRp1YL8GKHJkbIqtLSFdmzb/BiRfCVVhCleP3 En4opPBc2EwkCG/tixS9vjSzeuBZsz1PvShGTh8I1hsK/2xAjbKs1TZKcTxYuXw3zCgh mVfEMyyEP34xV3NB7GX8WzLs170OWbZEvP5skUHRdk9yKfW5ydyRx9zyrUBMWBFRGuXb 2fNfw5LO16n1aAFP+Suswv/Avp7uEU6aMuB1n8mQ0OnlAQBNT7yPcaCo7vjL9qOPfhaT tmyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5f9utQhMm1tpgqj4xezjd6Y3jEZp6sOXT9uGfwbFbBU=; b=Ys8ZiqyxsBflisSuU2RQjBR8PAyY+pMozuaZLZSPlGp1ZuojqACnxBSUaazU6kacnm M3Ow9SQ4TfpdTiucJvbIVCzEiJDOzmnlJBt+l9od50TB3rLTXwVpOWQYCL99oNcRt5h2 iLo2aW8OyAU8zMbZ7Qw8D1PWmdEIiA9gh41s3DnjH3JOHDgdrZjYp5LOf+lf8mbcupql 8K7ep3BUjs4gnjY06txMothBuWK5dU9w/NrWoA4k76kYLPOAOx+EeOtLMME+nt+MesR1 KhqTu3hQoBhEO8V5gRPYA2fnanRKghNdlWygIIi2fY/42T3kVpPYXV0BMZkMLg3p6iqO oh7Q== X-Gm-Message-State: AO0yUKUI1diB5pKXVAdczaWtZz2hDC6rQgNRNJPbQbz5zh5RsGTGLfun Y5477/aLE36CTKKprl6w/JE= X-Google-Smtp-Source: AK7set/6EDbD1nhnWB6NkRhJ+9iVvwnBBd5emKZwKywWO42spLfERvvxhYB/XYzLspKEP4ZqZW1g4g== X-Received: by 2002:a05:600c:540e:b0:3dc:433a:e952 with SMTP id he14-20020a05600c540e00b003dc433ae952mr6978834wmb.33.1675361094922; Thu, 02 Feb 2023 10:04:54 -0800 (PST) Received: from tosh-laptop ([2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp.gmail.com with ESMTPSA id b13-20020a5d40cd000000b00236883f2f5csm87444wrq.94.2023.02.02.10.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:04:54 -0800 (PST) Message-ID: <63dbfb46.5d0a0220.5c1cb.0653@mx.google.com> Received: by tosh-laptop (sSMTP sendmail emulation); Thu, 02 Feb 2023 07:04:18 +0100 From: Bruno Barbier To: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: PATCH for worg about cb_thunderlink (Re: Link from orgmode file to E-Mail (using kmail or notmuch)) In-Reply-To: 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> Date: Thu, 02 Feb 2023 07:04:17 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-TUID: DY91r1QV/XRa --=-=-= Content-Type: text/plain Hi Max, Max Nikulin writes: > 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. My new version instructs to install the add-on from Thunderbird, with no OS installation. It's simpler and safer. > > 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'. My new version instructs to use standard "mid:" by just running Thunderbird. > Since you suggest thunderlink: links instead of built-in mid: I didn't realize that Thunderbird allows to open "mid:". I've simplified the method. I'm now using =cb_thunderlink= just to answer the following question, that currently is on the wiki page: you need to copy the value of the Message-ID header, it should be possible with some add-on. i.e. cb_thunderlink allows to build a full org link (link + description). As it's still not clear to me how to configure browse-url, I'm still relying on start-process. See a new version of the patch. Bruno --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-org-faq-links-with-thunderbird-Add-cb_thunderlink.patch Content-Description: worg-faq: cb_thunderlink >From 89cef9d7acd85828ddfbb1375fac1e805bd03cea Mon Sep 17 00:00:00 2001 From: Bruno BARBIER Date: Tue, 31 Jan 2023 20:33:22 +0100 Subject: [PATCH] org-faq: links with thunderbird: Add cb_thunderlink --- org-faq.org | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/org-faq.org b/org-faq.org index 0410d368..4c2d0c8f 100644 --- a/org-faq.org +++ b/org-faq.org @@ -2051,6 +2051,42 @@ so the following recipe is obsolete: Notice that this link uses Message-ID to reference a particular message as well. +*** Using the =cb_thunderlink= add-on +The add-on =cb_thunderlink= for Thunderbird allows to generate direct +links from emails inside Thunderbird. You can then teach org to repon +these links. + + 1. In Thunderbird, install the =cb_thunderlink= add-on. + + 2. In the options page of the =cb_thunderlink= add-on, add a new link + type, name it =org= with the following value: + + #+begin_example + [[mid:$msgid$][$author_name$: $subject$ ($date_iso$)]] + #+end_example + + 3. In your emacs init file, add the following lines: + #+begin_src elisp + (defvar thunderbird-app nil + "The absolute path to your thunderbird application.") + + (defun thunderbird-message-with-id (message-id) + "Open the given email. MESSAGE-ID is the message id." + (start-process "thunderbird" " *thunderbird*" + thunderbird-app + (concat "mid:" message-id))) + + (org-link-set-parameters "mid" :follow 'thunderbird-open-message-with-id) + #+end_src + + +In Thunderbird, to copy a link to an email into the clipboard, open +the contextual menu, click the =cb_thunderlink= entry and choose the +entry named =org=. Then paste the link in your org file, and, click it +to re-open the email. + + + * Plain Lists :PROPERTIES: :CUSTOM_ID: Plain-Lists -- 2.39.1 --=-=-=--