Skip to content

Instantly share code, notes, and snippets.

@chuckf
Forked from ephsmith/org-airmail.el
Created August 11, 2020 13:40
Show Gist options
  • Save chuckf/e511b0078e38a3457e91882363e49766 to your computer and use it in GitHub Desktop.
Save chuckf/e511b0078e38a3457e91882363e49766 to your computer and use it in GitHub Desktop.
org-airmail.el adds an org-hyperlink handler for Airmail email URLs
;;; org-airmail.el - Support for links to Airmail 3 messages in Org
(require 'org)
(org-add-link-type "airmail" 'org-airmail-open)
(defun org-airmail-open (url)
"Visit the Airmail message referenced by URL.
URL should be a vaid Airmail message url retrieved from Airmail with
'Copy Message Link'."
(shell-command
;; Note: org strips "airmail:" from the link URL
(concat "open -a '/Applications/Airmail 3.app' airmail:"
(shell-quote-argument url))))
(provide 'org-airmail)
;;; org-airmail.el ends here

Description

If you’re an Airmail 3 user, this provides the ability to link to an Airmail email within an org document. This Gist uses the orgmode mechanism for adding additional hyperlink types.

Installation

Save the file to your Emacs load-path and add (require 'org-airmail) to your Emacs init file.

Usage

  1. Copy and Airmail message link in Airmail (Edit-> Copy Message Link).
  2. Insert the link into an orgmode file just as you would any other (C-c C-l ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment