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

Matthieu Lemerre racin at free.fr
Mon Jul 4 14:36:35 PDT 2011


On Wed, 29 Jun 2011 20:42:01 +0100, Robin Green <greenrd at greenrd.org> 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 take advantage of this thread to tell about another dangerous
situation I've found related to the use of the space key in show mode.

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 think the "and-archive" part of the space bar key should be at least
configurable. The patch is pretty simple but I can provide it if needed.

Note: The n and p keys are not good replacement for space/backspace.
First, because they do not remove the 'read' tag. Second, when you are
in the middle of a message, the p key go to the previous message instead
of going on top of the current one. (Actually, the behaviour of n is
fine, only p is annoying me). I think this is inconsistent with what
others mode do (e.g. C-M-u in programming modes, or C-c C-p in
org-mode), and the p key when in a message should go to the beginning of
the current message.

Matthieu


More information about the notmuch mailing list