Re: [PATCH v2 4/6] emacs: add optional predicate arg to `notmuch-show-mapc'

Subject: Re: [PATCH v2 4/6] emacs: add optional predicate arg to `notmuch-show-mapc'

Date: Mon, 15 Oct 2012 22:59:27 -0400

To: Mark Walters, Pieter Praet, David Bremner, Dmitry Kurochkin

Cc: Notmuch Mail

From: Ethan Glasser-Camp


Mark Walters <markwalters1009@gmail.com> writes:

> The original function feels a little fragile to me as to what happens if
> predicate or function move point. Eg what happens if function collapses
> the message: where does point go, and so where does
> notmuch-show-goto-message-next go. Is this just my naivete as a lisp
> beginner? Is there someway of writing it so the user doesn't need to
> worry about such things?

Although collapsing the message doesn't seem to move point, it would
probably be a good idea to wrap the calls to predicate and function in
save-excursion, as a guard against subtle and hard-to-spot bugs with
operations not being applied to all the right messages..

Ethan

Thread: