Bug: ol-notmuch.el: calls `notmuch-show' with arbitrary search query

David Edmondson dme at dme.org
Tue Nov 26 14:52:54 PST 2019


On Tuesday, 2019-11-26 at 14:57:28 -07, Sean Whitton wrote:

> On Tue 26 Nov 2019 at 08:05PM +00, David Edmondson wrote:
>
>> Could you explain how you were using `notmuch-show-thread-id' in a way
>> that was broken by the presence of an arbitrary query?
>
> I've observed that the standard notmuch command
> `notmuch-show-filter-thread' doesn't work in a buffer opened by
> `org-notmuch-follow-link'.

The poor behaviour is just a side effect of the way that queries are
composed to implement the filter functionality. Does the attached patch
help?

> Further, my package 'mailscripts' tries to pass the current value of
> `notmuch-show-thread-id' to notmuch-extract-patch(1).
>
>     https://git.spwhitton.name/mailscripts/tree/mailscripts.el#n72
>
>     https://manpages.debian.org/notmuch-extract-patch
>
> If `notmuch-show-thread-id' contains a query which returns a single
> message, the wrong value is passed to notmuch-extract-patch(1), such
> that it may not extract all of the patches in the thread.

It's not clear to me that this is broken.

notmuch-extract-patch seems to be properly extracting patches from the
messages that match the query.

If the current `notmuch-show' buffer query doesn't match the entire
thread, why should `notmuch-extract-thread-patches' be expected to apply
patches from the whole thread?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: query-composition.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20191126/40d62ce7/attachment.bin>
-------------- next part --------------

dme.
-- 
I can't explain, you would not understand. This is not how I am.


More information about the notmuch mailing list