emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-selection-mode as default (WAS: Some developement questions)


From: Drew Adams
Subject: RE: delete-selection-mode as default (WAS: Some developement questions)
Date: Sun, 9 Sep 2018 08:12:26 -0700 (PDT)

> No, you're not the only disliker of d-s-mode.  I utterly detest it, to
> the point that Emacs's lack of this feature was one of the things which
> attracted me to Emacs in the first place.  At last, an editing program
> with a rational, well thought out interface!  A thing I hated about these
> other programs was that I could have spent a long time building up a
> (highlighted) region in them, only to lose it irretrievably on carelessly
> typing an arrow key without <shift>. 

Why "irretrievably"? What happens if you hit `C-w' by mistake?
Do you lose the cut text irretrievably?

> I appreciate that Emacs's d-s-mode doesn't suffer all these
> drawbacks, but it does suffer some of them.
> 
> I believe delete-selection-mode is objectively bad; deleting/killing
> potentially large areas of text should not occur as a side effect of
> something whose main action is smalll (like inserting a single
> character). 

You conceive of the action in question as being just to insert
a character. But if the region is active and d-s-m is on then
the action is replace the region with the character.

Who controls whether the action is to do one or the other?
You do, by activating or not activating the region. Your choice.
Nothing requires you to activate the region and then insert
the char. You can insert it without activating the region first.

With `transient-mark-mode' came the concept and behavior
of an active region. Emacs is great by having a region that
can be either inactive or active. You can still use an inactive
region (as I'm sure you know and do), so perhaps "active"
is a bit of a misnomer.

The point of activating the region is to act on it. One way
of acting on it is to replace it, and when d-s-m is on that
can happen by yanking or typing replacement text.

Who controls whether the region is active? You do.
Who controls whether and how to act on the active
region? You do. Who controls whether d-s-m is on
or off? You do.

If someone wants to complain about a command
unnecessarily doing two things ("side effect") then s?he
could start by blaming `C-x C-x'. Why does it not only
swap point and mark but also activate the region?

The answer, no doubt, is that someone (who introduced
t-m-m and region "activation") thought that's handy behavior
(saves a keystroke).

Exactly the same kind of handiness comes from d-s-m
performing an implicit `C-w' (for most commands, although
that's configurable per command).

> As well as being bad UI, it violates the "do one thing and
> do it well" principle.

Tell that to `C-x C-x' ;-). And to any number of other Emacs
commands - maybe most!

> In the current polling exercise, I would urge those interpreting the
> responses to take account not merely of the numbers of
> supporters/detractors but the strength of feeling behind those responses.
> I've seen several such that strongly dislike d-s-mode, but haven't seen
> any saying "I utterly detest editors lacking delete-selection-mode".
> That suggests to me that we should not enable this mode by default.

Where's the poll, BTW? I fully expect support for d-s-m to lose
the vote at this point (but not in a few decades ;-)), but I support
taking a poll. It should of course be a user poll, not just a poll of
this mailing list.



reply via email to

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