[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting column position accounting for overlays
From: |
Yuri D'Elia |
Subject: |
Re: Getting column position accounting for overlays |
Date: |
Sat, 8 Aug 2015 18:29:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.1.0 |
On 08/08/15 17:43, Eli Zaretskii wrote:
>> To be more concrete, what about a (visual-column) function, that just
>> gives what's currently needed?
>
> I've already shown you a way to compute that, several message ago.
> Let me repeat:
>
> (/ (car (window-text-pixel-size nil (line-beginning-position) (point)))
> (default-font-width))
I didn't like this solution precisely because it doesn't rely on
character-cells units, and was explicitly looking for character
lengths/distances between arbitrary points.
If this calculation would be used in rigid-tabs for instance, I would
calculate different amount of spaces whether a variable-pitch font is
used or not, while my intention is much closer to (current-column).
But maybe I'm just arguing about nothing, and this is not really
something that can be generalized.
If you're using a variable pitch font, everything does down the drain
anyway.
- Re: Getting column position accounting for overlays, (continued)
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/05
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/05
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/05
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/05
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/07
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/07
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/08
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/08
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/08
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/08
- Re: Getting column position accounting for overlays,
Yuri D'Elia <=
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/08
- Re: Getting column position accounting for overlays, Yuri D'Elia, 2015/08/08