Org-mode mailing list
 help / color / mirror / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Tim Visher <tim.visher@gmail.com>,
	Emacs Org Mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: How to use `open` to handle `message:*` links on macOS
Date: Fri, 15 Jan 2021 15:12:34 +0100
Message-ID: <2acd022ab06f7f7e2fbe74a6b42d816a@condition-alpha.com> (raw)
In-Reply-To: <CAHa53uyQNLqSRngPLCpfvJbPKi+=5=3uRUO_qhsQtxF3EaV1Kw@mail.gmail.com>

Hello Tim,

Tim Visher <tim.visher@gmail.com> writes:

> [...]
> I'd like to be able to whack `C-c C-o` on `message:*` links on macOS and
> have it call `open` on the contents. Is there a way to make that happen?
>
> My intent is to be able to save a deep link to a Mail.app message in an org
> document.
> [...]

In my setup, I'm using this:
---------------------------- Begin Quote -----------------------------
(org-add-link-type "mac-mail" 'org-mac-mail-link-open)

(defun org-mac-mail-link-open (mid)
  "Visit the email message with message id MID."
  (start-process "open-mail" nil "open" (format "message:%%3C%s%%3E" mid)))
----------------------------- End Quote ------------------------------

It gives me a new link type "mac-mail" for org-insert-link. Copy the
message ID (without the angle brackets) from Mail.app, and insert it as
the link location. This is a manual process, of course, but then I'm not
using it often, and I don't need it for anything else but Mail.app.

org-mac-link as suggested by Diego offers much more convenience by
automating the entire process, and by giving you access to many other
apps, too. So you might prefer that if you are going to use it often.


Hoping to have helped,

  --alex


  parent reply	other threads:[~2021-01-15 14:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 19:44 Tim Visher
2021-01-11 21:57 ` Diego Zamboni
2021-01-15 14:12 ` Alexander Adolf [this message]
2021-04-29 16:21   ` Tim Visher
2021-04-29 16:28     ` Diego Zamboni
2021-04-29 19:37     ` Tim Cross
2021-04-29 21:01       ` Tim Visher
2021-04-29 23:38     ` Alexander Adolf
2021-05-02 20:58       ` Tim Visher
2021-05-06 17:04         ` Alexander Adolf
2021-05-06 17:38           ` Tim Visher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2acd022ab06f7f7e2fbe74a6b42d816a@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tim.visher@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git