emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use `open` to handle `message:*` links on macOS


From: Alexander Adolf
Subject: Re: How to use `open` to handle `message:*` links on macOS
Date: Fri, 15 Jan 2021 15:12:34 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]