From: Leo Okawa Ericson <git@relevant-information.com>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/1] emacs: Make notmuch-show-next-thread return nil on failure
Date: Mon, 02 May 2022 18:50:10 +0200 [thread overview]
Message-ID: <87bkwfubel.fsf@relevant-information.com> (raw)
In-Reply-To: <87v8uqh6c3.fsf@tethera.net>
David Bremner <david@tethera.net> writes:
> Leo <git@relevant-information.com> writes:
>
>> From: Leo Okawa Ericson <git@relevant-information.com>
>>
>> Having notmuch-show-next-thread return non-nil on success and nil on
>> failure makes it easier for users to interact with notmuch via elisp.
>
> You talk about notmuch-show-next-thread, but you seem to be modifying
> notmuch-search-show-thread. That actually seems like a bit of a strange
> function to invoke programatically, since it deduces the argument from
> the current buffer. It might be better for your code to call
> notmuch-show directly, since notmuch-search-show-thread is pretty tied
> to the internals of notmuch-search-mode.
>
I mentioned this in the reroll of the patch, but I modified
notmuch-search-show-thread because the return value of
notmuch-show-next-thread depends on it. In case this is an XY
problem[1], what I want is the ability to go through each email in the
search buffer (like notmuch-show-next-thread does), and when there are
no more messages left I want to call a function. Changing
notmuch-search-show-thread (and thereby notmuch-show-next-thread),
seemed to be the least intrusive way to do it.
[1] https://en.wikipedia.org/wiki/XY_problem
/Leo
prev parent reply other threads:[~2022-05-02 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkwfubel.fsf@relevant-information.com \
--to=git@relevant-information.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).