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 defaultonUNIX


From: Drew Adams
Subject: RE: delete-selection-mode (was: Put scroll-bar on right by defaultonUNIX.)
Date: Thu, 18 Mar 2010 14:54:29 -0700

> I am by no means unique - there will
> certainly be lots of other people who suffer this feature likewise;
> there're another one or two on this mailing list.  The degree of
> suffering d-s-m inflicts on us far outweighs the slight increase in
> convenience for you.

Just say no. Just turn it off.

The discussion is about the _default_ behavior. Are you suggesting (a) that
*most* new users already suffer from this problem outside Emacs and (b) they
therefore need the Emacs default to be different from the outside behavior?

> > 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).
> 
> We do not know, since these users are forced into it without having a
> choice.

Should we assume that they are exploding all over the place? Don't you think
this would be common knowledge by now?

> > 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.
> 
> I use Emacs because it is (or rather, was) a stateless editor,

Huh? I don't think so.

> as contrasted to vi.

Yes, OK, it is less modal than vi. More precisely, it has modes all over the
place, instead of just 2 (or is it 3) modes. But Emacs is far from stateless.

> d-s-m adds in yet one more frivolous state-dependent behaviour.

Why frivolous?

>From the moment that you have t-m-mode, you have active regions, hence
state-dependent behavior. In fact, from the moment that you have a mark (!) you
have state-dependent behavior. And long before that even...

> Even with transient-mark-mode, you can still (currently) depend
> on `self-insert-command' to just work. With d-s-m you can't.

Sure you can. `self-insert-command' works fine with d-s-mode. You can depend on
things acting the way they are documented, in a consistent way. That way is
*different* from when d-s-mode is not enabled, but it is no less dependable.

> However, with simple transient-mark-mode, the problem doesn't exist.
> Even a naive newbie would very quickly learn to hit the <delete> key if
> d-s-m weren't enabled.

But a newbie wouldn't easily find out how to get the type-to-replace behavior
that s?he knows and loves - or even find out that it is possible. ;-)

That's part of the problem we're trying to solve. No one has said that newbies
can't figure out how to delete selected text with just t-m-mode. The point is
that they don't know that they do not *have* to delete it first, to replace it.
They don't know that they can easily get the behavior they expect and are used
to.

> > > 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.
> 
> Stop playing with my words, please.

I don't think I am. Your point was that in Emacs we use the region for lots of
things besides replacing its text, and in particular we sometimes want to add
additional text to the region text. Right?

I agree. My reply points out that those uses of the region are still available
with d-s-mode - you need only deactivate the region. You're not losing those
other region features by using d-s-mode. That was my point.

d-s-mode gives you a replace feature when the region is active, but it doesn't
prevent you from having an inactive region and using it in other ways.

> > > 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?
> 
> I would say yes, but that argument was settled some while ago.  It
> wouldn't be a good idea to reopen it.

Agreed; we should not reopen it. (And it was a good change.)

> > > 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?
> 
> How about addressing the question as put?  Is there any evidence
> whatsoever for the intrinsic goodness of d-s-m?

I did answer it more directly in other posts (including text you cited in your
reply). But I'll repeat some of it:

Using d-s-mode and not using it are about the same in terms of
advantage/disadvantage, other things being equal: you need to hit an extra key
in each to be able to get the behavior that the other gives you directly. With
d-s-mode, the extra key is C-g (or C-u to prevent); without d-s-mode, the extra
key is C-w (or `delete-region'/DEL). From this point of view, it's a toss-up.

But other things are not equal, so it's not a toss-up:

1. The answer to my question above is #a, I think. People, including Emacs
users, more often replace the region text than they set mark, move, and insert
text.

2. Outside Emacs (Yes, Virginia, there is a world outside Emacs),
type-to-replace is the rule for selections. Using the same rule as the default
in Emacs helps both old users (only one behavior) and, especially, new users.

> My personal answer to your question is (c) something else.  I NEVER
> "replace the text in the region".  I frequently do (b), though I don't
> think of it in those terms.

I see. In that case, you would definitely want to disable d-s-mode, I expect.

But do you think that is typical of most Emacs users? Do you think it is typical
of non-Emacs users?

FWIW, I frequently do #a (as should be obvious by now). One particular use case
is yanking the secondary selection to replace the region. (Yes, I bind a
secondary-sel yank to a keyboard key. Dunno why vanilla Emacs relegates it to
the mouse.)

> > 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).
> 
> Yes.  Hitting C-g repeatedly is a horrible experience - it 
> makes a noise.

I don't hear a thing. But I've silenced `ding'.

> Hitting C-w is simple, hitting <del> is obvious even to newbies, and
> doesn't make any noise.

If the bell is the problem, we could perhaps silence it for this use.

And there's nothing magical about having chosen C-g as the key to deactivate. I
suppose another key could have been chosen.

C-g was presumably picked by someone who either doesn't use it (!) or doesn't
care about the bell (or doesn't hear it). I didn't choose it.

> > > 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.
> 
> Not "too difficult" but "deity-awful".  You do understand that
> distinction, I hope?

No. What did you mean exactly? What is the salient characteristic of the keys
outside Emacs that you think people complain about? "God-awful" might mean
something concrete to you here, but it doesn't to me. Just which keys do you
think they complain about? What God-awful keys outside Emacs make them come
running inside?

> > 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.
> 
> I remember learning Emacs well.  It was difficult and frustrating.
> Slight variations on Emacs's default would not have changed that one
> iota.

Did you happen to learn Emacs after using computers all day long for years,
selecting and typing text to replace the selection? That's the case for folks
nowadays. This is not 1985 or even 1995.

IIRC, you don't use a mouse (much, if at all), correct? And I'd guess you didn't
use a mouse before you came to Emacs either. That is so different from
99.999999% of the world nowadays that it makes you miss the point, I fear, about
_their_ learning Emacs.

It's not about you, Alan. And it's not about me. I turned on d-s-mode decades
ago. I don't want the default change for myself. I want it for newbies, in
particular.

I also think that some other oldbies will find it useful if they give it a
chance. I'm struck by the number of oldbies, including RMS, who've made it clear
in this very thread that they are not really familiar with d-s-mode. To any who
are open, I say, "Try it; you might like it."





reply via email to

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