From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe Helary Subject: Re: message:// links Date: Sat, 10 Nov 2018 18:07:43 +0900 Message-ID: <597726E4-9D7A-427F-BB31-F4E2E0BD12F5@gmail.com> References: <5E03A38D-43F7-4523-ABC5-9CB7B2D3147C@gmail.com> <87a7mhcrwk.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_F706557E-CCE0-493D-AACD-EC1C95C43440" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLPIu-0000zL-J0 for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 04:11:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLPFh-00017s-Kf for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 04:08:31 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:44492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLPFh-00012q-32 for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 04:08:25 -0500 Received: by mail-pg1-x531.google.com with SMTP id w3-v6so1876923pgs.11 for ; Sat, 10 Nov 2018 01:08:25 -0800 (PST) Received: from [192.168.1.11] (pl16832.ag0304.nttpc.ne.jp. [128.53.251.192]) by smtp.gmail.com with ESMTPSA id v189-v6sm11070747pfb.54.2018.11.10.01.08.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Nov 2018 01:08:22 -0800 (PST) In-Reply-To: <87a7mhcrwk.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org-mode --Apple-Mail=_F706557E-CCE0-493D-AACD-EC1C95C43440 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Thank you Nicolas. Jean-Christophe > On Nov 10, 2018, at 16:28, Nicolas Goaziou wrote: > > Hello, > > Jean-Christophe Helary writes: > >> I'm pasting a message:// link into an org-mode file but it fails to be >> recognized as a link that should open in a mail client. >> >> What is a simple way to have org-mode recognize such links ? > > One simple way is to define "message:" as an alias for "mailto:", which > is the Org syntax for such links. This is done with > `org-link-abbrev-alist' variable, or in-buffer "LINK" keyword: > > (setq org-link-abbrev-alist '(("message" . "mailto"))) > > One drawback is that you cannot write plain links with abbreviations. So > [[message:foo@bar.baz]] works, but message:@foo@bar.baz does not. > > If that is an issue, you can also define a new link with > `org-link-set-parameters': > > (org-link-set-parameters "message" > :follow (lambda (path) (browse-url (concat "mailto:" path)))) > > HTH, > > Regards, > > -- > Nicolas Goaziou Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_F706557E-CCE0-493D-AACD-EC1C95C43440 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Thank= you Nicolas.

Jean-Christophe 

On Nov = 10, 2018, at 16:28, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Hello,

Jean-Christophe Helary = <brandelune@gmail.com> writes:

I'm pasting a message:// = link into an org-mode file but it fails to be
recognized = as a link that should open in a mail client.

What is a simple way to have org-mode recognize such links = ?

One simple way is to define = "message:" as an alias for "mailto:", which
is the Org = syntax for such links.  This is done with
`org-link-abbrev-alist' variable, or in-buffer "LINK" = keyword:

 (setq org-link-abbrev-alist = '(("message" . "mailto")))

One drawback is = that you cannot write plain links with abbreviations. So
[[message:foo@bar.baz]] works, but message:@foo@bar.baz does not.

If that is an issue, you can also define a new = link with
`org-link-set-parameters':

   (org-link-set-parameters "message"
    :follow (lambda (path) (browse-url = (concat "mailto:" path))))

HTH,

Regards,

--
Nicolas Goaziou

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


= --Apple-Mail=_F706557E-CCE0-493D-AACD-EC1C95C43440--