bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23478: 25.0.93; Mouse region selection asymmetry


From: Drew Adams
Subject: bug#23478: 25.0.93; Mouse region selection asymmetry
Date: Mon, 4 Jul 2016 15:29:54 +0000 (UTC)

> If by "it" you mean the new behavior, then I agree nobody needs it, in
> the sense that it doesn't provide any functionality you can't get
> another way (e.g. by selecting a region by means of key combinations by
> dragging the mouse instead of by double-clicking).  Nevertheless, I've
> always been slightly annoyed when I've encountered the issue, just never
> enough to try and do anything about it till now.
> 
> >> I think opting in is best in cases where it's
> >> likely that some people may prefer (or some code may depend on) the
> >> existing behavior, or where the new behavior may bring a disadvantage in
> >> some case.  But I don't think any of that is likely in this case
> >> (indeed, I really think the existing behavior is a misfeature).  Your
> >> concern about the interaction with scroll-conservatively applied to my
> >> initial patch, but you yourself suggested a better alternative that
> >> allays this concern.  Given that, I ask again, and not rhetorically, do
> >> you see a strong downside to having the new behavior be the default?
> >
> > Let's make one step back and describe the exact change in behavior
> > with the last patch, OK?  Maybe some of us (e.g., me) don't really
> > understand what is the change.
> 
> It simply makes selecting a region by double-clicking with the mouse
> more uniform; as I wrote in my OP, the current behavior is this:
> 
>    When you select a region by double-clicking with mouse-1 and the end
>    of the region is below the last visible line of the window, Emacs
>    recenters the display, making the entire selected region visible
>    (unless it's larger than half the window's height).  But when you
>    select a region by double-clicking with mouse-1 and the beginning of
>    the region is above the first visible line of the window, Emacs does
>    not recenter the display, so the entire selected region is not
>    visible.
> 
> With the patch the behavior is now simply this:
> 
>    When you select a region by double-clicking with mouse-1, Emacs
>    recenters the display, making the entire selected region visible
>    (unless it's larger than half the window's height).
> 
> To me (and I think Noam agrees), this is the behavior I would expect,
> while the current behavior is less user-friendly; I can't think of a
> reason why anyone would dislike the new behavior or prefer the current
> behavior, but maybe someone can provide a use case.

I haven't really been following this thread.  Now that I've read
the summary description of the problem (I have not tried the fix),
here are my two cents, FWIW.

1. I agree with Eli about new features generally being opt-in, not
   opt-out.  Actually, he spoke of "backward-incompatible behavior",
   and I agree with that "almost always" approach too:

   "I think backward-incompatible behavior should almost always be
    opt-in, unless we have no choice."

2. I see plenty of _bug fixes_ that have backward-incompatible
   behavior, and that are neither opt-in nor "have no choice".
   No, I'm not going to look for a list of them.  But this is
   definitely my recollection and impression.  (And it is usually
   not a problem - I am not complaining that it is here.)

3. In this particular case, I agree with Stephen.  I really don't
   see why someone would complain about this fix.  And if someone
   does then it should be easy enough to discuss and DTRT at that
   point.

4. Also in this case, as Eli said, this is not a big deal either
   way.  But I see (so far) no reason for keeping both behaviors
   and providing a user choice here.  If the non-recentering
   behavior were the case for both directions then I can imagine
   that someone might argue for a choice (recenter or not).  But
   I don't think that will happen here.

In sum, FWIW my vote would be to fix this unconditionally, and
not bother with a user option for this.

(This should apply only to the case where the entire region _can_
be shown in the window, of course.  If it cannot (too big), then
there is little reason to recenter.)





reply via email to

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