[PATCH] emacs: fix a bug introduced by the recent search cleanups.
amdragon at MIT.EDU
Thu Aug 2 07:22:14 PDT 2012
On Thu, 02 Aug 2012, Mark Walters <markwalters1009 at gmail.com> wrote:
> In commit 5d0883e the function notmuch-search-next-thread was changed.
> In particular it only goes to the next message if there is a next
> message. This breaks notmuch-show-archive-thread-then-next. Fix this
> by going to the "next" message whenever we are on a current message.
>> On Sat, 21 Jul 2012, Austin Clements <amdragon at MIT.EDU> wrote:
>>> At this point, the only remaining functions that don't support
>>> multi-line search result formats are the thread navigation functions.
>>> This patch fixes that by rewriting them in terms of
>>> This changes the behavior of notmuch-search-previous-thread slightly
>>> so that if point isn't at the beginning of a result, it first moves
>>> point to the beginning of the result.
>> Hi Austin, bisecting suggests this patch (committed as 5d0883e) breaks
>> notmuch-show-archive-thread-then-next and subsequently
>> notmuch-show-advance-and-archive for me. When showing the last thread in
>> the search results, notmuch-show-archive-thread-then-next used to exit
>> to the end of the search buffer. Now it redisplays the current
>> thread. When I hit SPC to cruise through mails, there's no indication
>> that I've reached the end of search results, other than the same thread
>> being displayed over and over.
> This might be the correct fix but I am not certain. It doesn't instantly
> break for me! (It looks more similar to what happened before the parent
LGTM. Technically this is still different from the old code, since it
won't move forward once point is on the "End of search results" line. I
can't imagine anything actually depending on that (maybe something that
loops until eobp?), but if we want to be paranoid, we could
> Best wishes
> emacs/notmuch.el | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index fd1836f..d2d82a9 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -293,7 +293,7 @@ For a mouse binding, return nil."
> (defun notmuch-search-next-thread ()
> "Select the next thread in the search results."
> - (when (notmuch-search-get-result (notmuch-search-result-end))
> + (when (notmuch-search-get-result)
> (goto-char (notmuch-search-result-end))))
> (defun notmuch-search-previous-thread ()
More information about the notmuch