Re: [PATCH] emacs: add new option notmuch-search-exclude

Subject: Re: [PATCH] emacs: add new option notmuch-search-exclude

Date: Thu, 23 Dec 2021 20:33:35 -0400

To: Mohsin Kaleem, notmuch@notmuchmail.org

Cc:

From: David Bremner


Mohsin Kaleem <mohkale@kisara.moe> writes:

> The new notmuch-search-exclude option allows users to configure whether
> to show or hide excluded messages (as determined by search.exclude_tags
> in the local config file). It defaults to true for now to maintain
> backwards-compatibility with how notmuch-{search,tree} already worked.

Thanks, this seems like a nice feature.

>
> New commands notmuch-search-toggle-exclude and notmuch-tree-toggle-exclude
> have also been added that toggle the value of notmuch-search-exclude for
> the search in the current search or tree buffer. It's bound to "i" in
> the respective keymaps for these modes.

Seems reasonable, since 'e' is already taken in tree mode. Can you
update the file devel/emacs-keybindings.org so we don't lose track of
the bindings. Also, per the contributing guide [1], please add some brief
documentation to the emacs docs in doc/notmuch-emacs.rst

> Lastly I've amended some calls to notmuch-tree and notmuch-unthreaded
> which didn't pass through the buffer local value of
> notmuch-search-oldest-first (and now notmuch-search-exclude).
> Examples of where I've done this
>   + include notmuch-jump-search
>   + notmuch-tree-from-search-current-query
>   + notmuch-unthreaded-from-search-current-query
>   + notmuch-tree-from-search-thread
>
> If there was a reasoning behind these not persisting the value of these
> variables then we should revert it before merging and discuss whether
> it's worth persisting notmuch-search-exclude.

Whether or not this is the right thing to do, something seems to have
broken the test suite. Perhaps after you fix the test suite, the answer
will be more clear? Or perhaps not, then we can revisit the question.

Also, we need at least one new test (ideally one per mode). There should
be some tests you can crib from in T310-emacs.sh and T450-emacs-show.sh.
In particular it is perfectly acceptable to call the toggle function
directly rather than trying to fake keystrokes.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: