Dangerous space bar key (was: Preventing the user shooting themself in the foot)

Austin Clements amdragon at mit.edu
Wed Jul 6 06:25:41 PDT 2011


On Jul 5, 2011 4:23 PM, "Matthieu Lemerre" <racin at free.fr> wrote:
> On Mon, 04 Jul 2011 17:03:51 -0700, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
>> On Mon, 04 Jul 2011 23:36:35 +0200, Matthieu Lemerre <racin at free.fr> 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).
>> >
>> > 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:
>
> [...]
>
>> Notice I also made it so that this does not exit the current thread
>> view.
>
> I patched notmuch to use exactly the same function... Given that we are
> two people who independently requested for this behaviour, I think this
> should at least be a customisable option, and imo the default should do
> nothing and not archive the thread because of this dangerous
> behaviour. And, hitting 'a' instead of space to go to the next thread is
> the same number of keypresses...

Make that two and a half (I haven't actually replaced this function,
but only for lack of time).

Had I replaced it, though, there are two variations I would have
tried.  Have you guys considered these and, if so, any thoughts?

* Make SPC mark the *current* message read and move to the next one,
rather than moving to the next and marking it read.  This way, you're
acknowledging the message as read once you've actually read it, rather
than having notmuch mark it read before you've actually read it.
notmuch's eagerness to mark things read has always bothered me.  For
example notmuch-show-archive-thread has the side-effect of marking the
first message of the next thread read (which I may not even know
exists!).  An acknowledgement-based approach seems like it would
address problems like this (so would better visual feedback, but
that's another issue).

* At the end of the thread, return to the index view.  This way, if
you want to archive the thread, you can still just press 'a', but if
you don't, you're already set to navigate to another thread.


More information about the notmuch mailing list