Closed divansantana closed 3 years ago
C-w in notmuch-message-mode would by default kill the quoted buffer text in the reply.
Are you saying that's the normal binding there?
I'm not a notmuch user, but if that's a text editing mode, ie. for writing emails, then C-w seems a bad key for notmuch itself to override in the first place, and I don't think whole-line-or-region itself should work around every such instance.
When one does a reply to an email, it opens a buffer and quotes the replied text.
Hitting C-w in this notmuch-message-mode runs kill-region which is the default binding. Strangely this will kill the quoted text, even though that text is not currently selected.
With whole-line-or-region enabled, it doesn't work.
Interesting. That's a bit quirky. I guess notmuch calls "push-mark" before inserting the reply, so you're really relying on implicit (non-transient-mark) region behaviour in this case, and that's not really something that whole-line-or-region
is designed for. I don't think there's anything special about notmuch-message-mode
, in that users are generally just as likely to want whole-line-or-region
there as in other modes.
For this specific case, either you can C-x C-x
to highlight the active region then C-w
to kill it, or you can locally add the mode to the list of inhibited modes, but I don't think it's warranted to change the default inhibit list, sorry.
@purcell that's perfect, thanks. I didn't quite understand how it works. At least the issue is documented an issue report now.
I'll use C-x C-x to highlight it first and keep whole-line-or-region as is.
Hi,
Perhaps set notmuch-message-mode to the modes that are inhibited.
C-w in notmuch-message-mode would by default kill the quoted buffer text in the reply.