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

Sean Whitton spwhitton at spwhitton.name
Fri Nov 29 12:01:00 PST 2019


Dear David,

Thank you again for your interest.

On Wed 27 Nov 2019 at 08:52PM +00, David Edmondson wrote:

> If this does what I think, which is to filter the current thread to show
> only those messages that contain actual patches (with an optional
> version number), then, with the previous patch I sent, it seems to work
> just fine for me if the original `notmuch-show' query is something like
> “thread:a or thread:b”, where those threads both contain both patches
> and comments on the patches.
>
> An example call I used initially is:
>
> (notmuch-show "thread:{id:20191117222929.1064-1-jb55 at jb55.com} or thread:{id:20190419035659.28961-1-congdanhqx at gmail.com}")
>
> Hopefully this is a query that will work for you as well. Limiting this
> using your function behaves as I would expect.

I don't have those messages, I'm afraid.

> It's a lot to ask, I know, but if you could provide a specific set of
> messages with a corresponding initial query that fails for you after
> limiting using your function, it would be helpful.

You should be able to download an mbox of the thread I was using for
testing here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945195;mbox=yes

The Org-mode link I was using to open the thread is
[[notmuch:id:20191125214551.31596-1-dkg at fifthhorseman.net][dkg's v2 for S/MIME decryption]]

Please excuse me for not preparing more formal steps to reproduce --
since I consider the bug to be in ol-notmuch.el and my fix to that file
prevents this bug from showing up, I am not really willing to invest a
lot of time in preparing a different sort of fix.

>>>> The purpose of `notmuch-extract-thread-patches' is to extract a whole
>>>> git-send-email(1) patch series at a time, because that is usually what
>>>> one wants to do.  There are `notmuch-extract-message-patches' and
>>>> `notmuch-show-pipe-message' for single patches.
>>>
>>> Then I think the approach that you have (wrapping the query in
>>> thread:{}) makes perfect sense.
>>
>> To my mind, it makes sense only to the extent that committing hacky
>> workarounds is something which makes sense :)
>
> Well, if we stick to the idea that the first argument to `notmuch-show'
> can only be a thread ID, then yes.
>
> Given that thread IDs have some annoying properties, it would be
> convenient to allow the caller to pass an arbitrary query.

Yes, I certainly agree that it would be a more useful API.

-- 
Sean Whitton


More information about the notmuch mailing list