unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuri D'Elia <wavexx@thregr.org>
Cc: emacs-devel@gnu.org
Subject: Re: Getting column position accounting for overlays
Date: Wed, 05 Aug 2015 22:01:45 +0300	[thread overview]
Message-ID: <83vbctsgo6.fsf@gnu.org> (raw)
In-Reply-To: <55C25983.5040702@thregr.org>

> From: Yuri D'Elia <wavexx@thregr.org>
> Date: Wed, 5 Aug 2015 20:44:19 +0200
> 
> 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.

That's why I asked to describe your use case.  I'm afraid I still
don't think I understand it.

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

And does the solution I suggested fulfill your needs?

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

Indeed, there is not, AFAIK.

But you originally asked only for the dimensions of the text on the
screen, not about the text itself.



  reply	other threads:[~2015-08-05 19:01 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 [this message]
2015-08-07 17:13           ` Yuri D'Elia
2015-08-07 18:19             ` Eli Zaretskii
2015-08-08 14:31               ` Yuri D'Elia
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=83vbctsgo6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=wavexx@thregr.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).