[PATCH] emacs: Helpers for notmuch developers.

David Bremner david at tethera.net
Thu Jan 5 19:39:30 PST 2012


On Wed,  4 Jan 2012 14:01:18 +0000, David Edmondson <dme at dme.org> wrote:
> ---
> 
> I've been using this for a few days and decided to share it to get
> feedback. Reviewing patches can be tedious, so I tried to make things
> a little simpler.
> 

I didn't have a very thorough look at the code, but I like the
functionality. Especially hitting q a few times from magit and being in
the right place to reply.

> General management (i.e. keeping up to date) of the repository it uses
> is your responsibility, as is cleaning out old branches. You can, of
> course, just delete the temporary repository after using it - the code
> will re-create it next time.

maybe the branches could be under some namespace that makes this easy?

> +(defvar notmuch-dev-temporary-repository-name (concat "notmuch-dev-" (user-login-name))
> +  "The name of the temporary repository.")

Do we care about security at all in this context? I'm always a bit
nervous about creating predictably named files/directories in publicly
writable places.

> +  ;; Causes us to switch to the magit buffer - is that unfortunate in
> +  ;; some situations?
> +  (magit-status notmuch-dev-temporary-repository-path))

I found it to be a pleasant surprise.

> +      (shell-command
> +       (concat
> +	notmuch-command " show --format=mbox " (shell-quote-argument search-terms)
> +	" | "
> +	"git am --quiet"))
> +

Hmm. A knee jerk reaction is not to like this, like seeing system in C
code. But I don't have a better solution off hand.

d


More information about the notmuch mailing list