--- /dev/null
+Return-Path: <dme@fenchurch.hh.sledj.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 21FCA431FD0\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:59:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.379\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.379 tagged_above=-999 required=5\r
+ tests=[NO_DNS_FOR_FROM=0.379] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dpsiG3j24rRM for <notmuch@notmuchmail.org>;\r
+ Fri, 5 Sep 2014 05:59:51 -0700 (PDT)\r
+Received: from fenchurch.hh.sledj.net (disaster-area.hh.sledj.net\r
+ [81.149.164.25])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1D592431FC4\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:59:46 -0700 (PDT)\r
+Received: by fenchurch.hh.sledj.net (Postfix, from userid 501)\r
+ id DD4931316557; Fri, 5 Sep 2014 13:59:29 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v1 1/3] emacs: Allow query to exclude the entire thread and\r
+ body.\r
+Date: Fri, 5 Sep 2014 13:59:27 +0100\r
+Message-Id: <1409921969-65129-2-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)\r
+In-Reply-To: <1409921969-65129-1-git-send-email-dme@dme.org>\r
+References: <1409921969-65129-1-git-send-email-dme@dme.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 05 Sep 2014 12:59:55 -0000\r
+\r
+Callers to `notmuch-query-get-threads' can optionally choose not to\r
+receive either the entire thread and/or the body of messages.\r
+\r
+This is intended to reduce the amount of output in cases where one or\r
+both of these items is not useful.\r
+---\r
+ emacs/notmuch-query.el | 7 ++++++-\r
+ 1 file changed, 6 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el\r
+index d1daffc..f83ca9b 100644\r
+--- a/emacs/notmuch-query.el\r
++++ b/emacs/notmuch-query.el\r
+@@ -21,7 +21,8 @@\r
+ \r
+ (require 'notmuch-lib)\r
+ \r
+-(defun notmuch-query-get-threads (search-terms)\r
++(defun notmuch-query-get-threads (search-terms &optional exclude-entire-thread\r
++ exclude-body)\r
+ "Return a list of threads of messages matching SEARCH-TERMS.\r
+ \r
+ A thread is a forest or list of trees. A tree is a two element\r
+@@ -31,6 +32,10 @@ is a possibly empty forest of replies.\r
+ (let ((args '("show" "--format=sexp" "--format-version=1")))\r
+ (if notmuch-show-process-crypto\r
+ (setq args (append args '("--decrypt"))))\r
++ (if exclude-entire-thread\r
++ (setq args (append args '("--entire-thread=false"))))\r
++ (if exclude-body\r
++ (setq args (append args '("--body=false"))))\r
+ (setq args (append args search-terms))\r
+ (apply #'notmuch-call-notmuch-sexp args)))\r
+ \r
+-- \r
+1.8.5.2 (Apple Git-48)\r
+\r