summaryrefslogtreecommitdiffhomepage
path: root/net/jao-osx-mail.el
blob: 8b9efda556a225557a88ec53cdcf5f84626b6af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(defun jao--gnus-message-id ()
  (require 'org-gnus)
  (let ((header (with-current-buffer gnus-summary-buffer
                  (gnus-summary-article-header))))
    (and header (org-remove-angle-brackets (mail-header-id header)))))

(defun jao-gnus-open-in-mail ()
  (interactive)
  (let ((id (jao--gnus-message-id)))
    (unless id (error "no message selected"))
    (shell-command-to-string (format "open 'message:<%s>'" id))))

(provide 'jao-osx-mail)