From: david@tethera.net
To: notmuch@notmuchmail.org
Cc: David Bremner <bremner@unb.ca>
Subject: [PATCH] notmuch.el: patch notmuch-show to call notmuch show without query-context (i.e. without tag:inbox) if the first query returns nothing.
Date: Thu, 10 Dec 2009 11:14:35 -0400 [thread overview]
Message-ID: <1260458075-12370-1-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1259979997-31544-3-git-send-email-david@tethera.net>
From: David Bremner <bremner@unb.ca>
This fixes the annoying bug of archiving a thread, and then going back
to open it and getting an error. It needs the notmuch-show API
changing patch of 1259979997-31544-3-git-send-email-david@tethera.net.
---
I'm not really expecting Carl to push this patch, because I think he
has a better solution in mind, but in the mean time maybe someone
finds it useful. It is saving my sanity already, since in wanderlust
'a' = reply :).
notmuch.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/notmuch.el b/notmuch.el
index cf472f7..0cd4386 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -997,7 +997,9 @@ matching this search term are shown if non-nil. "
(save-excursion
(let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id))
(args (if query-context (append basic-args (list "and (" query-context ")")) basic-args)))
- (apply 'call-process args))
+ (apply 'call-process args)
+ (when (and (eq (buffer-size) 0) query-context)
+ (apply 'call-process basic-args)))
(notmuch-show-markup-messages)
)
(run-hooks 'notmuch-show-hook)
--
1.6.5.3
next prev parent reply other threads:[~2009-12-10 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 2:26 Patches in support of linking from org-mode david
2009-12-05 2:26 ` [PATCH 1/2] notmuch-search-process-filter: add text properties for authors and subject to each line david
2009-12-05 2:26 ` [PATCH 2/2] notmuch-show: add optional argument for query context instead of using global binding notmuch-search-query-string david
2009-12-10 15:14 ` david [this message]
2009-12-10 18:43 ` Fix viewing of thread after accidentally archiving Carl Worth
2009-12-05 14:05 ` [PATCH] notmuch-show-get-header: new function; return alist of parsed header fields David Bremner
2010-03-09 18:20 ` Patches in support of linking from org-mode Carl Worth
2010-03-09 20:08 ` David Bremner
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://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260458075-12370-1-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=bremner@unb.ca \
--cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).