Address completion in Emacs
[notmuch-archives.git] / 5b / f45954a33f127d102f34601d1449583228d304
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 1C207431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 22 Oct 2013 17:22:45 -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: -0.7\r
10 X-Spam-Level: \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 VacEPWPlS3WJ for <notmuch@notmuchmail.org>;\r
16         Tue, 22 Oct 2013 17:22:38 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id 0E362429E36\r
20         for <notmuch@notmuchmail.org>; Tue, 22 Oct 2013 17:22:16 -0700 (PDT)\r
21 X-AuditID: 1209190d-b7f528e0000009b4-94-526716b8472a\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 1D.30.02484.8B617625; Tue, 22 Oct 2013 20:22:16 -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 r9N0M5IH027450; \r
27         Tue, 22 Oct 2013 20:22:05 -0400\r
28 Received: from drake.dyndns.org\r
29         (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
30         [216.15.114.40]) (authenticated bits=0)\r
31         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
32         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r9N0M3lj005849\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Tue, 22 Oct 2013 20:22:05 -0400\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
36         (envelope-from <amdragon@mit.edu>)\r
37         id 1VYmD5-0008KS-SS; Tue, 22 Oct 2013 20:22:03 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v2 7/8] pick: Use interactive specifications for tag changes\r
41 Date: Tue, 22 Oct 2013 20:22:00 -0400\r
42 Message-Id: <1382487721-31776-8-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.8.4.rc3\r
44 In-Reply-To: <1382487721-31776-1-git-send-email-amdragon@mit.edu>\r
45 References: <1382487721-31776-1-git-send-email-amdragon@mit.edu>\r
46 X-Brightmail-Tracker:\r
47  H4sIAAAAAAAAA+NgFtrDIsWRmVeSWpSXmKPExsUixCmqrbtDLD3IYOkXDYvVc3ksrt+cyezA\r
48         5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZWzsWMBccEmq4svKXawNjI/Euhg5OSQETCS+\r
49         Xn3LCmGLSVy4t56ti5GLQ0hgH6PEiftn2CGcjYwSsyacZYFw7jBJHOpbCeXMZZRo/XWEDaSf\r
50         TUBDYtv+5YwgtoiAtMTOu7PB5jILOEp83r8IrEZYwEfi55n1QGM5OFgEVCV2To8HCfMKOEh8\r
51         mnYL6gwliYWntoHZnECtb3Z8AGsVAqqZsvMMywRG/gWMDKsYZVNyq3RzEzNzilOTdYuTE/Py\r
52         Uot0jfRyM0v0UlNKNzGCA0mSdwfju4NKhxgFOBiVeHgt2tOChFgTy4orcw8xSnIwKYnyqvOn\r
53         BwnxJeWnVGYkFmfEF5XmpBYfYpTgYFYS4W32BSrnTUmsrEotyodJSXOwKInz3uSwDxISSE8s\r
54         Sc1OTS1ILYLJynBwKEnw+ooCDRUsSk1PrUjLzClBSDNxcIIM5wEavgKkhre4IDG3ODMdIn+K\r
55         UVFKnJcfJCEAksgozYPrhUX6K0ZxoFeEeb+IAFXxAJMEXPcroMFMQIOnLAG5urgkESEl1cC4\r
56         sXnfl91SNa/WH8rX/ffEcP/9jXO4FXRueIV09Db2OzRXJ85pi7/iHrPyu32HxxfB36X2c5+b\r
57         O/ZEWLC0W7gcvh6i7GvT1LFmzTGtqAwbwSWzw9tuvLbh2/5fetZPecuy4hsp7o9OGVXNneI1\r
58         O/GaYrFYLrPW3Gm7dMw+OM2t1pCfuY7xvI0SS3FGoqEWc1FxIgCqoRGzzwIAAA==\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Wed, 23 Oct 2013 00:22:45 -0000\r
72 \r
73 ---\r
74  contrib/notmuch-pick/notmuch-pick.el | 36 +++++++++++++++++++++---------------\r
75  1 file changed, 21 insertions(+), 15 deletions(-)\r
76 \r
77 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
78 index 8f504ed..13682ea 100644\r
79 --- a/contrib/notmuch-pick/notmuch-pick.el\r
80 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
81 @@ -37,7 +37,7 @@\r
82  (declare-function notmuch-show-strip-re "notmuch-show" (subject))\r
83  (declare-function notmuch-show-spaces-n "notmuch-show" (n))\r
84  (declare-function notmuch-read-query "notmuch" (prompt))\r
85 -(declare-function notmuch-read-tag-changes "notmuch" (&optional initial-input &rest search-terms))\r
86 +(declare-function notmuch-read-tag-changes "notmuch" (current-tags &optional prompt initial-input))\r
87  (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))\r
88  (declare-function notmuch-hello-trim "notmuch-hello" (search))\r
89  (declare-function notmuch-search-find-thread-id "notmuch" ())\r
90 @@ -372,21 +372,24 @@ Does NOT change the database."\r
91        (notmuch-pick-set-tags new-tags)\r
92        (notmuch-pick-refresh-result))))\r
93  \r
94 -(defun notmuch-pick-tag (&optional tag-changes)\r
95 +(defun notmuch-pick-tag (tag-changes)\r
96    "Change tags for the current message"\r
97 -  (interactive)\r
98 -  (setq tag-changes (notmuch-tag (notmuch-pick-get-message-id) tag-changes))\r
99 +  (interactive\r
100 +   (list (notmuch-read-tag-changes (notmuch-pick-get-tags) "Tag message")))\r
101 +  (notmuch-tag (notmuch-pick-get-message-id) tag-changes)\r
102    (notmuch-pick-tag-update-display tag-changes))\r
103  \r
104 -(defun notmuch-pick-add-tag ()\r
105 +(defun notmuch-pick-add-tag (tag-changes)\r
106    "Same as `notmuch-pick-tag' but sets initial input to '+'."\r
107 -  (interactive)\r
108 -  (notmuch-pick-tag "+"))\r
109 +  (interactive\r
110 +   (list (notmuch-read-tag-changes (notmuch-pick-get-tags) "Tag message" "+")))\r
111 +  (notmuch-pick-tag tag-changes))\r
112  \r
113 -(defun notmuch-pick-remove-tag ()\r
114 +(defun notmuch-pick-remove-tag (tag-changes)\r
115    "Same as `notmuch-pick-tag' but sets initial input to '-'."\r
116 -  (interactive)\r
117 -  (notmuch-pick-tag "-"))\r
118 +  (interactive\r
119 +   (list (notmuch-read-tag-changes (notmuch-pick-get-tags) "Tag message" "-")))\r
120 +  (notmuch-pick-tag tag-changes))\r
121  \r
122  ;; The next two functions close the message window before searching or\r
123  ;; picking but they do so after the user has entered the query (in\r
124 @@ -626,13 +629,16 @@ message will be \"unarchived\", i.e. the tag changes in\r
125              (notmuch-pick-thread-mapcar 'notmuch-pick-get-message-id)\r
126              " or "))\r
127  \r
128 -(defun notmuch-pick-tag-thread (&optional tag-changes)\r
129 +(defun notmuch-pick-tag-thread (tag-changes)\r
130    "Tag all messages in the current thread"\r
131 -  (interactive)\r
132 +  (interactive\r
133 +   (let ((tags (apply #'append (notmuch-pick-thread-mapcar\r
134 +                               (lambda () (notmuch-pick-get-tags))))))\r
135 +     (list (notmuch-read-tag-changes tags "Tag thread"))))\r
136    (when (notmuch-pick-get-message-properties)\r
137 -    (let ((tag-changes (notmuch-tag (notmuch-pick-get-messages-ids-thread-search) tag-changes)))\r
138 -      (notmuch-pick-thread-mapcar\r
139 -       (lambda () (notmuch-pick-tag-update-display tag-changes))))))\r
140 +    (notmuch-tag (notmuch-pick-get-messages-ids-thread-search) tag-changes)\r
141 +    (notmuch-pick-thread-mapcar\r
142 +     (lambda () (notmuch-pick-tag-update-display tag-changes)))))\r
143  \r
144  (defun notmuch-pick-archive-thread (&optional unarchive)\r
145    "Archive each message in thread.\r
146 -- \r
147 1.8.4.rc3\r
148 \r