[PATCH 5/9] lib: iterator API for message properties
[notmuch-archives.git] / 68 / c4f6e556e0a62a9d166a3b719419df3d9a2f2e
1 Return-Path: <m.walters@qmul.ac.uk>\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 9A39B431FC2\r
6         for <notmuch@notmuchmail.org>; Fri, 25 Oct 2013 01:04:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id DxMiC2jp3JlV for <notmuch@notmuchmail.org>;\r
17         Fri, 25 Oct 2013 01:04:22 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 20E10431FB6\r
22         for <notmuch@notmuchmail.org>; Fri, 25 Oct 2013 01:04:22 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1VZcNT-0002ML-0H; Fri, 25 Oct 2013 09:04:18 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1VZcNS-0003WJ-Lw; Fri, 25 Oct 2013 09:04:14 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] emacs: Add a space after completed tag operations\r
34 In-Reply-To: <1382650227-4055-1-git-send-email-amdragon@mit.edu>\r
35 References: <1382650227-4055-1-git-send-email-amdragon@mit.edu>\r
36 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Fri, 25 Oct 2013 09:04:13 +0100\r
39 Message-ID: <8738np7p4y.fsf@qmul.ac.uk>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain; charset=us-ascii\r
42 X-Sender-Host-Address: 93.97.24.31\r
43 X-QM-SPAM-Info: Sender has good ham record.  :)\r
44 X-QM-Body-MD5: cdaa836c7a501d274c4f9765501ab852 (of first 20000 bytes)\r
45 X-SpamAssassin-Score: 0.0\r
46 X-SpamAssassin-SpamBar: /\r
47 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
48         determine if it is\r
49         spam. We require at least 5.0 points to mark a message as spam.\r
50         This message scored 0.0 points. Summary of the scoring: \r
51         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
52         provider *      (markwalters1009[at]gmail.com)\r
53         *  0.0 AWL AWL: From: address is in the auto white-list\r
54 X-QM-Scan-Virus: ClamAV says the message is clean\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Fri, 25 Oct 2013 08:04:29 -0000\r
68 \r
69 \r
70 Tested and LGTM +1\r
71 \r
72 Best wishes\r
73 \r
74 Mark\r
75 \r
76 On Thu, 24 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
77 > Previously, when a user fully completed a tag operation, they had to\r
78 > press space to begin entering another tag operation.  This is\r
79 > different from, say, shell file name completion, which typically\r
80 > inserts a space after an unambiguous completion under the assumption\r
81 > that the user will want to enter more input.\r
82 >\r
83 > This patch tweaks `notmuch-read-tag-changes' to act more like shell\r
84 > file name completion: after an unambiguous tag completion, it now\r
85 > inserts a space, ready and waiting for another tagging operation from\r
86 > the user.  This is backwards-compatible with old habits, since there's\r
87 > no harm in putting an extra space.\r
88 > ---\r
89 >\r
90 > Just because of the context, this must be applied on top of the\r
91 > currently pending tag completion series\r
92 > id:"1382487721-31776-1-git-send-email-amdragon@mit.edu".  The change\r
93 > itself should be otherwise independent.\r
94 >\r
95 >  emacs/notmuch-tag.el | 12 ++++++++++--\r
96 >  1 file changed, 10 insertions(+), 2 deletions(-)\r
97 >\r
98 > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
99 > index 7b21006..8b921f1 100644\r
100 > --- a/emacs/notmuch-tag.el\r
101 > +++ b/emacs/notmuch-tag.el\r
102 > @@ -229,8 +229,16 @@ initial input in the minibuffer."\r
103 >           (set-keymap-parent map crm-local-completion-map)\r
104 >           (define-key map " " 'self-insert-command)\r
105 >           map)))\r
106 > -    (delete "" (completing-read-multiple prompt\r
107 > -             tag-list nil nil initial-input\r
108 > +    (delete "" (completing-read-multiple\r
109 > +             prompt\r
110 > +             ;; Append the separator to each completion so when the\r
111 > +             ;; user completes a tag they can immediately begin\r
112 > +             ;; entering another.  `completing-read-multiple'\r
113 > +             ;; ultimately splits the input on crm-separator, so we\r
114 > +             ;; don't need to strip this back off (we just need to\r
115 > +             ;; delete "empty" entries caused by trailing spaces).\r
116 > +             (mapcar (lambda (tag-op) (concat tag-op crm-separator)) tag-list)\r
117 > +             nil nil initial-input\r
118 >               'notmuch-read-tag-changes-history))))\r
119 >  \r
120 >  (defun notmuch-update-tags (tags tag-changes)\r
121 > -- \r
122 > 1.8.4.rc3\r
123 >\r
124 > _______________________________________________\r
125 > notmuch mailing list\r
126 > notmuch@notmuchmail.org\r
127 > http://notmuchmail.org/mailman/listinfo/notmuch\r