emacs-devel
[Top][All Lists]
Advanced

[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 16:31:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.1.0

On 07/08/15 20:19, Eli Zaretskii wrote:
>> https://github.com/wavexx/rigid-tabs.el
> 
> If you need to align text on display, you should use the the
> (space :align-to POS) display spec, see the node "Specified Space"
> in the ELisp manual.  This lets the display engine do the job for
> you, so you don't need to figure out the dimensions of the text
> on display.

Ah yes, but that's precisely the problem: I need to calculate POS
beforehand.

>> If you're trying to display anything related to the /visual/ appearance,
>> you'll have to consider the possibility of overlays and thus run into
>> the same issue.
> 
> Can you envision other use cases, besides alignment?

Looking for solutions, I came across a few snippets in emacswiki that
dump the content of the overlays into another buffer (sort of "save what
you see"). But all other cases were about calculating the current visual
column for alignment purposes.

It's not so trivial, considering that you basically have to handle all
'display cases manually to replicate what emacs does, you might have
overlapping overlays, and so on. I also think that it's bound to break
if 'display gets extended to support new properties.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]