From: Leo Okawa Ericson <g...@relevant-information.com>

Hello,

First some context on why I personally want this change.  I am
developing a package that allows users to interact with notmuch in a
specific way.  In particular, I need to know when
notmuch-show-next-thread succeeds or fails (there are no more messages
for this query).  See [1] for how I'm currently using notmuch.

I've implemented that change in this patch.  I've tested it manually,
but didn't understand how to make the test I wrote to work properly, so
I haven't included that in the patch.

Here is a basic test I tried to write in test/T450-emacs-show.sh, but
the first "assert" fails.

> test_begin_subtest "notmuch-search-show-thread returns non-nil on success"
> test_emacs_expect_t  '(notmuch-search 
> "id:20091117203301.gv3...@dottiness.seas.harvard.edu")
>       (unless (notmuch-search-show-thread)
>           (error "Expected non-nil when successfully showing a thread"))
>       (when (notmuch-show-next-thread)
>         (error "Expected nil when there are no more threads"))
> t'


[1] 
https://git.sr.ht/~zetagon/el-secretario/tree/ab0572477ab2bdb2364256dd884555b052705659/item/el-secretario-notmuch.el#L109


Leo Okawa Ericson (1):
  emacs: Make notmuch-show-next-thread return nil on failure

 emacs/notmuch.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)


base-commit: e3ad0087f3453c89871acac8b11da8bab1ac54df
-- 
2.36.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to