[PATCH] doc/sexp-queries: escape @ in non-verbatim text
This prevents sphinx-doc from creating spurious mailto: links. Thanks to Jakub Wilk for telling me about the fix. --- doc/man7/notmuch-sexp-queries.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst index bc8e5086..0eb86734 100644 --- a/doc/man7/notmuch-sexp-queries.rst +++ b/doc/man7/notmuch-sexp-queries.rst @@ -230,11 +230,11 @@ EXAMPLES ``(folder (of (id 1234@invalid)))`` -Match any message in the same folder as the one with Message-Id "1234@invalid" +Match any message in the same folder as the one with Message-Id "1234\@invalid" ``(id 1234@invalid blah@test)`` -Matches Message-Id "1234@invalid" *or* Message-Id "blah@test" +Matches Message-Id "1234\@invalid" *or* Message-Id "blah\@test" ``(and (infix "date:2009-11-18..2009-11-18") (tag unread))`` @@ -260,18 +260,18 @@ EXAMPLES ``(thread (of (id 1234@invalid)))`` -Match any message in the same thread as the one with Message-Id "1234@invalid" +Match any message in the same thread as the one with Message-Id "1234\@invalid" ``(thread (matching (from b...@example.com) (to b...@example.com)))`` Match any (messages in) a thread containing a message from -"b...@example.com" and a (possibly distinct) message to "bob at +"bob\@example.com" and a (possibly distinct) message to "bob at example.com") ``(to (or b...@example.com mall...@example.org))`` ``(or (to b...@example.com) (to mall...@example.org))`` -Match in the "To" or "Cc" headers, "b...@example.com", -"mall...@example.org", and also "b...@example.com.au" since it +Match in the "To" or "Cc" headers, "bob\@example.com", +"mallory\@example.org", and also "bob\@example.com.au" since it contains the adjacent triple "bob", "example", "com". ``(not (to *))`` -- 2.35.2 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH 1/1] emacs: Make notmuch-show-next-thread return nil on failure
From: Leo Okawa Ericson 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. --- emacs/notmuch.el | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c9cf80dc..a6198f4e 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -525,14 +525,15 @@ (defun notmuch-search-show-thread (&optional elide-toggle) (let ((thread-id (notmuch-search-find-thread-id))) (if thread-id (notmuch-show thread-id - elide-toggle - (current-buffer) - notmuch-search-query-string - ;; Name the buffer based on the subject. - (format "*%s*" (truncate-string-to-width - (notmuch-search-find-subject) - 30 nil nil t))) - (message "End of search results." + elide-toggle + (current-buffer) + notmuch-search-query-string + ;; Name the buffer based on the subject. + (format "*%s*" (truncate-string-to-width + (notmuch-search-find-subject) + 30 nil nil t))) + (message "End of search results.") + nil))) (defun notmuch-tree-from-search-current-query () "Tree view of current query." -- 2.36.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH 0/1] emacs: Make notmuch-show-next-thread return nil on failure
From: Leo Okawa Ericson Hello, First some context on why I personally want this change. I am developing a package that allows users to interact with notmuch in a specific way. In particular, I need to know when notmuch-show-next-thread succeeds or fails (there are no more messages for this query). See [1] for how I'm currently using notmuch. I've implemented that change in this patch. I've tested it manually, but didn't understand how to make the test I wrote to work properly, so I haven't included that in the patch. Here is a basic test I tried to write in test/T450-emacs-show.sh, but the first "assert" fails. > test_begin_subtest "notmuch-search-show-thread returns non-nil on success" > test_emacs_expect_t '(notmuch-search > "id:20091117203301.gv3...@dottiness.seas.harvard.edu") > (unless (notmuch-search-show-thread) > (error "Expected non-nil when successfully showing a thread")) > (when (notmuch-show-next-thread) > (error "Expected nil when there are no more threads")) > t' [1] https://git.sr.ht/~zetagon/el-secretario/tree/ab0572477ab2bdb2364256dd884555b052705659/item/el-secretario-notmuch.el#L109 Leo Okawa Ericson (1): emacs: Make notmuch-show-next-thread return nil on failure emacs/notmuch.el | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) base-commit: e3ad0087f3453c89871acac8b11da8bab1ac54df -- 2.36.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org