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 6E81C421186 for ; Wed, 29 Jun 2011 13:37:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled 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 wHzhvm2FVmFc for ; Wed, 29 Jun 2011 13:37:28 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id D62F2429E5F for ; Wed, 29 Jun 2011 13:37:27 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 9670D32811D; Wed, 29 Jun 2011 13:28:41 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from servo.finestructure.net (m17.ligo.caltech.edu [131.215.115.117]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 918A33280E5; Wed, 29 Jun 2011 13:28:38 -0700 (PDT) Received: by servo.finestructure.net (Postfix, from userid 1000) id 5EA6955D; Wed, 29 Jun 2011 13:37:24 -0700 (PDT) From: Jameson Graef Rollins To: Robin Green , Notmuch Mail Subject: Re: Preventing the user shooting themself in the foot In-Reply-To: <86iproe86u.fsf@greenrd.plus.com> References: <86iproe86u.fsf@greenrd.plus.com> User-Agent: Notmuch/0.5-292-gaa2fa19 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Jun 2011 13:37:21 -0700 Message-ID: <87fwmsxtku.fsf@servo.factory.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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, 29 Jun 2011 20:37:28 -0000 --=-=-= On Wed, 29 Jun 2011 20:42:01 +0100, Robin Green wrote: > It's really dangerous to use the 'a' key in notmuch-mode in an inbox > thread which has multiple unread replies! Yes, the other unread replies > will still be tagged unread, but the user might not immediately be aware > of them. It would be really useful to have an optional warning ("More > unread messages in this thread, are you sure?") for this situation! I think that's a bit extreme, but I agree that the default behavior of the emacs key bindings are not good, particularly in regards to archiving messages. I should probably just send in all of my emacs UI tweaks as patches, but here are a couple of functions/bindings I've added to my .emacs to make the message processing more sane. The main new function is notmuch-show-next-open-message-or-pop, which will jump to the next message in the thread, or pop out of the thread if you're on the last message. I then use this in my tag processing functions, such as archiving and deleting. hth. jamie. (defun notmuch-show-next-open-message-or-pop () "Show the next message or pop to parent search." (interactive) (let (r) (while (and (setq r (notmuch-show-goto-message-next)) (not (notmuch-show-message-visible-p)))) (if r (progn (notmuch-show-mark-read) (notmuch-show-message-adjust)) (let ((parent-buffer notmuch-show-parent-buffer)) (if parent-buffer (progn (kill-this-buffer) (switch-to-buffer parent-buffer) (forward-line 1))))))) (define-key notmuch-show-mode-map "a" (lambda () "Archive current message and advance." (interactive) (notmuch-show-remove-tag "inbox") (notmuch-show-next-open-message-or-pop))) (define-key notmuch-show-mode-map "d" (lambda () "Delete current message and advance to next message." (interactive) (notmuch-show-add-tag "delete") (notmuch-show-next-open-message-or-pop))) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOC40CAAoJEO00zqvie6q88eUP+gPzsSfg9ch7WjKrAjoFKMCJ zL//KI8JVx4uw0+QhIKatfnlPPvjMBeMDtCDyHUocxBvEsnDxS16X2fs8pCy0jya TY31yQYmudn+c9WuAJtGQUfcpMHOLzWROQISRH/y1dJD1JzON52cRGY+LNxXx9Qa SElCkP0+TD3A4lLqiFJ/nLeFdz00CJ4r1DMkeLbo3qpLPLr5emK3G5ysgEv07RzU D2ohdMJlUU3FM138brSTIgK570P295vyFuroOMBeuYVqIjH/GtUQIiOxy8PpMHsv VccbUOBVT4ol3evnJJh+feDjkeGy8+3PF91ERqCAsvRBfl6/1UyI+3ju5Ao91OgG Q0pehPZGBBB3wxUyX6m6hvdOXvkc2vVba9a3GDnDmo53hqv69J2n+7roJeqSaNvj TntZ/DQSBRQG6ZrOt+BjSkJPQn3j5j4qCvjc/jfBVArfdOAPGXGMGH1ICDmUKHvM G+R756JoyD+Ro27dhcWvE0qzE2xi7NPM0M6GBRsZQRSBfJ45gwxH45+N4jNi8U3v Q2AMUohppIouoxwZgk11XyxdYD5EdM0Nc87BSJwpfRlXoq+Uf9r+jzVYzswiITn4 r8IXCFruts5Md1McZPK7wU+nnMX8B73772XsNgiHPE0wiG/Z91sOY85RLSzDrXCa a4OY+Hez4nSH/PLTM8Ac =1Pef -----END PGP SIGNATURE----- --=-=-=--