From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Getting column position accounting for overlays Date: Wed, 05 Aug 2015 22:01:45 +0300 Message-ID: <83vbctsgo6.fsf@gnu.org> References: <83a8u6tplx.fsf@gnu.org> <55C1D323.50505@thregr.org> <831tfhu5ge.fsf@gnu.org> <55C25983.5040702@thregr.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1438801341 6575 80.91.229.3 (5 Aug 2015 19:02:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 19:02:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yuri D'Elia Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 05 21:02:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZN3x7-00072b-6o for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2015 21:02:13 +0200 Original-Received: from localhost ([::1]:41786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN3x6-00015K-Of for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2015 15:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN3wt-0000zh-Le for emacs-devel@gnu.org; Wed, 05 Aug 2015 15:02:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN3wo-00028h-Mg for emacs-devel@gnu.org; Wed, 05 Aug 2015 15:01:59 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:59029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN3wo-00028I-FS for emacs-devel@gnu.org; Wed, 05 Aug 2015 15:01:54 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NSM00600HEN4100@mtaout24.012.net.il> for emacs-devel@gnu.org; Wed, 05 Aug 2015 21:53:30 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NSM00LPBHT5RU50@mtaout24.012.net.il>; Wed, 05 Aug 2015 21:53:30 +0300 (IDT) In-reply-to: <55C25983.5040702@thregr.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188459 Archived-At: > From: Yuri D'Elia > 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.