Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 25305429E5B for ; Sun, 12 Feb 2012 17:20:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 fcINuPGSKcCL for ; Sun, 12 Feb 2012 17:20:07 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 29F0441ED89 for ; Sun, 12 Feb 2012 17:19:35 -0800 (PST) Received: by mail-ww0-f45.google.com with SMTP id dt12so3923384wgb.2 for ; Sun, 12 Feb 2012 17:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=bjPvB1mhZKhFbTwOQDABnBOGq9qBOylm7VNn7PMFCGQ=; b=iA/9Fp/EbBVBDfMcHeME2lS9ULMDCaLnlLspBkqelUraq9mofsNTl5LvDziOCsjyrL TkSPGnFQ7KeqznR8nvEU5/lG/CzIklrwADukjl8SZFu/7fQfsNPW6P0JAFr0e/OGoce6 QrbPxWa5SyXxZQQ4uylzUAJu0R8GdrxKH8/eA= Received: by 10.180.7.231 with SMTP id m7mr19367336wia.3.1329095974926; Sun, 12 Feb 2012 17:19:34 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id m16sm2450022wie.9.2012.02.12.17.19.33 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 17:19:34 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [RFC PATCH v3 10/11] emacs: notmuch-show.el just show the actual matching messages Date: Mon, 13 Feb 2012 01:20:14 +0000 Message-Id: <1329096015-8078-11-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 13 Feb 2012 01:20:09 -0000 Allow a parameter to notmuch-show to just show the matching messages. This is very similar to notmuch-show-elide-non-matching-messages but since it calls notmuch-show.c with the --thread=none parameter it does not keep any threading information. In particular the sort order is different: the elide-non-matching sorts by thread and just omits the non-matching messages, this option sorts by message. It is likely that the two should be unified. --- emacs/notmuch-show.el | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 8a8acf6..1adf964 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -152,6 +152,12 @@ indentation." (make-variable-buffer-local 'notmuch-show-elide-non-matching-messages) (put 'notmuch-show-elide-non-matching-messages 'permanent-local t) +;; This is very similar to the previous variable: they should be +;; unified. MJW +(defvar notmuch-show-just-matches nil) +(make-variable-buffer-local 'notmuch-show-just-matches) +(put 'notmuch-show-just-matches 'permanent-local t) + (defvar notmuch-show-indent-content t) (make-variable-buffer-local 'notmuch-show-indent-content) (put 'notmuch-show-indent-content 'permanent-local t) @@ -1014,7 +1020,7 @@ a corresponding notmuch search." 'face goto-address-mail-face)))) ;;;###autoload -(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name) +(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name just-matches) "Run \"notmuch show\" with the given thread ID and display results. The optional PARENT-BUFFER is the notmuch-search buffer from @@ -1047,7 +1053,9 @@ function is used." (setq notmuch-show-thread-id thread-id notmuch-show-parent-buffer parent-buffer - notmuch-show-query-context query-context) + notmuch-show-query-context query-context + notmuch-show-just-matches just-matches) + (notmuch-show-worker) (current-buffer))) @@ -1066,6 +1074,8 @@ function is used." (append (list "\'") basic-args (list "and (" notmuch-show-query-context ")\'")) (append (list "\'") basic-args (list "\'"))))) + (if notmuch-show-just-matches + (setq args (append (list "--thread=none") args))) (notmuch-show-insert-forest (notmuch-query-get-threads args)) ;; If the query context reduced the results to nothing, run ;; the basic query. -- 1.7.2.3