GNU bug report logs -
#18493
24.3.93; posn-col-row should take text-scale-mode into account
Previous Next
Reported by: Dmitry <dgutov <at> yandex.ru>
Date: Wed, 17 Sep 2014 22:15:02 UTC
Severity: normal
Found in version 24.3.93
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #89 received at 18493 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 19 Sep 2014 22:08:14 +0400
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> CC: 18493 <at> debbugs.gnu.org
>
> >> I'd like to reiterate here, that I'd be satisfied just with some
> >> instructions how to convert the current `posn-col-row' return value
> >> into value that respects text scale.
> >
> > I still don't understand enough what that means to answer, sorry. See
> > below.
>
> What I had in mind, is instead of dividing the pixel coordinates by
> `frame-char-width', first scale it according to the text scale level.
You describe a means to get what you want, but don't explain why you
need that. Why do you need to divide the pixel coordinates by
something? What do you want to achieve by that division? What are
you going to do with the 'scaled" column?
> >> But from `posn-col-row' I actually take the screen column value
> >
> > And do what with it? Please be specific, and please don't spare me
> > the details. I don't have your knowledge of what company-mode does to
> > answer these questions myself, and I have only a very vague idea of
> > how you arrange the display of the completion candidates and how the
> > "column" reported by posn-col-row enters that picture.
>
> I think I've described it already in previous discussions. e.g. in
> http://debbugs.gnu.org/18195
If that were enough, I wouldn't be asking for more details.
> For better description, you could just read the code
Sorry, I don't have time for that.
I don't insist that you explain things to me, I'm trying to help you
find the way of computing whatever it is that you need. Feel free to
give up on me.
> > E.g., given arbitrary pixel coordinates, posn-at-x-y will give you the
> > object at those coordinates and character position within that object.
> > Is that what you need?
>
> Not really: for example, if there's a tab character there, the value
> will be too imprecise (I need to know the exact column inside the tab).
That can be computed.
> Or if there's an existing overlay there, I'd try my best to ignore it.
> "character position" within its display string won't help me in the least.
Not sure what you mean by "ignore", but the value tells you that you
have a string there, so you can do whatever you want.
This bug report was last modified 10 years and 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.