emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-selection-mode (was: Put scroll-bar on right by defaulton UNI


From: Drew Adams
Subject: RE: delete-selection-mode (was: Put scroll-bar on right by defaulton UNIX.)
Date: Thu, 18 Mar 2010 10:15:11 -0700

> > It's also often useful to me to have the text being 
> > replaced on screen as I begin to type the replacement text,
> > rather than delete and insert separately.

Him and me and zillions of others.

> OK.  The penalty for that convenience is having your region 
> explode and disappear when you accidentally type a self-insert
> character (or arrow key).  This might happen if you hit the x
> before the M in M-x, or something like that.  Or, you might
> regionify a defun with C-M-h for some
> reason and accidentally lose it. 

The risk you describe exists in theory, and I suppose it occurs occasionally in
practice. But honestly, my impression is that you simply have not used d-s-mode
much or this would not be a problem in practice.

99.999% (no, no proof; just a guess) of computer users out there use this
"risky" behavior everyday, all day long, without exploding (and without Emac's
powerful undo as a remedy).

I submit that you see it as a problem simply because you are not used to it. If
you don't treat the active region as, well, active, then yes, you'll probably
step on your own toes a few times.

> the accidental explosion hazard dominates for me (in non-Emacs
> environments, where I can't disable the (mis)feature).

Well now. That's JUST EXACTLY the problem we're trying to solve by making the
Emacs default behavior resemble the behavior outside Emacs.

Your solution is perhaps to avoid using anything outside Emacs (since you can't
make that fit the behavior you're used to). That's not a general solution,
especially in terms of making Emacs accessible to people who are already "out
there".

> It's "obviously" useful to be able to type extra text into an already
> "existing" region.  The region is used for many things other than just
> being deleted.

Not a problem. It is only when the region is *active* that typing replaces it.
Emacs gives you the best of both worlds: the region can be active or inactive.

> we should never make something default in Emacs if it's likely to
> provoke the angry reaction "How do I disable this *!£$ing thing?".
> delete-select-mode falls into this latter category.  So does
> transient-mark-mode.

So we should remove t-m-mode as the default?

We all agree that whatever the default behavior is we should do our best to let
users know how to change the defaults.

> Is there any evidence that delete-select-mode is instrinsically a good
> thing, disregarding the fact that it has become common?

Which do you do more often: (a) replace the text in the region or (b) set mark,
move somewhere else, and insert text?

With d-s-mode, the former is simple and the latter requires that you hit C-g (to
deactivate the region). Without d-s-mode, the latter is simple and the former
requires that you hit C-w (or DEL/delete-region).

You could say "six of one; half a dozen of the other - a toss-up". If you think
that, then we're back to the argument about fit (by default) with the outside
world. And that argument is not negligible.

> One reason people might have come to Emacs is to escape the (to them)
> deity-awful key sequences they've been forced to use up to now.

That's an amazing statement, Alan. I've never heard anyone claim that people
come to Emacs because the key sequences they use elsewhere are too difficult.
It's usually the opposite we hear about Emacs: "What's with all the crazy C-M-S-
contortions?"

You've been inside Emacs so long that it's second nature to you. Take a look
outside the window, and imagine that you're out there looking in at Emacs. This
is about setting the default value. In particular, it's about picking a default
that is helpful to new users but is also useful in general.





reply via email to

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