1 Return-Path: <bremner@pivot.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id F21DB431FBC
\r
6 for <notmuch@notmuchmail.org>; Thu, 10 Dec 2009 07:15:07 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id T3Crt5EEOeBO for <notmuch@notmuchmail.org>;
\r
11 Thu, 10 Dec 2009 07:15:07 -0800 (PST)
\r
12 Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57])
\r
13 by olra.theworths.org (Postfix) with ESMTP id 11A06431FAE
\r
14 for <notmuch@notmuchmail.org>; Thu, 10 Dec 2009 07:15:07 -0800 (PST)
\r
16 fctnnbsc30w-142167182194.pppoe-dynamic.high-speed.nb.bellaliant.net
\r
17 ([142.167.182.194] helo=localhost)
\r
18 by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)
\r
19 (Exim 4.69) (envelope-from <bremner@pivot.cs.unb.ca>)
\r
20 id 1NIkjS-0006yg-1T; Thu, 10 Dec 2009 11:15:06 -0400
\r
21 Received: from bremner by localhost with local (Exim 4.69)
\r
22 (envelope-from <bremner@pivot.cs.unb.ca>)
\r
23 id 1NIkjM-0003Fv-OA; Thu, 10 Dec 2009 11:15:00 -0400
\r
24 From: david@tethera.net
\r
25 To: notmuch@notmuchmail.org
\r
26 Date: Thu, 10 Dec 2009 11:14:35 -0400
\r
27 Message-Id: <1260458075-12370-1-git-send-email-david@tethera.net>
\r
28 X-Mailer: git-send-email 1.6.5.3
\r
29 In-Reply-To: <1259979997-31544-3-git-send-email-david@tethera.net>
\r
30 X-Sender-Verified: bremner@pivot.cs.unb.ca
\r
31 Cc: David Bremner <bremner@unb.ca>
\r
32 Subject: [notmuch] [PATCH] notmuch.el: patch notmuch-show to call notmuch
\r
33 show without query-context (i.e. without tag:inbox) if the
\r
34 first query returns nothing.
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.12
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Thu, 10 Dec 2009 15:15:08 -0000
\r
49 From: David Bremner <bremner@unb.ca>
\r
51 This fixes the annoying bug of archiving a thread, and then going back
\r
52 to open it and getting an error. It needs the notmuch-show API
\r
53 changing patch of 1259979997-31544-3-git-send-email-david@tethera.net.
\r
56 I'm not really expecting Carl to push this patch, because I think he
\r
57 has a better solution in mind, but in the mean time maybe someone
\r
58 finds it useful. It is saving my sanity already, since in wanderlust
\r
62 1 files changed, 3 insertions(+), 1 deletions(-)
\r
64 diff --git a/notmuch.el b/notmuch.el
\r
65 index cf472f7..0cd4386 100644
\r
68 @@ -997,7 +997,9 @@ matching this search term are shown if non-nil. "
\r
70 (let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id))
\r
71 (args (if query-context (append basic-args (list "and (" query-context ")")) basic-args)))
\r
72 - (apply 'call-process args))
\r
73 + (apply 'call-process args)
\r
74 + (when (and (eq (buffer-size) 0) query-context)
\r
75 + (apply 'call-process basic-args)))
\r
76 (notmuch-show-markup-messages)
\r
78 (run-hooks 'notmuch-show-hook)
\r