emacs-devel
[Top][All Lists]
Advanced

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

Re: Why was `transient-mark-mode' turned off for `delete-selection-mode'


From: David Kastrup
Subject: Re: Why was `transient-mark-mode' turned off for `delete-selection-mode'?
Date: Fri, 05 Sep 2014 18:14:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Drew Adams <address@hidden> writes:

>> I find myself trying to figure out a good way to unhighlight a
>> selection half of the time when I am trying to edit a link in a
>> browser or something that pops up highlighted for some reason.
>> It is total nuisance behavior without a generally available way
>> to turn the unasked-for selection off.  The other half of the time
>> I inadvertantly delete material.  Sometimes it can be recovered
>> by C-z (depending on the application).  Sometimes not.
>
> Clearly, d-s mode is not for you.  Fortunately, anyone can choose
> the behavior (a-d) that s?he prefers.
>
> But I wonder if your surprise and annoyance with such behavior
> outside Emacs might have something to do with your not using d-s
> mode inside Emacs.

My suprise and annoyance with getting punched in the face in a bar might
also have something to do with me not being used to being punched in the
face at home.

That does not make it a better idea to let me get punched in the face at
home.

Basically you continue arguing that one can get used to getting annoyed.

> I use d-s mode, and I am not surprised outside Emacs by a highlighted
> selection or its deletion if I hit a deletion key or its replacement
> if I type text.  And that's a point in favor of turning on d-s mode
> by default: it is quite common UI outside Emacs.
>
>> Your only argument so far has been "others do it".  But that's not,
>> in itself, a good reason to let Emacs adopt default behavior that
>> gets in the way of productive work.  
>
> I agree 100% that how things work outside Emacs should not be the
> *only* reason for how they should work inside Emacs.  I have opposed
> turning on CUA mode by default, for instance.
>
> Just as you find d-s mode off more natural and less conducive to
> mistakes, so I find the opposite.

And then you continue to explain how to best deal with the mistakes it
causes you to make, and how to anticipate them best.

You don't actually point out anything useful about that behavior.

>> > 3. Besides having the limitation of not being able to just
>> > type to replace the region text, the current situation
>> > suffers from treating mouse selection exceptionally.
>> > A mouse selection has the deletion behavior of d-s mode,
>> > but without its type-to-replace behavior.
>> 
>> Are you sure about that?  Like, really sure?
>
> Well, let's see (I'm on MS Windows; YMMV):
>
> 1. emacs -Q (any Emacs version you like).
>
> 2. In *scratch*, select some text with the mouse.  Take
>    your pick how you do this: drag mouse-1 or double-click it,
>    or click mouse-1 then mouse-3 elsewhere, etc.
>
> 3. Type some text.
>
> For me, the typed text is inserted at point, without any of the
> selected (and highlighted) text being replaced.
>
> If I hit a deletion key (e.g. Backspace or Delete) then the
> selected text is deleted.  And that's the behavior I described.
> Do you see something different?

That's not the entirety of your claim.  The entirety of your claim is
"the current situation suffers from treating mouse selection
exceptionally."

Try marking a region in emacs -Q with _any_ of the mouse, or with
shift-cursor, or with C-SPC and some movement.  Then type DEL.  You'll
see that _any_ way of marking a highlighted region will cause DEL to
delete that region.

Your claim of the mouse selection being treated specially is bogus.

-- 
David Kastrup



reply via email to

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