[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: |
Wed, 5 Aug 2015 11:10:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.0.1 |
On 05/08/15 04:51, Eli Zaretskii wrote:
>> From: Yuri D'Elia <address@hidden>
>> Date: Tue, 4 Aug 2015 22:01:24 +0200
>>
>> Is there a quick way (without iterating through 'display overlays) to
>> get the current column position for the displayed text?
>
> What is "the current column position"? How do you define a "column"
> when text can include variable-size fonts and images?
>
> One answer to your question is posn-at-point, but I'm not sure that is
> what you want.
I expected such question ;)
I'd like the equivalent of (current-column), or character length between
(beginning-of-line) and cursor position [modulus tabs], but using the
actual displayed overlays.
I would almost have expected something to extract the visualized string
between two points, like `buffer-substring' but iterating through
overlays; but couldn't find any (did I miss it?)
(posn-col-row (posn-at-point)) "would" work, but 1) seems inefficient,
especially considering I don't care about variable-pitch fonts and 2)
doesn't work if the point is not visible.
- Getting column position accounting for overlays, Yuri D'Elia, 2015/08/04
- Re: Getting column position accounting for overlays, Eli Zaretskii, 2015/08/04
- Re: Getting column position accounting for overlays,
Yuri D'Elia <=
- 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, 2015/08/08