1 Return-Path: <amdragon@mit.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 129D3431FBD
\r
6 for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 14:30:44 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 iW1lXEqfhnI7 for <notmuch@notmuchmail.org>;
\r
16 Thu, 24 Oct 2013 14:30:35 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id B9C76431FB6
\r
20 for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 14:30:35 -0700 (PDT)
\r
21 X-AuditID: 12074424-b7f528e0000009aa-11-5269917ad005
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 2F.11.02474.A7199625; Thu, 24 Oct 2013 17:30:34 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r9OLUWNK015937;
\r
27 Thu, 24 Oct 2013 17:30:32 -0400
\r
28 Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r9OLUUar007115
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 24 Oct 2013 17:30:31 -0400
\r
34 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1VZSUA-00017l-R9; Thu, 24 Oct 2013 17:30:30 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH] emacs: Add a space after completed tag operations
\r
40 Date: Thu, 24 Oct 2013 17:30:27 -0400
\r
41 Message-Id: <1382650227-4055-1-git-send-email-amdragon@mit.edu>
\r
42 X-Mailer: git-send-email 1.8.4.rc3
\r
43 X-Brightmail-Tracker:
\r
44 H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsUixCmqrVs1MTPIYPtnbovrN2cyOzB6PFt1
\r
45 izmAMYrLJiU1J7MstUjfLoErY+6m2ywFK/grfj+QbmA8wtPFyMkhIWAi0XRuOjOELSZx4d56
\r
46 ti5GLg4hgX2MEntfTmKEcDYySnS++8MC4Rxhkpj7aCZU2VxGiYbv65hA+tkENCS27V/OCGKL
\r
47 CEhL7Lw7m7WLkYODWUBN4k+XCkhYWMBJ4vHMj2DrWARUJU7NXcMOYvMK2Eu87FjCCnGGksTC
\r
48 U9tYJzDyLmBkWMUom5JbpZubmJlTnJqsW5ycmJeXWqRrrpebWaKXmlK6iREUBOwuKjsYmw8p
\r
49 HWIU4GBU4uHV+JAeJMSaWFZcmXuIUZKDSUmUt29CZpAQX1J+SmVGYnFGfFFpTmrxIUYJDmYl
\r
50 Ed5pekA53pTEyqrUonyYlDQHi5I47y0O+yAhgfTEktTs1NSC1CKYrAwHh5IE706QoYJFqemp
\r
51 FWmZOSUIaSYOTpDhPEDDD4PU8BYXJOYWZ6ZD5E8xKkqJ88qAJARAEhmleXC9sCh9xSgO9Iow
\r
52 7y2QKh5ghMN1vwIazAQ0eMqSNJDBJYkIKakGxvk/n31949rBWK3zadfxPeu+1IXM5p7z/Gjz
\r
53 nSuG7hanywvits9hMDoqXe2ULcW8Yb5o0mTOsFWbv1rzKZ4SOa+kobx39626IyuSmB+tlI4U
\r
54 O/qmqVb3Ms/yV0lvp6v/kEr9P0F+XfhcB+H49Vdup/tE1b1d+X/fyXOBF7ZlXqnNcJJfJyrT
\r
55 uUOJpTgj0VCLuag4EQAfRzrrrQIAAA==
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Thu, 24 Oct 2013 21:30:44 -0000
\r
70 Previously, when a user fully completed a tag operation, they had to
\r
71 press space to begin entering another tag operation. This is
\r
72 different from, say, shell file name completion, which typically
\r
73 inserts a space after an unambiguous completion under the assumption
\r
74 that the user will want to enter more input.
\r
76 This patch tweaks `notmuch-read-tag-changes' to act more like shell
\r
77 file name completion: after an unambiguous tag completion, it now
\r
78 inserts a space, ready and waiting for another tagging operation from
\r
79 the user. This is backwards-compatible with old habits, since there's
\r
80 no harm in putting an extra space.
\r
83 Just because of the context, this must be applied on top of the
\r
84 currently pending tag completion series
\r
85 id:"1382487721-31776-1-git-send-email-amdragon@mit.edu". The change
\r
86 itself should be otherwise independent.
\r
88 emacs/notmuch-tag.el | 12 ++++++++++--
\r
89 1 file changed, 10 insertions(+), 2 deletions(-)
\r
91 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
\r
92 index 7b21006..8b921f1 100644
\r
93 --- a/emacs/notmuch-tag.el
\r
94 +++ b/emacs/notmuch-tag.el
\r
95 @@ -229,8 +229,16 @@ initial input in the minibuffer."
\r
96 (set-keymap-parent map crm-local-completion-map)
\r
97 (define-key map " " 'self-insert-command)
\r
99 - (delete "" (completing-read-multiple prompt
\r
100 - tag-list nil nil initial-input
\r
101 + (delete "" (completing-read-multiple
\r
103 + ;; Append the separator to each completion so when the
\r
104 + ;; user completes a tag they can immediately begin
\r
105 + ;; entering another. `completing-read-multiple'
\r
106 + ;; ultimately splits the input on crm-separator, so we
\r
107 + ;; don't need to strip this back off (we just need to
\r
108 + ;; delete "empty" entries caused by trailing spaces).
\r
109 + (mapcar (lambda (tag-op) (concat tag-op crm-separator)) tag-list)
\r
110 + nil nil initial-input
\r
111 'notmuch-read-tag-changes-history))))
\r
113 (defun notmuch-update-tags (tags tag-changes)
\r