[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 20:44:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.0.1 |
On 05/08/15 17:21, Eli Zaretskii wrote:
>> 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?)
>
> The overlay strings are directly accessible via 'overlay-get', so why
> would anyone need the feature you expected to exist?
I don't think we're on the same line of thought.
The usage scenario is pretty simple: assume a terminal display.
I want to determine the current /visual/ column at point.
(current-column) will not account for overlays that have a 'display
property of a different length than the overlay range.
It's really that simple.
The second part is a consequence: if I want to have a string of the
current line as seen by the user, I have to manually iterate through
overlays, handle 'display manually and reassemble the line myself.
There's no buffer-substring equivalent that gives me the string "with
'display overlays" between two points.
- 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, 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 <=
- 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
- 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