From daefca068baff31e0fb280d6232e7965345e0054 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 11 Mar 2013 15:24:43 -0700 Subject: [PATCH] add commands to open mail in mutt --- .emacs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.emacs b/.emacs index 33d68dc..e3cc107 100644 --- a/.emacs +++ b/.emacs @@ -169,6 +169,22 @@ (defadvice org-protocol-capture (before set-org-protocol-flag activate) (setq my-org-protocol-flag t)) + +; this comes from http://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/ +(defun open-mail-in-mutt (message) + "Open a mail message in Mutt, using an external terminal. + +Message can be specified either by a path pointing inside a +Maildir, or by Message-ID." + (interactive "MPath or Message-ID: ") + (shell-command + (format "xterm -e \"%s %s\"" + (substitute-in-file-name "$HOME/bin/mutt_open") message))) + +;; add support for "mutt:ID" links +(org-add-link-type "mutt" 'open-mail-in-mutt) + + (global-set-key "\C-xp" 'server-edit) (setq-default auto-mode-alist (cons '("\.wml$" . -- 2.39.2