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

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

Re: Selection threshold with mouse


From: Eli Zaretskii
Subject: Re: Selection threshold with mouse
Date: Sun, 20 Jul 2014 18:04:23 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sun, 20 Jul 2014 10:37:26 -0400
> 
> > We don't currently have a method to find the character to the left of
> > some screen coordinates (except some silly iteration that each time
> > sheds 1 pixel from the coordinates).
> 
> Can't we:
> - get the posn-at-x-y.
> - find the left and right pixel boundaries of the object at that posn.
> - call posn-at-x-y again on those boundaries (+1 or -1)?

That's the "silly iteration" I had in mind: the 2nd part of this is
the tricky one, because all we know from posn-at-x-y and its ilk is
the pixel width of the object at the coordinates we pass to the
function; we don't know the coordinates where the object starts.

> And as pointed out by Michael, you'd probably not want this to be
> enabled all the time.

Actually, I disagree: every other GUI app I could try behaves like the
OP asked by default, so I see no reason for Emacs to offer an option
here.

The problem is to implement this in the first place.



reply via email to

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