1 Return-Path: <sebastian.fischmeister@uwaterloo.ca>
\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 arlo.cworth.org (Postfix) with ESMTP id 54B106DE1B73
\r
6 for <notmuch@notmuchmail.org>; Sun, 5 Apr 2015 18:29:48 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-1.048 tagged_above=-999 required=5 tests=[AWL=1.823,
\r
12 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
\r
13 RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] autolearn=disabled
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id pBpJi5YT59mV for <notmuch@notmuchmail.org>;
\r
17 Sun, 5 Apr 2015 18:29:45 -0700 (PDT)
\r
18 Received: from mailchk-m01.uwaterloo.ca (mailservices.uwaterloo.ca
\r
20 by arlo.cworth.org (Postfix) with ESMTPS id EA3286DE1B83
\r
21 for <notmuch@notmuchmail.org>; Sun, 5 Apr 2015 18:29:44 -0700 (PDT)
\r
22 Received: from connect.uwaterloo.ca (connhub1.connect.uwaterloo.ca
\r
24 by mailchk-m01.uwaterloo.ca (8.14.4/8.14.4) with ESMTP id t361DTA5016758
\r
25 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK)
\r
26 for <notmuch@notmuchmail.org>; Sun, 5 Apr 2015 21:13:32 -0400
\r
27 Received: from CONNHUB4.connect.uwaterloo.ca (129.97.149.122) by
\r
28 connhub1.connect.uwaterloo.ca (129.97.149.113) with Microsoft SMTP Server
\r
29 (TLS) id 14.3.210.2; Sun, 5 Apr 2015 21:13:30 -0400
\r
30 Received: from uwaterloo.ca (172.16.36.43) by connhub4.connect.uwaterloo.ca
\r
31 (129.97.149.122) with Microsoft SMTP Server (TLS) id 14.3.210.2; Sun, 5 Apr
\r
33 From: Sebastian Fischmeister <sfischme@uwaterloo.ca>
\r
34 To: notmuch <notmuch@notmuchmail.org>
\r
35 Subject: [PATCH] custom search prefix
\r
36 Reply-To: <sfischme@uwaterloo.ca>
\r
37 X-Homepage: http://esg.uwaterloo.ca
\r
38 Date: Sun, 5 Apr 2015 21:13:29 -0400
\r
39 Message-ID: <87siceqcyl.fsf@uwaterloo.ca>
\r
41 Content-Type: text/plain
\r
42 X-UUID: 7e799838-187b-4f31-8593-4e75ef902469
\r
43 X-Miltered: at mailchk-m01 with ID 5521DDB9.000 by Joe's j-chkmail
\r
44 (http://j-chkmail.ensmp.fr)!
\r
45 X-Virus-Scanned: clamav-milter 0.98.6 at mailchk-m01
\r
46 X-Virus-Status: Clean
\r
47 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3
\r
48 (mailchk-m01.uwaterloo.ca [129.97.128.141]);
\r
49 Sun, 05 Apr 2015 21:13:32 -0400 (EDT)
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.18
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Mon, 06 Apr 2015 01:29:48 -0000
\r
66 emacs/notmuch.el | 8 +++++++-
\r
67 1 file changed, 7 insertions(+), 1 deletion(-)
\r
69 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
70 index ab00454..c9cd31a 100644
\r
71 --- a/emacs/notmuch.el
\r
72 +++ b/emacs/notmuch.el
\r
73 @@ -851,6 +851,12 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."
\r
74 (concat "*notmuch-search-" query "*"))
\r
77 +(defcustom notmuch-query-prefix nil
\r
78 + "Add a prefix to the standard query."
\r
80 + :group 'notmuch-search)
\r
83 (defun notmuch-read-query (prompt)
\r
84 "Read a notmuch-query from the minibuffer with completion.
\r
86 @@ -883,7 +889,7 @@ PROMPT is the string to prompt with."
\r
87 ;; this was simpler than convincing completing-read to accept spaces:
\r
88 (define-key keymap (kbd "TAB") 'minibuffer-complete)
\r
89 (let ((history-delete-duplicates t))
\r
90 - (read-from-minibuffer prompt nil keymap nil
\r
91 + (read-from-minibuffer prompt notmuch-query-prefix keymap nil
\r
92 'notmuch-search-history current-query nil)))))
\r
94 (defun notmuch-search-get-query ()
\r