From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F21DB431FBC for ; Thu, 10 Dec 2009 07:15:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T3Crt5EEOeBO for ; Thu, 10 Dec 2009 07:15:07 -0800 (PST) Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57]) by olra.theworths.org (Postfix) with ESMTP id 11A06431FAE for ; Thu, 10 Dec 2009 07:15:07 -0800 (PST) Received: from fctnnbsc30w-142167182194.pppoe-dynamic.high-speed.nb.bellaliant.net ([142.167.182.194] helo=localhost) by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NIkjS-0006yg-1T; Thu, 10 Dec 2009 11:15:06 -0400 Received: from bremner by localhost with local (Exim 4.69) (envelope-from ) id 1NIkjM-0003Fv-OA; Thu, 10 Dec 2009 11:15:00 -0400 From: david@tethera.net To: notmuch@notmuchmail.org Date: Thu, 10 Dec 2009 11:14:35 -0400 Message-Id: <1260458075-12370-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259979997-31544-3-git-send-email-david@tethera.net> X-Sender-Verified: bremner@pivot.cs.unb.ca Cc: David Bremner 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. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 15:15:08 -0000 From: David Bremner 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