1 Return-Path: <cceleri@cs.stanford.edu>
\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 1FF5F431FBF
\r
6 for <notmuch@notmuchmail.org>; Sat, 29 Nov 2014 08:40:26 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Os+LTwPVzNvR for <notmuch@notmuchmail.org>;
\r
16 Sat, 29 Nov 2014 08:40:18 -0800 (PST)
\r
17 Received: from smtp1.cs.Stanford.EDU (smtp1.cs.stanford.edu [171.64.64.25])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 466CC431FAE
\r
21 for <notmuch@notmuchmail.org>; Sat, 29 Nov 2014 08:40:18 -0800 (PST)
\r
22 Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78]:58810
\r
24 by smtp1.cs.Stanford.EDU with esmtpsa (UNKNOWN:AES128-SHA256:128)
\r
25 (Exim 4.80.1) (envelope-from <cceleri@cs.stanford.edu>)
\r
26 id 1Xul4B-0007yP-QT; Sat, 29 Nov 2014 08:40:16 -0800
\r
27 From: Charles Celerier <cceleri@cs.stanford.edu>
\r
28 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
29 Subject: [PATCH v2] emacs: Added "is:<tag>" style completion to
\r
31 Date: Sat, 29 Nov 2014 11:39:57 -0500
\r
32 Message-Id: <1417279197-90877-1-git-send-email-cceleri@cs.stanford.edu>
\r
33 X-Mailer: git-send-email 2.1.2
\r
34 In-Reply-To: <1417219835-92141-1-git-send-email-cceleri@cs.stanford.edu>
\r
35 References: <1417219835-92141-1-git-send-email-cceleri@cs.stanford.edu>
\r
36 X-Scan-Signature: f9929892efd47015c544d6ca2fb551e9
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sat, 29 Nov 2014 16:40:26 -0000
\r
51 The notmuch-search-terms man page states that "tag:<tag>" is equivalent
\r
52 to "is:<tag>". Completion for "is:<tag>" style searches is now supported
\r
53 in the Emacs interface.
\r
55 Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>
\r
57 emacs/notmuch.el | 11 +++++++----
\r
58 1 file changed, 7 insertions(+), 4 deletions(-)
\r
60 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
61 index 218486a..d29499c 100644
\r
62 --- a/emacs/notmuch.el
\r
63 +++ b/emacs/notmuch.el
\r
64 @@ -856,12 +856,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."
\r
66 PROMPT is the string to prompt with."
\r
69 + (mapcar (lambda (tag) (notmuch-escape-boolean-term tag))
\r
70 + (process-lines notmuch-command "search" "--output=tags" "*"))))
\r
73 (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:"
\r
74 "subject:" "attachment:")
\r
75 - (mapcar (lambda (tag)
\r
76 - (concat "tag:" (notmuch-escape-boolean-term tag)))
\r
77 - (process-lines notmuch-command "search" "--output=tags" "*")))))
\r
78 + (mapcar (lambda (tag) (concat "tag:" tag)) all-tags)
\r
79 + (mapcar (lambda (tag) (concat "is:" tag)) all-tags))))
\r
80 (let ((keymap (copy-keymap minibuffer-local-map))
\r
81 (current-query (case major-mode
\r
82 (notmuch-search-mode (notmuch-search-get-query))
\r
83 @@ -884,7 +887,7 @@ PROMPT is the string to prompt with."
\r
84 (define-key keymap (kbd "TAB") 'minibuffer-complete)
\r
85 (let ((history-delete-duplicates t))
\r
86 (read-from-minibuffer prompt nil keymap nil
\r
87 - 'notmuch-search-history current-query nil)))))
\r
88 + 'notmuch-search-history current-query nil))))))
\r
90 (defun notmuch-search-get-query ()
\r
91 "Return the current query in this search buffer"
\r