Skip to content

Instantly share code, notes, and snippets.

Last active September 6, 2023 09:57
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
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'."
;; Note: org strips "airmail:" from the link URL
(concat "open -a '/Applications/Airmail' airmail:"
(shell-quote-argument url))))
(provide 'org-airmail)
;;; org-airmail.el ends here


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.


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


  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 ...)
Copy link

roryk commented Aug 19, 2020

Thank you for this!

Copy link

Thanks for this!

I just found this today. My emacs tells me that org-add-link-type is deprecated since Org 9.0, so I changed its use to this:

(org-link-set-parameters "airmail" :follow 'org-airmail-open)

Other than that it works out of the box 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment