unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuri D'Elia <wavexx@thregr.org>
To: emacs-devel@gnu.org
Subject: Re: Getting column position accounting for overlays
Date: Sat, 8 Aug 2015 16:31:28 +0200	[thread overview]
Message-ID: <mq53s2$n3s$1@ger.gmane.org> (raw)
In-Reply-To: <83r3nfq7uq.fsf@gnu.org>

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	other threads:[~2015-08-08 14:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 20:01 Getting column position accounting for overlays Yuri D'Elia
2015-08-05  2:51 ` Eli Zaretskii
2015-08-05  9:10   ` Yuri D'Elia
2015-08-05 15:21     ` Eli Zaretskii
2015-08-05 18:44       ` Yuri D'Elia
2015-08-05 19:01         ` Eli Zaretskii
2015-08-07 17:13           ` Yuri D'Elia
2015-08-07 18:19             ` Eli Zaretskii
2015-08-08 14:31               ` Yuri D'Elia [this message]
2015-08-08 14:45                 ` Eli Zaretskii
2015-08-08 15:19                   ` Yuri D'Elia
2015-08-08 15:43                     ` Eli Zaretskii
2015-08-08 16:29                       ` Yuri D'Elia
2015-08-08 16:48                         ` Eli Zaretskii
2015-08-08 17:22                           ` Yuri D'Elia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='mq53s2$n3s$1@ger.gmane.org' \
    --to=wavexx@thregr.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).