emacs-devel
[Top][All Lists]
Advanced

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

Re: C-d deleting region considered harmful


From: Sebastian Rose
Subject: Re: C-d deleting region considered harmful
Date: Sat, 18 Sep 2010 22:22:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Christoph <address@hidden> writes:
> On 9/18/2010 9:05 AM, Drew Adams wrote:
>
>> No.  Both<delete>  and C-d, whether mapped together or not, should do what 
>> they
>> have always done in Emacs: delete the next char. Whether the region is 
>> active or
>> not.
>
> As for C-d and its command delete-forward-char, the documentation states:
>
> To disable this, set `delete-active-region' to nil.
>
> Imho, the default behavior is more consistent than the old behavior. C-d 
> without an active region deletes the character, with an active region deletes
> the region. Makes sense to me.

Consistent with what???

The old behaviour was _clever_ !



Imagine you have created an active region. Once you have done that, you
need to be really carefull how to proceed (slow down).



If you now decide to keep the region, you cannot go on with the next
natural editing command.  Instead, you must deactivate the region first,
or the text is gone (not for good, but see below).  (extra key press,
extra slot for remembering the region => slow down)

In those oh soo good "normal" applications you want Emacs to be
consistent with, any editing command will now replace the region.  Wich
is the course Emacs is going, obviously.  C-d does this already and the
rest will follow, since the newbies seem to tell Emacs what to do (to
find new users... bad intention --- this will make Emacs more "normal",
not better).

Note, that deliting just one character is a simple editing command, just
as adding one character.

Any of these simple editing commands can delete a whole bunch of text in
"normal" applications.  You might be used to that behaviour because it's
"normal", but I'm sure it caused you some headache from time to time :)


In Emacs, if you decide to delete the region, it's just pressing a `w'
instead of a `d' (or any other simple editing command).

In neither case, the region will be lost --- in Emacs.

Simple, isn't it?



Now imagine, for some reason, you have deleted the region.  A few
minutes later you recognize, it was a mistake.

Now, in "normal" apps, you press "UNDO" many many times, until you get
your region back.  You lose all the work done from deleting the region
onwards until this point in time.  This slows down editing again.  This
is stupid.  This is anoying even.


That's why we need to distinguish between commands that act on region
(e.g. `C-w') and ALL other simple editing commands, including `C-d'.




As most people here, I rarely use backspace or delete.  They're awkward
to type.  But defining them differently is a surprise, true enough.
This means the decision made was a mistake.





Sebastian



reply via email to

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