From: David Edmondson <dme-zDQXUQW/Few@public.gmane.org>
To: Sean Whitton <spwhitton-PEZ64Ft4C9UnzZ6mRAm98g@public.gmane.org>,
emacs-orgmode-mXXj517/zsQ@public.gmane.org
Cc: notmuch-gxuj+Tv9EO5zyzON3hdc1g@public.gmane.org
Subject: Re: Bug: ol-notmuch.el: calls `notmuch-show' with arbitrary search query
Date: Tue, 26 Nov 2019 22:52:54 +0000 [thread overview]
Message-ID: <m2zhgi8d2x.fsf@dme.org> (raw)
In-Reply-To: <87r21u1et3.fsf-TDhmT+1V6bdypu2/aTzxt1aTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]
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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: query-composition.patch --]
[-- Type: text/x-patch, Size: 537 bytes --]
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index e13ca3d7..ecbc03d2 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1311,7 +1311,7 @@ and THREAD. The next query is THREAD alone, and serves as a
fallback if the prior matches no messages."
(let (queries)
(push (list thread) queries)
- (if context (push (list thread "and (" context ")") queries))
+ (if context (push (list "(" thread ") and (" context ")") queries))
queries))
(defun notmuch-show--build-buffer (&optional state)
[-- Attachment #3: Type: text/plain, Size: 75 bytes --]
dme.
--
I can't explain, you would not understand. This is not how I am.
[-- Attachment #4: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2019-11-26 22:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 21:37 Bug: ol-notmuch.el: calls `notmuch-show' with arbitrary search query Sean Whitton
[not found] ` <87h82wrjvb.fsf-TDhmT+1V6bdypu2/aTzxt1aTQe2KTcn/@public.gmane.org>
2019-11-26 17:41 ` Sean Whitton
2019-11-26 19:17 ` racin
[not found] ` <1630223474.433436589.1574795847430.JavaMail.zimbra-GANU6spQydw@public.gmane.org>
2019-11-26 21:52 ` Sean Whitton
2019-11-26 20:05 ` David Edmondson
[not found] ` <m24kyq9ze8.fsf-zDQXUQW/Few@public.gmane.org>
2019-11-26 21:57 ` Sean Whitton
[not found] ` <87r21u1et3.fsf-TDhmT+1V6bdypu2/aTzxt1aTQe2KTcn/@public.gmane.org>
2019-11-26 22:52 ` David Edmondson [this message]
[not found] ` <m2zhgi8d2x.fsf-zDQXUQW/Few@public.gmane.org>
2019-11-26 23:25 ` Sean Whitton
[not found] ` <875zj61aqe.fsf-TDhmT+1V6bdypu2/aTzxt1aTQe2KTcn/@public.gmane.org>
2019-11-27 13:08 ` David Edmondson
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://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zhgi8d2x.fsf@dme.org \
--to=dme-zdqxuqw/few@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
--cc=notmuch-gxuj+Tv9EO5zyzON3hdc1g@public.gmane.org \
--cc=spwhitton-PEZ64Ft4C9UnzZ6mRAm98g@public.gmane.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://git.savannah.gnu.org/cgit/emacs/org-mode.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).