From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4E103431FD0 for ; Mon, 4 Jul 2011 17:04:07 -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 qzxYTZjzoAx9 for ; Mon, 4 Jul 2011 17:04:06 -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 AFC75431FB6 for ; Mon, 4 Jul 2011 17:04:06 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id A5E5466E0313; Mon, 4 Jul 2011 17:04:02 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com [98.149.172.122]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 74EE166E032B; Mon, 4 Jul 2011 17:03:58 -0700 (PDT) Received: by servo.finestructure.net (Postfix, from userid 1000) id 53DA21FF; Mon, 4 Jul 2011 17:03:59 -0700 (PDT) From: Jameson Graef Rollins To: Matthieu Lemerre , Robin Green , Notmuch Mail Subject: Re: Dangerous space bar key (was: Preventing the user shooting themself in the foot) In-Reply-To: <877h7xafto.fsf@free.fr> References: <86iproe86u.fsf@greenrd.plus.com> <877h7xafto.fsf@free.fr> User-Agent: Notmuch/0.5-292-gaa2fa19 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 04 Jul 2011 17:03:51 -0700 Message-ID: <87pqlpioew.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: Tue, 05 Jul 2011 00:04:07 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 04 Jul 2011 23:36:35 +0200, Matthieu Lemerre wrote: > I like to use the space (and sometimes the backspace key) to read > threads back and forth, but sometimes I might read stuff to quickly and > archive a thread without wanting it. It is then complex to find it back > (especially if the thread contained a single message and I hit space > before actually reading the message, so I can't find it again). >=20 > As a workaround, I have changed the space key function > "notmuch-show-advance-and-archive" to not archive the thread if we are > at the end of the thread, but to just do nothing. Thus I have to > expicitely archive the thread when I have finished reading it, which I > find much safer. I completely agree with your discomfort with the current function bound to space. I don't like it at all, and I similarly rebound space to be a much more sensible function: (defun notmuch-show-advance () "Advance through messages in a thread." (interactive) (let ((end-of-this-message (notmuch-show-message-bottom))) (cond ;; Ideally we would test `end-of-this-message' against the result ;; of `window-end', but that doesn't account for the fact that ;; the end of the message might be hidden, so we have to actually ;; go to the end, walk back over invisible text and then see if ;; point is visible. ((save-excursion (goto-char (- end-of-this-message 1)) (notmuch-show-move-past-invisible-backward) (> (point) (window-end))) ;; The bottom of this message is not visible - scroll. (scroll-up nil)) ((not (=3D end-of-this-message (point-max))) ;; This is not the last message - move to the next visible one. (notmuch-show-next-open-message)) ))) Notice I also made it so that this does not exit the current thread view. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOElTnAAoJEO00zqvie6q8gt0P/ix/qEvYJdJQCT8XRcivXSFP vZfspYQzEuLQjP+ydGVMRSeD4cR4g6BmnDeCzlA13EmVGXsAjlgF6i8xEUdh1tVB eBErN5ZKSMRnCShfsw2gAwi5p1KgMZdANM4jGYlWj6gmRsj1jnKAdpOOEnH+cZNl D224tFE8BQ5eLyxmrJyqdDsgaSgMGfP8DpMh5KqdANdI4PCzvHK3lcHz88NeAR6N TgBOSCJByHRKiVXzU4E7TkslSGAeojpyldPVjqk8wa+wLIn7+zRK8GcJH3zB2HJR y6AihlTyFQZGgV3DS0hNbwiUcSt6IM8qotkGOG/jl95HoNBdyZIjf6KJdkq7LzHP ann8qtI18hfnhmRHyEv7pkw4R7TygwZLrrqQOG4+IYZh7LpmUyXOdQj9ib1N/clZ qmx7Xmg+BGviBRSVJyAXHK0zet9+Y7seVv5y0DXOotG0o114A9hGRFigLXT6KJEP 1ak91fL7QtV+s2CI7FcIk1Nl7/VNPflMDGS77id7uY8zL+Yr3d5iePW86LHz+OKI jbWli/h4jWmdcaEvYY1YaDXDKsjmdFsvTsOuz40FsDwgIdhgBNNWeJZOiLnrp12f EldNaaY6vF1XpPG5v1J8uQBxRYsU9ai4GtUPUfoaR4vjbG7gbFUbVa4HNUOPHY73 /WV1M3mBxWyfI64Mn9wD =+XHZ -----END PGP SIGNATURE----- --=-=-=--