1 ;; standard org <-> remember stuff, RTFM
4 (setq org-default-notes-file "~/org/gtd.org")
6 (setq org-capture-templates
11 (file+headline "~/org/gtd.org" "Incoming")
12 "* TODO %^{Title}\n\n Source: %u, %c\n\n %i"
14 ;; ... more templates here ...
16 ;; ensure that emacsclient will show just the note to be edited when invoked
17 ;; from Mutt, and that it will shut down emacsclient once finished;
18 ;; fallback to legacy behavior when not invoked via org-protocol.
19 (add-hook 'org-capture-mode-hook 'delete-other-windows)
20 (setq my-org-protocol-flag nil)
21 (defadvice org-capture-finalize (after delete-frame-at-end activate)
22 "Delete frame at remember finalization"
23 (progn (if my-org-protocol-flag (delete-frame))
24 (setq my-org-protocol-flag nil)))
25 (defadvice org-capture-kill (after delete-frame-at-end activate)
26 "Delete frame at remember abort"
27 (progn (if my-org-protocol-flag (delete-frame))
28 (setq my-org-protocol-flag nil)))
29 (defadvice org-protocol-capture (before set-org-protocol-flag activate)
30 (setq my-org-protocol-flag t))
32 (defun open-mail-in-mutt (message)
33 "Open a mail message in Mutt, using an external terminal.
35 Message can be specified either by a path pointing inside a
36 Maildir, or by Message-ID."
37 (interactive "MPath or Message-ID: ")
39 (format "gnome-terminal -e \"%s %s\""
40 (substitute-in-file-name "$HOME/bin/mutt-open") message)))
42 ;; add support for "mutt:ID" links
43 (org-add-link-type "mutt" 'open-mail-in-mutt)