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
View this message in rfc822 format
> Date: Thu, 18 Sep 2014 08:37:21 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
>
> > > I don't understand why the value changing helps, instead of hurts,
> > > in that context. I would think that the column should not change
> > > just because the text is scaled. But I'm probably missing
> > something.
> >
> > Take a look at the implementation. The function takes pixel
> > coordinates and divides them by the frame-default character dimensions.
> > text-scale-mode is buffer-local, so it doesn't change the latter.
>
> Yes, I guessed that. That sounds like the wrong behavior, to me.
> The frame char size is not useful here, I would think. What counts,
> for visual _columns_ is the visual char size, i.e., from text scaling.
Perhaps in the case of text scaling, it does (and even then there are
reasons for the current behavior, see my other mail).
But text scaling is just one particular feature that Emacs display
supports; there are many more where it is meaningless to talk about
"columns". E.g., how do you measure an inline image in columns? what
would be the "column" of the first character displayed after such an
image? What about stretches of whitespace created by the likes of
':align-to' display properties -- how do you measure them in
"columns" in some useful and predictable manner?
Either we want a general solution, or something for "simple" use
cases. The former is not possible, as I hope you will agree; the only
general solution is to use pixel coordinates. The "simple" solution
we already have, it just doesn't go far enough to cover text scaling,
and it will take some serious arguments and real-life use cases to
convince me that we should go farther or introduce a new API for those
use cases.
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.