[PATCH] emacs: fix a bug introduced by the recent search cleanups.

Jani Nikula jani at nikula.org
Thu Aug 2 00:59:27 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.

Works for me,
J.


> ---
>
>> 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
>>> notmuch-search-result-{beginning,end}.
>>>
>>> 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
> patch.)
>
> Best wishes
>
> Mark
>
>
>  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."
>    (interactive)
> -  (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 ()
> -- 
> 1.7.9.1


More information about the notmuch mailing list