emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* message:// links
@ 2018-11-10  1:06 Jean-Christophe Helary
  2018-11-10  7:28 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe Helary @ 2018-11-10  1:06 UTC (permalink / raw)
  To: Org-mode

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 ?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: message:// links
  2018-11-10  1:06 message:// links Jean-Christophe Helary
@ 2018-11-10  7:28 ` Nicolas Goaziou
  2018-11-10  9:07   ` Jean-Christophe Helary
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-11-10  7:28 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: Org-mode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: message:// links
  2018-11-10  7:28 ` Nicolas Goaziou
@ 2018-11-10  9:07   ` Jean-Christophe Helary
  0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christophe Helary @ 2018-11-10  9:07 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

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



[-- Attachment #2: Type: text/html, Size: 3232 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-10  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-10  1:06 message:// links Jean-Christophe Helary
2018-11-10  7:28 ` Nicolas Goaziou
2018-11-10  9:07   ` Jean-Christophe Helary

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).