Re: [PATCH v2] emacs: show: make buttons select window
[notmuch-archives.git] / cd / fe483a2323103529e3881b8db513bb89a76979
1 Return-Path: <jrollins@finestructure.net>\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 6B9594196F2\r
6         for <notmuch@notmuchmail.org>; Wed, 21 Apr 2010 16:32:56 -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: -4.19\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.19 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01]\r
13         autolearn=ham\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 n6BxOZWqVntC for <notmuch@notmuchmail.org>;\r
17         Wed, 21 Apr 2010 16:32:55 -0700 (PDT)\r
18 Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6])\r
19         by olra.theworths.org (Postfix) with ESMTP id 8CFBA431FC1\r
20         for <notmuch@notmuchmail.org>; Wed, 21 Apr 2010 16:32:55 -0700 (PDT)\r
21 Received: from servo.finestructure.net (geco.phys.columbia.edu\r
22         [128.59.170.159])\r
23         (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
24         by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o3LNWjmg020774\r
25         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
26         Wed, 21 Apr 2010 19:32:45 -0400 (EDT)\r
27 Received: from jrollins by servo.finestructure.net with local (Exim 4.71)\r
28         (envelope-from <jrollins@finestructure.net>)\r
29         id 1O4jPR-0002Ah-Bx; Wed, 21 Apr 2010 19:32:45 -0400\r
30 From: Jameson Rollins <jrollins@finestructure.net>\r
31 To: Dirk Hohndel <hohndel@infradead.org>, notmuch@notmuchmail.org\r
32 Subject: Re: [PATCH] Add 'd'elete keybinding to search and show views\r
33 In-Reply-To: <1271891763-10757-2-git-send-email-hohndel@infradead.org>\r
34 References: <1271891763-10757-1-git-send-email-hohndel@infradead.org>\r
35         <1271891763-10757-2-git-send-email-hohndel@infradead.org>\r
36 Date: Wed, 21 Apr 2010 19:32:39 -0400\r
37 Message-ID: <87y6ggmlew.fsf@servo.finestructure.net>\r
38 MIME-Version: 1.0\r
39 Content-Type: multipart/signed; boundary="=-=-=";\r
40         micalg=pgp-sha256; protocol="application/pgp-signature"\r
41 X-No-Spam-Score: Local\r
42 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.6\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Wed, 21 Apr 2010 23:32:56 -0000\r
56 \r
57 --=-=-=\r
58 Content-Transfer-Encoding: quoted-printable\r
59 \r
60 On Wed, 21 Apr 2010 16:16:02 -0700, Dirk Hohndel <hohndel@infradead.org> wr=\r
61 ote:\r
62 > Straight forward addition to the Emacs UI. The 'd' keybinding\r
63 > is implemented very similar to the 'a' keybinding - it only\r
64 > adds a +deleted tag as well. This tag is used by notmuchsync\r
65 > to delete (-p "prune") files in the mailstore.\r
66 >=20\r
67 > I'm sending this mostly as an RFC - I use this and like it, but\r
68 > people seem to have strong feelings as to how they want to deal=20\r
69 > with deleting email (or for some people, how they don't want to\r
70 > do that at all).\r
71 \r
72 Hey, Dirk.  I'm definitely on board with this idea, and have in fact\r
73 been doing exactly the same thing with my personal customizations as you\r
74 propose (including using the 'd' key).\r
75 \r
76 I only have a couple of nit-picky comments about your proposed\r
77 implementation:\r
78 \r
79 On Wed, 21 Apr 2010 16:16:03 -0700, Dirk Hohndel <hohndel@infradead.org> wr=\r
80 ote:\r
81 > -(defun notmuch-show-archive-thread-internal (show-next)\r
82 > +(defun notmuch-show-archive-or-delete-thread-internal (show-next delete)\r
83 >    ;; Remove the tag from the current set of messages.\r
84 >    (goto-char (point-min))\r
85 > -  (loop do (notmuch-show-remove-tag "inbox")\r
86 > +  (loop do (progn\r
87 > +          (notmuch-show-remove-tag "inbox")\r
88 > +          (if delete\r
89 > +              (notmuch-show-add-tag "deleted")))\r
90 >       until (not (notmuch-show-goto-message-next)))\r
91 >    ;; Move to the next item in the search results, if any.\r
92 >    (let ((parent-buffer notmuch-show-parent-buffer))\r
93 > @@ -925,6 +929,20 @@ to stdout or stderr will appear in the *Messages* bu=\r
94 ffer."\r
95 >         (if show-next\r
96 >             (notmuch-search-show-thread))))))\r
97 \r
98 I'm not sure I like the idea of piggybacking on the\r
99 notmuch-show-archive-thread-internal function.  Why not just make a new\r
100 separate notmuch-show-delete-thread-internal function?  I think it makes\r
101 the code clearer and easier to parse for the calls to these functions\r
102 (otherwise it's a little unclear what "t t" and "nil nil" and so on\r
103 mean).\r
104 \r
105 > +(defun notmuch-search-delete-thread ()\r
106 > +  "Delete the currently selected thread (remove its \"inbox\" tag and ad=\r
107 d \"deleted\" tag).\r
108 > +\r
109 > +This function advances the next thread when finished."\r
110 > +  (interactive)\r
111 > +  (notmuch-search-remove-tag-thread "inbox")\r
112 > +  (notmuch-search-add-tag-thread "deleted")\r
113 > +  (forward-line))\r
114 \r
115 I'm also not a fan of these functions (notmuch-search-delete-thread and\r
116 notmuch-show-delete-thread) removing the "inbox" tag.  Just because I\r
117 want to mark a messages as deleted doesn't mean that I want to archive\r
118 it.  I would really like to keep these concepts distinct if possible.\r
119 \r
120 jamie.\r
121 \r
122 --=-=-=\r
123 Content-Type: application/pgp-signature\r
124 \r
125 -----BEGIN PGP SIGNATURE-----\r
126 Version: GnuPG v1.4.10 (GNU/Linux)\r
127 \r
128 iQIcBAEBCAAGBQJLz4sXAAoJEO00zqvie6q8N6QP/AiGCUOESJ09ga3TPi9v+JBC\r
129 nnE+OSrTmFaDQfksC8WC5vdcjoEevDb+FOJenKgh47gJToDxlE6LvbC53l9hiOvU\r
130 8ls2UgKDgv5jFAf2ryKdSypjSwn7Ncyw+i0OwtpiA06rTBzRLVb/iNvoExAWgHN+\r
131 vJMHUM13Jv71H1tDbmMw40xb6Rd8vZRSUYB6jfyGBR89bwkgHxWMil6a4JApfEQh\r
132 zpAMT7UY28yjSo5zpBMV2oqM246CBvKUSL4gdrQpVpudz2H/myF0DrsYt0AnIpf+\r
133 yZEpPOYi0rAtI7e2XZLTTeqopTFS2bttKfmq/3uSQia8c1YgGpLhT/hVwDgmm/Ub\r
134 6m763fabQUaioKFPsPDyRYQY+64eEH/LRbtD0hAMsfbJYoAJhr0IHKNx8SAg8aaf\r
135 HfHKFwXoiYT9a1VpSmoq5Z7vlhu/uLlSZiq7vPVYufsjW9ZiLj9yRCT45NzzKlxn\r
136 KAdXGRV5MrHkZhw7YbCThwoVBgH2aFfNkOc94y4Z5ibK5DihXUN7nz/n+YQSbpoA\r
137 Gqpr/9obmvXTrvaq7cdUykeYqanZSFF4MMa56k0wzhBwJBVCkqb+Ev5RkjdC+oc2\r
138 9XFIgrFffgkFJrkK2voAWwfek6phLew1CC+iu+qCFxTui9J73irE8H+PXkb11f5w\r
139 RqVa8/gn2kpPuDIpojoS\r
140 =RUcJ\r
141 -----END PGP SIGNATURE-----\r
142 --=-=-=--\r