unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/1] emacs: Make notmuch-show-next-thread return nil on failure
@ 2022-04-28 10:12 Leo
  2022-04-28 10:12 ` [PATCH 1/1] " Leo
  0 siblings, 1 reply; 7+ messages in thread
From: Leo @ 2022-04-28 10:12 UTC (permalink / raw)
  To: notmuch; +Cc: Leo Okawa Ericson

From: Leo Okawa Ericson <git@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.GV3165@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-02 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 10:12 [PATCH 0/1] emacs: Make notmuch-show-next-thread return nil on failure Leo
2022-04-28 10:12 ` [PATCH 1/1] " Leo
2022-04-29 13:59   ` Tomi Ollila
2022-04-29 16:39     ` Leo Okawa Ericson
2022-04-30 16:18       ` David Bremner
2022-04-30 16:41   ` David Bremner
2022-05-02 16:50     ` Leo Okawa Ericson

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).