Subject: Re: bug#18493: 24.3.93; posn-col-row should take text-scale-mode into account

From: Eli Zaretskii <[email-masked]>
Date: Fri, 19 Sep 2014 09:11:39 +0300

> Date: Fri, 19 Sep 2014 00:55:06 +0400
> From: Dmitry Gutov <[email-masked]>
> CC: [email-masked]
> 
> On 09/18/2014 06:58 PM, Eli Zaretskii wrote:
> 
> > That's the intended behavior: posn-col-row is documented to return the
> > coordinates of its argument in canonical character units.  And that is
> > what it does here.  There's no bug here.
> 
> Fair enough. Maybe define an alternative function, which does take  text 
> zoom into account?

I'm not yet sure what that other function should do.  See below.

> Text zoom is different from all the other features you enumerate here, 
> though. In programming language buffers, I usually have no images or 
> proportional fonts, but zooming the text is something that happens once 
> in a while.

Is company-mode only for buffers whose major mode is some programming
language?  I thought it was more broad.  But even if it is only for
programming languages, does it mean that the API you wish existed
should only cater to such modes?

> The "current column" obtained from the return value of this function, is 
> used to position each line of the popup in the display string of the 
> overlay that spans the next few lines.

So what you actually need is to find the correct X coordinate for the
screen line _below_ (and maybe also above) the one where posn-col-row
is called, is that right?

If so, first question is why not do all this in pixels?