1 Return-Path: <dme@dme.org>
\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 793CD4196F0
\r
6 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 09:25:16 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 AuMNCMz+BxJx for <notmuch@notmuchmail.org>;
\r
16 Mon, 26 Apr 2010 09:25:15 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id A18E7431FC1
\r
20 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 09:25:15 -0700 (PDT)
\r
21 Received: by wyj26 with SMTP id 26so843822wyj.26
\r
22 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 09:25:14 -0700 (PDT)
\r
23 Received: by 10.216.86.210 with SMTP id w60mr3270989wee.48.1272299114459;
\r
24 Mon, 26 Apr 2010 09:25:14 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com
\r
27 by mx.google.com with ESMTPS id d16sm172062wej.9.2010.04.26.09.25.13
\r
28 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
29 Mon, 26 Apr 2010 09:25:13 -0700 (PDT)
\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
31 id 8FA0059413B; Mon, 26 Apr 2010 17:25:24 +0100 (BST)
\r
33 To: notmuch@notmuchmail.org
\r
34 Subject: [PATCH] emacs: Tell the user how many addresses matched when
\r
36 Date: Mon, 26 Apr 2010 17:25:21 +0100
\r
37 Message-Id: <1272299121-21533-1-git-send-email-dme@dme.org>
\r
38 X-Mailer: git-send-email 1.7.0
\r
39 In-Reply-To: <87eii2ck8g.fsf@yoom.home.cworth.org>
\r
40 References: <87eii2ck8g.fsf@yoom.home.cworth.org>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Mon, 26 Apr 2010 16:25:16 -0000
\r
55 From: David Edmondson <dme@dme.org>
\r
57 When completing an address, tell the user how many addresses in the
\r
58 database matched the query.
\r
60 emacs/notmuch-address.el | 6 ++++--
\r
61 1 files changed, 4 insertions(+), 2 deletions(-)
\r
63 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
\r
64 index 69a52a2..a295204 100644
\r
65 --- a/emacs/notmuch-address.el
\r
66 +++ b/emacs/notmuch-address.el
\r
67 @@ -53,9 +53,11 @@ line."
\r
68 (orig (buffer-substring-no-properties beg end))
\r
69 (completion-ignore-case t)
\r
70 (options (notmuch-address-options orig))
\r
71 - (chosen (if (eq (length options) 1)
\r
72 + (num-options (length options))
\r
73 + (chosen (if (eq num-options 1)
\r
75 - (completing-read "Address: " (cdr options) nil nil (car options)
\r
76 + (completing-read (format "Address (%s matches): " num-options 1)
\r
77 + (cdr options) nil nil (car options)
\r
78 'notmuch-address-history))))
\r
80 (push chosen notmuch-address-history)
\r