[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add non damaging kill-line

From: Dan Jacobson
Subject: add non damaging kill-line
Date: 10 Jun 2001 00:55:03 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Our goal today is to get some text into the kill ring.

I like the action of C-k in read-only buffers.  With one keystroke one
can manage to do the work of the painful C-@ C-e M-w that one needs in
a read-write buffer if one does not want to cause the buffer to be
modified by C-k C-y.

By the way, C-h k C-k doesn't mention its bonus action on read-only
buffers.  If you come to think about it, telling people to use C-k in
read-only buffers is very bad practice, as you are encouraging them to
use a command that causes an error ["read-only buffer"] upon each
invocation, and this is then supposed to be a "normal practice" with
the visual bell etc. flashing at each use.

So why doesn't emacs add a "non damaging C-k" command that would do
all the things we see C-k doing in a read-only buffer today, except for
raising an error.  Also it could do the same things in a read-write
buffer without having to cause the buffer to be modified, etc.  Let's
look at those advantages: 1. Uniform behaviour of a command vs. two
different behaviours of C-k today. 2. Not encouraging the user to
think that breaking the law [raising an error] is to be a normal part
of a day's activity.  3. Giving the user an alternative to the painful
finger twisting C-@ C-e M-w or the reckless cop-out C-k C-y [why train
the user cut an article out of the newspaper just to photocopy it,
then paste it back, when he could just photocopy it in place, if it
weren't such a finger twister.]

Disadvantages: need a keybinding as easy as C-k to make it fun to use,
and I suppose the real-estate market for portable easy keybindings is
tight these days.

[By the way, a C-k in a read-only buffer puts the cursor at the end of
line, but in a read-write buffer, the cursor stays at the beginning of
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]