[notmuch] [PATCH] notmuch.el: quote args in notmuch-show to facilitate remote use

Jesse Rosenthal jrosenthal at jhu.edu
Mon Feb 22 13:20:18 PST 2010


The above patch and script don't deal with attachments or inline html,
both of which require (for now) that the mail file be present
locally. That may not be necessary with planned changed to notmuch in
the future.

For the time being, though, you can get attachments and html to work
with over TRAMP, by adding the following to your .emacs
file, which I'm sharing based on the encouragement of some folks on
IRC:

(setq notmuch-command "/script/in/the/above/message")

(setq notmuch-remote-host "you at your.remote.host")

;; tell notmuch-show-get-filename to use TRAMP to open the file

(defadvice notmuch-show-get-filename (around 
				      notmuch-show-get-remote-filename 
				      activate)
  (setq ad-return-value (concat "/ssh:"
				notmuch-remote-host
				":"
				ad-do-it)))

There's an annoying bit of redundancy in the fact that you have to
define your remote server both in the elisp and in the
shell-script. You could possibly extract it from the script if you
wanted to, but that seems like it might be prone to error.

Like the script, this requires password-less login to your ssh server.

You can also speed this up by using an already open connection, using
the ControlMaster feature in openssh.

All best,
Jesse


More information about the notmuch mailing list