Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6B9594196F2 for ; Wed, 21 Apr 2010 16:32:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.19 X-Spam-Level: X-Spam-Status: No, score=-4.19 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n6BxOZWqVntC for ; Wed, 21 Apr 2010 16:32:55 -0700 (PDT) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by olra.theworths.org (Postfix) with ESMTP id 8CFBA431FC1 for ; Wed, 21 Apr 2010 16:32:55 -0700 (PDT) Received: from servo.finestructure.net (geco.phys.columbia.edu [128.59.170.159]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o3LNWjmg020774 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 21 Apr 2010 19:32:45 -0400 (EDT) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1O4jPR-0002Ah-Bx; Wed, 21 Apr 2010 19:32:45 -0400 From: Jameson Rollins To: Dirk Hohndel , notmuch@notmuchmail.org Subject: Re: [PATCH] Add 'd'elete keybinding to search and show views In-Reply-To: <1271891763-10757-2-git-send-email-hohndel@infradead.org> References: <1271891763-10757-1-git-send-email-hohndel@infradead.org> <1271891763-10757-2-git-send-email-hohndel@infradead.org> Date: Wed, 21 Apr 2010 19:32:39 -0400 Message-ID: <87y6ggmlew.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.6 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 23:32:56 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 21 Apr 2010 16:16:02 -0700, Dirk Hohndel wr= ote: > Straight forward addition to the Emacs UI. The 'd' keybinding > is implemented very similar to the 'a' keybinding - it only > adds a +deleted tag as well. This tag is used by notmuchsync > to delete (-p "prune") files in the mailstore. >=20 > I'm sending this mostly as an RFC - I use this and like it, but > people seem to have strong feelings as to how they want to deal=20 > with deleting email (or for some people, how they don't want to > do that at all). Hey, Dirk. I'm definitely on board with this idea, and have in fact been doing exactly the same thing with my personal customizations as you propose (including using the 'd' key). I only have a couple of nit-picky comments about your proposed implementation: On Wed, 21 Apr 2010 16:16:03 -0700, Dirk Hohndel wr= ote: > -(defun notmuch-show-archive-thread-internal (show-next) > +(defun notmuch-show-archive-or-delete-thread-internal (show-next delete) > ;; Remove the tag from the current set of messages. > (goto-char (point-min)) > - (loop do (notmuch-show-remove-tag "inbox") > + (loop do (progn > + (notmuch-show-remove-tag "inbox") > + (if delete > + (notmuch-show-add-tag "deleted"))) > until (not (notmuch-show-goto-message-next))) > ;; Move to the next item in the search results, if any. > (let ((parent-buffer notmuch-show-parent-buffer)) > @@ -925,6 +929,20 @@ to stdout or stderr will appear in the *Messages* bu= ffer." > (if show-next > (notmuch-search-show-thread)))))) I'm not sure I like the idea of piggybacking on the notmuch-show-archive-thread-internal function. Why not just make a new separate notmuch-show-delete-thread-internal function? I think it makes the code clearer and easier to parse for the calls to these functions (otherwise it's a little unclear what "t t" and "nil nil" and so on mean). > +(defun notmuch-search-delete-thread () > + "Delete the currently selected thread (remove its \"inbox\" tag and ad= d \"deleted\" tag). > + > +This function advances the next thread when finished." > + (interactive) > + (notmuch-search-remove-tag-thread "inbox") > + (notmuch-search-add-tag-thread "deleted") > + (forward-line)) I'm also not a fan of these functions (notmuch-search-delete-thread and notmuch-show-delete-thread) removing the "inbox" tag. Just because I want to mark a messages as deleted doesn't mean that I want to archive it. I would really like to keep these concepts distinct if possible. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLz4sXAAoJEO00zqvie6q8N6QP/AiGCUOESJ09ga3TPi9v+JBC nnE+OSrTmFaDQfksC8WC5vdcjoEevDb+FOJenKgh47gJToDxlE6LvbC53l9hiOvU 8ls2UgKDgv5jFAf2ryKdSypjSwn7Ncyw+i0OwtpiA06rTBzRLVb/iNvoExAWgHN+ vJMHUM13Jv71H1tDbmMw40xb6Rd8vZRSUYB6jfyGBR89bwkgHxWMil6a4JApfEQh zpAMT7UY28yjSo5zpBMV2oqM246CBvKUSL4gdrQpVpudz2H/myF0DrsYt0AnIpf+ yZEpPOYi0rAtI7e2XZLTTeqopTFS2bttKfmq/3uSQia8c1YgGpLhT/hVwDgmm/Ub 6m763fabQUaioKFPsPDyRYQY+64eEH/LRbtD0hAMsfbJYoAJhr0IHKNx8SAg8aaf HfHKFwXoiYT9a1VpSmoq5Z7vlhu/uLlSZiq7vPVYufsjW9ZiLj9yRCT45NzzKlxn KAdXGRV5MrHkZhw7YbCThwoVBgH2aFfNkOc94y4Z5ibK5DihXUN7nz/n+YQSbpoA Gqpr/9obmvXTrvaq7cdUykeYqanZSFF4MMa56k0wzhBwJBVCkqb+Ev5RkjdC+oc2 9XFIgrFffgkFJrkK2voAWwfek6phLew1CC+iu+qCFxTui9J73irE8H+PXkb11f5w RqVa8/gn2kpPuDIpojoS =RUcJ -----END PGP SIGNATURE----- --=-=-=--