emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-selection-mode


From: Drew Adams
Subject: RE: delete-selection-mode
Date: Mon, 22 Mar 2010 00:48:32 -0700

> >     Let's make shift-selection and mouse-selection 
> >     _identical_ with regard
> >     to the outcome, with regard to visuals and semantics.
> >
> > That seems like a good idea to me.
> 
> _All_ types of visible selection should be the same, including t-m-m
> (C-SPC + movement) selections, to the greatest extent possible.
> 
> Having multiple "types" of selection that are
> sorta-the-same-but-sorta-different is just going to make 
> Emacs harder to use for everybody, and harder to learn for
> beginners.
> 
> If a beginner tries to use (superior) Emacs-style marking (t-m-m),
> suddenly habits which seemed to work for them when using the 
> mouse will fail.  This is bad.
> 
> If an expert user wants to use DEL to delete a t-m-m region, that will
> fail, for no good reason.  This is stupid.
> 
> Yeah, I know, mouse-selection is currently "special".   It shouldn't
> be -- that was a bad decision.  Adding shift-selection to the mix just
> makes things worse.

On this question of mouse-selection specialness I agree with Miles. I wrote the
same thing before. I disagreed with our adding the special treatment of mouse
selection (e.g. DEL) and shift-selection.

1. That's one reason my preference would be for vanilla `delete-selection-mode'
to be the default. Both mouse selection and non-mouse region behaviors would be
type-to-replace by default - they would be the same in all respects.

Since d-s-mode anyway provides type-to-replace behavior, we can remove any
exceptional mouse-selection behavior. DEL-to-delete for the mouse, added in
Emacs 22, is a special case of type-to-replace, and it is provided by d-s-mode
(it's where `delete-selection-mode' gets its name).

That way, users who turn off d-s-mode would never be bothered by its behavior,
even for mouse selection: no type-to-replace. And newbies would get the mouse
behavior they expect, by default.

There would be no inconsistency between mouse selection and ordinary region, for
either newbies or old-timers, whether you like or dislike type-to-replace.

1a. What about shift-selection? Dunno. My own inclination would be to forget
about it, and just teach newbies to use C-SPC. They would have the
mouse-selection they expect, and if they are going to use the keyboard more and
more, then they might as well learn C-SPC.

Using shift-arrow keys to select is anyway not available everywhere, unlike
mouse selection. It is typically available only for editable fields, not for
read-only text. In Internet Explorer, for example (to cite the devil), it is
available only for input fields such as a URL, not for read-only Web-page text.
(For page text, the shift-arrow keys scroll the window horizontally.)

But as I say, I dunno about shift-selection. What Miles wrote in another mail
about it (defending it) also makes sense to me. If people feel that it is
important, then we should keep it. But the behavior of the resulting selection
should nevertheless be identical to that of the active region (whether in
d-s-mode or just t-m-mode).

2. Alternatively, we could remove mouse-selection specialness, as #1, but not
make d-s-mode the default. That is, revert the mouse-selection exceptional
behavior so it becomes the same as the ordinary region behavior, but turn off
d-s-mode by default. That would satisfy those who don't like type-to-replace or
are worried about its "dangers" for the ordinary region.

But in that case, we would need to take special measures to let newbies know
that d-s-mode exists to give them the type-to-replace behavior they expect, in
particular for mouse selection (which is what they're used to).

3. A third route would be to do what David and Richard are proposing for the
default: make it type-to-replace, but only for mouse selection.

In that case, the mouse behavior would be quite different from the normal region
behavior, not only by default, but always, whether d-s-mode is enabled or
disabled. Users would have no way to control the mouse-selection behavior to
turn off type-to-select and DEL-to-delete (the latter restriction is already the
case, AFAIK).

But at least the mouse behavior would be similar to what new users are used to.

I think #3 is not the best approach, including for the reasons Miles cited. But
I also think that we should somehow help new users to find the mouse-select +
type-to-replace behavior that they are used to.






reply via email to

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