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: Eli Zaretskii
Subject: Re: Getting column position accounting for overlays
Date: Fri, 07 Aug 2015 21:19:41 +0300

> From: Yuri D'Elia <address@hidden>
> Date: Fri, 7 Aug 2015 19:13:58 +0200
> 
> On 05/08/15 21:01, Eli Zaretskii wrote:
> > That's why I asked to describe your use case.  I'm afraid I still
> > don't think I understand it.
> 
> Sometimes it's just curiosity ;)

Nothing wrong with that.

> >> The usage scenario is pretty simple: assume a terminal display.
> >> I want to determine the current /visual/ column at point.
> > 
> > Yes, but why do you need that?  What do you intend to do with the
> > value?
> 
> For example:
> 
> 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.

> 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?



reply via email to

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