]> git.donarmstrong.com Git - emacs.git/commitdiff
add commands to open mail in mutt
authorDon Armstrong <don@donarmstrong.com>
Mon, 11 Mar 2013 22:24:43 +0000 (15:24 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 11 Mar 2013 22:24:43 +0000 (15:24 -0700)
.emacs

diff --git a/.emacs b/.emacs
index 33d68dc981d2544da6ce05da583851a905562ab6..e3cc107610e4d116220fdc765ec78eeb8af8fea4 100644 (file)
--- a/.emacs
+++ b/.emacs
 (defadvice org-protocol-capture (before set-org-protocol-flag activate)
   (setq my-org-protocol-flag t))
 
 (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$" . 
 (global-set-key "\C-xp" 'server-edit)
 
 (setq-default auto-mode-alist (cons '("\.wml$" .