From: David Edmondson Date: Fri, 5 Sep 2014 12:59:27 +0000 (+0100) Subject: [PATCH v1 1/3] emacs: Allow query to exclude the entire thread and body. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db77dbbda76195addc9a462e42b405f07d87745f;p=notmuch-archives.git [PATCH v1 1/3] emacs: Allow query to exclude the entire thread and body. --- diff --git a/6e/ac1f767587c2aceb5f60eaabf67b22dbc90c78 b/6e/ac1f767587c2aceb5f60eaabf67b22dbc90c78 new file mode 100644 index 000000000..b8a98df27 --- /dev/null +++ b/6e/ac1f767587c2aceb5f60eaabf67b22dbc90c78 @@ -0,0 +1,82 @@ +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 21FCA431FD0 + for ; Fri, 5 Sep 2014 05:59:55 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.379 +X-Spam-Level: +X-Spam-Status: No, score=0.379 tagged_above=-999 required=5 + tests=[NO_DNS_FOR_FROM=0.379] 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 dpsiG3j24rRM for ; + Fri, 5 Sep 2014 05:59:51 -0700 (PDT) +Received: from fenchurch.hh.sledj.net (disaster-area.hh.sledj.net + [81.149.164.25]) + by olra.theworths.org (Postfix) with ESMTP id 1D592431FC4 + for ; Fri, 5 Sep 2014 05:59:46 -0700 (PDT) +Received: by fenchurch.hh.sledj.net (Postfix, from userid 501) + id DD4931316557; Fri, 5 Sep 2014 13:59:29 +0100 (BST) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [PATCH v1 1/3] emacs: Allow query to exclude the entire thread and + body. +Date: Fri, 5 Sep 2014 13:59:27 +0100 +Message-Id: <1409921969-65129-2-git-send-email-dme@dme.org> +X-Mailer: git-send-email 1.8.5.2 (Apple Git-48) +In-Reply-To: <1409921969-65129-1-git-send-email-dme@dme.org> +References: <1409921969-65129-1-git-send-email-dme@dme.org> +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: Fri, 05 Sep 2014 12:59:55 -0000 + +Callers to `notmuch-query-get-threads' can optionally choose not to +receive either the entire thread and/or the body of messages. + +This is intended to reduce the amount of output in cases where one or +both of these items is not useful. +--- + emacs/notmuch-query.el | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el +index d1daffc..f83ca9b 100644 +--- a/emacs/notmuch-query.el ++++ b/emacs/notmuch-query.el +@@ -21,7 +21,8 @@ + + (require 'notmuch-lib) + +-(defun notmuch-query-get-threads (search-terms) ++(defun notmuch-query-get-threads (search-terms &optional exclude-entire-thread ++ exclude-body) + "Return a list of threads of messages matching SEARCH-TERMS. + + A thread is a forest or list of trees. A tree is a two element +@@ -31,6 +32,10 @@ is a possibly empty forest of replies. + (let ((args '("show" "--format=sexp" "--format-version=1"))) + (if notmuch-show-process-crypto + (setq args (append args '("--decrypt")))) ++ (if exclude-entire-thread ++ (setq args (append args '("--entire-thread=false")))) ++ (if exclude-body ++ (setq args (append args '("--body=false")))) + (setq args (append args search-terms)) + (apply #'notmuch-call-notmuch-sexp args))) + +-- +1.8.5.2 (Apple Git-48) +