GNU logs - #18417, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Dmitry <dgutov@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Sep 2014 09:44:02 +0000
Resent-Message-ID: <handler.18417.B.140999661216037 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 18417 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.140999661216037
          (code B ref -1); Sat, 06 Sep 2014 09:44:02 +0000
Received: (at submit) by debbugs.gnu.org; 6 Sep 2014 09:43:32 +0000
Received: from localhost ([127.0.0.1]:60321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQCWp-0004Aa-UH
	for submit <at> debbugs.gnu.org; Sat, 06 Sep 2014 05:43:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48722)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWm-0004AK-T6
 for submit <at> debbugs.gnu.org; Sat, 06 Sep 2014 05:43:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWc-0005Zy-Sr
 for submit <at> debbugs.gnu.org; Sat, 06 Sep 2014 05:43:23 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:42371)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWc-0005Zu-Pd
 for submit <at> debbugs.gnu.org; Sat, 06 Sep 2014 05:43:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50443)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWX-0007WY-Vw
 for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2014 05:43:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWT-0005YY-7W
 for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2014 05:43:13 -0400
Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:46251)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <raaahh@HIDDEN>) id 1XQCWS-0005YK-V5
 for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2014 05:43:09 -0400
Received: by mail-lb0-f173.google.com with SMTP id c11so14805231lbj.32
 for <bug-gnu-emacs@HIDDEN>; Sat, 06 Sep 2014 02:43:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:from:to:subject:date:message-id:mime-version:content-type;
 bh=rOzdAPJCs4G4VLjlet7633i1LtIY+gCIfhcZcGV/zrQ=;
 b=DjbQWR9oK1OdQDOhE2/h+46x6oyzRcc2VKdziQQ6Vs0GQMkvoIdk5smhQOkN+I0HcM
 o+KSPRFtVej7Rd6j49B6UTTAWhqQWTVPlCoGOTgzqjW90K8vRzq42vT+xs0+wPUQrI9n
 C6d8nHJd6RSvQ9ZESMEL+Uh4qKINIZlhmDXKJCLPKneahnVoWAME6PV5fUP1DGGVM/1S
 6MkB+3ZZq7hRZXRijP28fycimOhUO4hi6CTaw2/ELo9qYue+fbD1wTrZGAAJdfMJJVQB
 BUTQPIbR76191z4xWAEbIQ9kjx8+/+CK1ETlxEjhYtMTgdzyy5RMPcLXGS1GKWbkypDV
 eudQ==
X-Received: by 10.112.219.71 with SMTP id pm7mr16040346lbc.3.1409996587157;
 Sat, 06 Sep 2014 02:43:07 -0700 (PDT)
Received: from axl ([178.252.98.87])
 by mx.google.com with ESMTPSA id k7sm1471768lak.22.2014.09.06.02.43.05
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Sat, 06 Sep 2014 02:43:06 -0700 (PDT)
From: Dmitry <dgutov@HIDDEN>
Date: Sat, 06 Sep 2014 13:43:00 +0400
Message-ID: <86sik513vf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

1. Download, put inside load-path and require fill-column-indicator.el,
from https://github.com/alpaker/Fill-Column-Indicator.
2. Open an empty buffer, add a newline inside it.
3. Toggle fcm-mode on. Notice the indicator at the end of the empty
line.
4. With point at the beginning of that line, evaluate

(posn-col-row (posn-at-point (point)))

and see it evaluate to (71 . 0).

The problem is probably not in posn-col-row, because (posn-x-y
(posn-at-point (point))) also returns a large non-zero value in car.

In GNU Emacs 24.3.93.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-09-05 on axl
Repository revision: 117482 monnier@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Dmitry <dgutov@HIDDEN>
Subject: bug#18417: Acknowledgement (24.3.93; posn-at-point confused by
 fill-column-indicator)
Message-ID: <handler.18417.B.140999661216037.ack <at> debbugs.gnu.org>
References: <86sik513vf.fsf@HIDDEN>
X-Gnu-PR-Message: ack 18417
X-Gnu-PR-Package: emacs
Reply-To: 18417 <at> debbugs.gnu.org
Date: Sat, 06 Sep 2014 09:44:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 18417 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
18417: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18417
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Sep 2014 17:23:01 +0000
Resent-Message-ID: <handler.18417.B18417.141011054615292 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry <dgutov@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141011054615292
          (code B ref 18417); Sun, 07 Sep 2014 17:23:01 +0000
Received: (at 18417) by debbugs.gnu.org; 7 Sep 2014 17:22:26 +0000
Received: from localhost ([127.0.0.1]:32968 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQgAT-0003yZ-Hr
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 13:22:26 -0400
Received: from mtaout28.012.net.il ([80.179.55.184]:48293)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XQgAR-0003yJ-B6
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 13:22:24 -0400
Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il
 (HyperSendmail v2007.08) id <0NBJ00I00K3H5000@HIDDEN> for
 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 20:21:00 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NBJ00GGXK701320@HIDDEN>; Sun, 07 Sep 2014 20:21:00 +0300 (IDT)
Date: Sun, 07 Sep 2014 20:22:22 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <86sik513vf.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <837g1fcpm9.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> From: Dmitry <dgutov@HIDDEN>
> Date: Sat, 06 Sep 2014 13:43:00 +0400
> 
> 1. Download, put inside load-path and require fill-column-indicator.el,
> from https://github.com/alpaker/Fill-Column-Indicator.
> 2. Open an empty buffer, add a newline inside it.
> 3. Toggle fcm-mode on. Notice the indicator at the end of the empty
> line.     ^^^^^^^^

I assume you meant "fci-mode".

> 4. With point at the beginning of that line, evaluate
> 
> (posn-col-row (posn-at-point (point)))
> 
> and see it evaluate to (71 . 0).
> 
> The problem is probably not in posn-col-row, because (posn-x-y
> (posn-at-point (point))) also returns a large non-zero value in car.

This was previously reported and discussed here:

  http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00445.html

My correspondent there expressed interest in fixing this, but I never
heard from him about this since then, although I pointed him at
posn-at-point as the most probable culprit.

Anyway, I'm not going to lose sleep over this, sorry.  The recipe in
effect invokes undefined behavior in posn-at-point, because fci-mode
uses a zero-length (a.k.a. "empty") overlay to place, in a very
convoluted way, a stretch of whitespace followed by an image, before
the newline.  Since "at point" means "before point", and the recipe
asks for coordinates at the newline position, it is not clear whether
the reported coordinates should or shouldn't include the stretch
glyph.  The result you see is the consequence of the implementation
details of the functions that simulate display in order to compute
screen coordinates at a given buffer position.  Since the buffer
position of the newline is not "covered" by the empty overlay, Emacs
happily stops when it reaches the newline, oblivious to the fact that
on the way it produced the stretch glyph of a very large width.

If someone wants to work on this, patches will be welcome, of course.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Dmitry Gutov <dgutov@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Sep 2014 18:56:01 +0000
Resent-Message-ID: <handler.18417.B18417.141011614924160 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141011614924160
          (code B ref 18417); Sun, 07 Sep 2014 18:56:01 +0000
Received: (at 18417) by debbugs.gnu.org; 7 Sep 2014 18:55:49 +0000
Received: from localhost ([127.0.0.1]:33001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQhcq-0006Hb-P7
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 14:55:49 -0400
Received: from mail-lb0-f179.google.com ([209.85.217.179]:40739)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1XQhcm-0006HI-Tf
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 14:55:46 -0400
Received: by mail-lb0-f179.google.com with SMTP id p9so3175856lbv.10
 for <18417 <at> debbugs.gnu.org>; Sun, 07 Sep 2014 11:55:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=f+f0mLF8g/TU64SJX2pywmYpC9CLYEQS582iXHYJj/w=;
 b=HZBIGiwBmLPT6IDTPS93QGkPY2adzvasvOv1e+PH+perUOKxLSlZE2xfH6W2J4sRoK
 kCOLRS/wlNKclE7cmIr/6dDvRj4R2XeD2/amUNbZ8NFrVgafSlgR/l0vf4FuAUjw7UZt
 AMoB4pmD9M7ztlaTSvV8slRs7hVR8av0qgaa+aoM1zyQBmUcNrMzCo6T5lz8uTIVVN/3
 F7SdXQu9350pdfALXE2Xb6XcZ7s3RmVkW4I3xBUbQZUGf8OTGKqANI84HbR0WKIWKEs1
 N3GPEVINLD3rllM0q5rswCZR/50BWEM1wX1Nte2+CnNDR+nDs8BUou+qzPvs/az5YDbO
 H8iA==
X-Received: by 10.112.140.200 with SMTP id ri8mr3425383lbb.84.1410116138504;
 Sun, 07 Sep 2014 11:55:38 -0700 (PDT)
Received: from [192.168.1.3] ([178.252.98.87])
 by mx.google.com with ESMTPSA id b1sm2656348lah.34.2014.09.07.11.55.36
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 07 Sep 2014 11:55:37 -0700 (PDT)
Message-ID: <540CAA26.8070303@HIDDEN>
Date: Sun, 07 Sep 2014 22:55:34 +0400
From: Dmitry Gutov <dgutov@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version: 1.0
References: <86sik513vf.fsf@HIDDEN> <837g1fcpm9.fsf@HIDDEN>
In-Reply-To: <837g1fcpm9.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 09/07/2014 09:22 PM, Eli Zaretskii wrote:

> I assume you meant "fci-mode".

Yes, sorry.

> Anyway, I'm not going to lose sleep over this, sorry.

Fair enough. fci-mode does some pretty complex stuff.

> The recipe in
> effect invokes undefined behavior in posn-at-point, because fci-mode
> uses a zero-length (a.k.a. "empty") overlay to place, in a very
> convoluted way, a stretch of whitespace followed by an image, before
> the newline.

If it's a problem, would you maybe suggest a better way to implement 
this feature, for the Fill-Column-Indicator author?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Sep 2014 19:44:02 +0000
Resent-Message-ID: <handler.18417.B18417.141011903428689 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dgutov@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141011903428689
          (code B ref 18417); Sun, 07 Sep 2014 19:44:02 +0000
Received: (at 18417) by debbugs.gnu.org; 7 Sep 2014 19:43:54 +0000
Received: from localhost ([127.0.0.1]:33012 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQiNO-0007Sf-Gn
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:43:54 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:48420)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XQiNL-0007SN-1m
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:43:52 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NBJ00E00Q659000@HIDDEN> for 18417 <at> debbugs.gnu.org;
 Sun, 07 Sep 2014 22:43:44 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NBJ00E4JQSV9S10@HIDDEN>;
 Sun, 07 Sep 2014 22:43:44 +0300 (IDT)
Date: Sun, 07 Sep 2014 22:43:49 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <540CAA26.8070303@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83zjebb4i2.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN> <837g1fcpm9.fsf@HIDDEN>
 <540CAA26.8070303@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sun, 07 Sep 2014 22:55:34 +0400
> From: Dmitry Gutov <dgutov@HIDDEN>
> CC: 18417 <at> debbugs.gnu.org
> 
> > The recipe in
> > effect invokes undefined behavior in posn-at-point, because fci-mode
> > uses a zero-length (a.k.a. "empty") overlay to place, in a very
> > convoluted way, a stretch of whitespace followed by an image, before
> > the newline.
> 
> If it's a problem, would you maybe suggest a better way to implement 
> this feature, for the Fill-Column-Indicator author?

I could try, but right now I don't feel I understand all the subtle
details and reasons that led to such an implementation.

There are 2 special characters, u+e000 and u+e001, each one has a
display-table setting to display it as something else, then there's an
empty overlay with an after-string made of these special characters
that has a display property with :align-to, followed by an image...
And I'm not sure I listed all of the "features".  (The 'cursor'
property I omitted intentionally, because I believe I know why they
are needed.)  Why each one of these is needed?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Alp Aker <alptekin.aker@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Sep 2014 19:53:01 +0000
Resent-Message-ID: <handler.18417.B18417.141011956329551 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141011956329551
          (code B ref 18417); Sun, 07 Sep 2014 19:53:01 +0000
Received: (at 18417) by debbugs.gnu.org; 7 Sep 2014 19:52:43 +0000
Received: from localhost ([127.0.0.1]:33020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQiVu-0007gY-W5
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:52:43 -0400
Received: from mail-wi0-f182.google.com ([209.85.212.182]:50075)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alptekin.aker@HIDDEN>) id 1XQiVs-0007gE-HE
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:52:41 -0400
Received: by mail-wi0-f182.google.com with SMTP id z2so1650797wiv.9
 for <18417 <at> debbugs.gnu.org>; Sun, 07 Sep 2014 12:52:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=CVRgEOtTsD3yYvKLvRJtDpWHWSnbLMnVHRJjGAIdA8M=;
 b=qt6l9BJNVM11SOaJyC6rvHUJCtxCOt0lwfJiyRF6+8LxQjFOh2GHlFtMb0ZJx51CHX
 1gTDwyLkZ9uN+1uUETk4PMcdZVPpjbR7diOEMvEHG1ISLZFO+GLRWKsRZJHS4PbjqbeA
 VHOvH87jQGEZxOKN4rvsk7EkGzNthVpVt28UbE8hznhaNNvPslolUkLBmZqRnOR/xPLs
 W6SSvm28vroNRXWWUFe2YzpnWC2Oky86cfrbtzlqdKPiY1J39oaqvAmVM6pho8DWuyRQ
 oO596EqaA5zi6DKyYi0JZee+JvfCrvWHNa+In41izmIEbvI/4zC9RTEVoUKUw5nBYbC7
 6Pug==
MIME-Version: 1.0
X-Received: by 10.180.36.236 with SMTP id t12mr18089157wij.38.1410119554696;
 Sun, 07 Sep 2014 12:52:34 -0700 (PDT)
Received: by 10.217.39.84 with HTTP; Sun, 7 Sep 2014 12:52:34 -0700 (PDT)
In-Reply-To: <83zjebb4i2.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN> <837g1fcpm9.fsf@HIDDEN>
 <540CAA26.8070303@HIDDEN> <83zjebb4i2.fsf@HIDDEN>
Date: Sun, 7 Sep 2014 15:52:34 -0400
Message-ID: <CACxch4pJF1HhtpRM_CXOJfRw_F1ytFkkzEPqUJ=i8gz8Zo3_rQ@HIDDEN>
From: Alp Aker <alptekin.aker@HIDDEN>
Content-Type: multipart/alternative; boundary=e89a8f64672f260ad305027f0bb0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--e89a8f64672f260ad305027f0bb0
Content-Type: text/plain; charset=UTF-8

> There are 2 special characters, u+e000 and u+e001, each one has a
> display-table setting to display it as something else, then there's an
> empty overlay with an after-string made of these special characters
> that has a display property with :align-to, followed by an image...
> And I'm not sure I listed all of the "features".  (The 'cursor'
> property I omitted intentionally, because I believe I know why they
> are needed.)  Why each one of these is needed?

At least some of that is cruft, as at one point I was trying to support all
of v22, v23, and v24, and there were various differences in the behavior of
overlay-strings (as well as the 'cursor property) among those versions.
I'll try to simplify the implementation and see if I can come up with
something that doesn't trigger any UB in the display engine.

--e89a8f64672f260ad305027f0bb0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>&gt; There are 2 special characters, u+e000 and u+e00=
1, each one has a<br>&gt; display-table setting to display it as something =
else, then there&#39;s an<br>&gt; empty overlay with an after-string made o=
f these special characters<br>&gt; that has a display property with :align-=
to, followed by an image...<br>&gt; And I&#39;m not sure I listed all of th=
e &quot;features&quot;.=C2=A0 (The &#39;cursor&#39;<br>&gt; property I omit=
ted intentionally, because I believe I know why they<br>&gt; are needed.)=
=C2=A0 Why each one of these is needed?<br><br></div>At least some of that =
is cruft, as at one point I was trying to support all of v22, v23, and v24,=
 and there were various differences in the behavior of overlay-strings (as =
well as the &#39;cursor property) among those versions.=C2=A0 I&#39;ll try =
to simplify the implementation and see if I can come up with something that=
 doesn&#39;t trigger any UB in the display engine.<br></div>

--e89a8f64672f260ad305027f0bb0--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Sep 2014 19:57:01 +0000
Resent-Message-ID: <handler.18417.B18417.141011981729954 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alp Aker <alptekin.aker@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org, dgutov@HIDDEN
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141011981729954
          (code B ref 18417); Sun, 07 Sep 2014 19:57:01 +0000
Received: (at 18417) by debbugs.gnu.org; 7 Sep 2014 19:56:57 +0000
Received: from localhost ([127.0.0.1]:33028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQia1-0007n4-8M
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:56:57 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:49071)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XQiZz-0007mr-F9
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 15:56:56 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NBJ00E00QWDAC00@HIDDEN> for 18417 <at> debbugs.gnu.org;
 Sun, 07 Sep 2014 22:56:49 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NBJ00ED3REO9S30@HIDDEN>;
 Sun, 07 Sep 2014 22:56:49 +0300 (IDT)
Date: Sun, 07 Sep 2014 22:56:54 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CACxch4pJF1HhtpRM_CXOJfRw_F1ytFkkzEPqUJ=i8gz8Zo3_rQ@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83y4tvb3w9.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN> <837g1fcpm9.fsf@HIDDEN>
 <540CAA26.8070303@HIDDEN> <83zjebb4i2.fsf@HIDDEN>
 <CACxch4pJF1HhtpRM_CXOJfRw_F1ytFkkzEPqUJ=i8gz8Zo3_rQ@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sun, 7 Sep 2014 15:52:34 -0400
> From: Alp Aker <alptekin.aker@HIDDEN>
> Cc: Dmitry Gutov <dgutov@HIDDEN>, 18417 <at> debbugs.gnu.org
> 
> > There are 2 special characters, u+e000 and u+e001, each one has a
> > display-table setting to display it as something else, then there's an
> > empty overlay with an after-string made of these special characters
> > that has a display property with :align-to, followed by an image...
> > And I'm not sure I listed all of the "features". (The 'cursor'
> > property I omitted intentionally, because I believe I know why they
> > are needed.) Why each one of these is needed?
> 
> At least some of that is cruft, as at one point I was trying to support all of
> v22, v23, and v24, and there were various differences in the behavior of
> overlay-strings (as well as the 'cursor property) among those versions.

That was my guess, yes.

> I'll try to simplify the implementation and see if I can come up
> with something that doesn't trigger any UB in the display engine.

Thank you.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Alp Aker <alptekin.aker@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Sep 2014 03:12:01 +0000
Resent-Message-ID: <handler.18417.B18417.141014590411437 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org, Dmitry <dgutov@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141014590411437
          (code B ref 18417); Mon, 08 Sep 2014 03:12:01 +0000
Received: (at 18417) by debbugs.gnu.org; 8 Sep 2014 03:11:44 +0000
Received: from localhost ([127.0.0.1]:33140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XQpMm-0002yP-2M
	for submit <at> debbugs.gnu.org; Sun, 07 Sep 2014 23:11:44 -0400
Received: from mail-wi0-f170.google.com ([209.85.212.170]:34374)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alptekin.aker@HIDDEN>) id 1XQpMi-0002y7-TT
 for 18417 <at> debbugs.gnu.org; Sun, 07 Sep 2014 23:11:41 -0400
Received: by mail-wi0-f170.google.com with SMTP id cc10so1953684wib.5
 for <18417 <at> debbugs.gnu.org>; Sun, 07 Sep 2014 20:11:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=sVLpMD3AN4+xhUXa//q5ox5t+Bz/LYalbKJuuPnsQqM=;
 b=htTyRhBS07snyHtXsYVRByGJxhtwIRP58KnE5aUz5bYJ+PcPnsn3c6u2LISQZdYPJh
 PGm6L1cWFssOsDTzruiNX8HpCVMdAbw8ptlhgBHcFYPjKLwZ1GZj2JvCZ3emXMOx5ixI
 Z96B2qGBnm+zYhY6omn6R+L3CuSsmjDMwSQEPDQQuflzQ4w0BTTtd2YcKUf9KhjmmZ2W
 DdPMEz3KH2mUPHclG+T08hRKqNm7KoYO9I4O3zcdxFXlM+Pvf2ZzDPOPYHU4fFLoygVb
 xYGRrfyY0IBaAZQoCtEc3pOzPQH9pOnPgVZ+rH4s9XeUwy4e4WIPMs5353TCMV78HZ6O
 el8w==
MIME-Version: 1.0
X-Received: by 10.180.36.236 with SMTP id t12mr19779856wij.38.1410145895210;
 Sun, 07 Sep 2014 20:11:35 -0700 (PDT)
Received: by 10.217.39.84 with HTTP; Sun, 7 Sep 2014 20:11:35 -0700 (PDT)
In-Reply-To: <837g1fcpm9.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN>
	<837g1fcpm9.fsf@HIDDEN>
Date: Sun, 7 Sep 2014 23:11:35 -0400
Message-ID: <CACxch4rNSrMXZAm9h_AB+p0k+hpAE3+p_RWHV=zyXxM_GEOVKQ@HIDDEN>
From: Alp Aker <alptekin.aker@HIDDEN>
Content-Type: multipart/alternative; boundary=e89a8f64672f2a642c0502852dc8
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--e89a8f64672f2a642c0502852dc8
Content-Type: text/plain; charset=UTF-8

> The recipe in effect invokes undefined behavior in posn-at-point,
> because fci-mode uses a zero-length (a.k.a. "empty") overlay to
> place, in a very convoluted way, a stretch of whitespace followed
> by an image, before the newline.
[snip]
> Since the buffer position of the newline is not "covered" by the
> empty overlay, Emacs happily stops when it reaches the newline,
> oblivious to the fact that on the way it produced the stretch
> glyph of a very large width.

I'm not sure it's due to the overlay having zero length.  Here's a minimal
recipe that provokes the same behavior using a overlay of length 1
(covering the newline):

(progn
  (delete-all-overlays)
  (goto-char (point-min))
  (insert "\n")
  (setq o (make-overlay 1 2)
        s (propertize " "
                      'display '(space :align-to 10)
                      'cursor t))
  (overlay-put o 'before-string s)
  (goto-char (point-min))
  (setq col (car (posn-col-row (posn-at-point (point)))))
  (message (concat "Current column: " (number-to-string col))))

--e89a8f64672f2a642c0502852dc8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>&gt; The recipe in effect invokes undefined behavior =
in posn-at-point,<br>&gt; because fci-mode uses a zero-length (a.k.a. &quot=
;empty&quot;) overlay to<br>&gt; place, in a very convoluted way, a stretch=
 of whitespace followed<br>&gt; by an image, before the newline.<br>[snip]<=
br>&gt; Since the buffer position of the newline is not &quot;covered&quot;=
 by the<br>&gt; empty overlay, Emacs happily stops when it reaches the newl=
ine,<br>&gt; oblivious to the fact that on the way it produced the stretch<=
br>&gt; glyph of a very large width.<br><br></div>I&#39;m not sure it&#39;s=
 due to the overlay having zero length.=C2=A0 Here&#39;s a minimal recipe t=
hat provokes the same behavior using a overlay of length 1 (covering the ne=
wline):<br><br>(progn<br>=C2=A0 (delete-all-overlays)<br>=C2=A0 (goto-char =
(point-min))<br>=C2=A0 (insert &quot;\n&quot;)<br>=C2=A0 (setq o (make-over=
lay 1 2)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 s (propertize &quot;=
 &quot;<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#39;displa=
y &#39;(space :align-to 10)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 &#39;cursor t))<br>=C2=A0 (overlay-put o &#39;before-string s)<br=
>=C2=A0 (goto-char (point-min))<br>=C2=A0 (setq col (car (posn-col-row (pos=
n-at-point (point)))))<br>=C2=A0 (message (concat &quot;Current column: &qu=
ot; (number-to-string col))))<br><br><div><br></div></div>

--e89a8f64672f2a642c0502852dc8--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Sep 2014 14:39:02 +0000
Resent-Message-ID: <handler.18417.B18417.141027350715596 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18417
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Alp Aker <alptekin.aker@HIDDEN>
Cc: 18417 <at> debbugs.gnu.org, dgutov@HIDDEN
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 18417-submit <at> debbugs.gnu.org id=B18417.141027350715596
          (code B ref 18417); Tue, 09 Sep 2014 14:39:02 +0000
Received: (at 18417) by debbugs.gnu.org; 9 Sep 2014 14:38:27 +0000
Received: from localhost ([127.0.0.1]:35464 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XRMYs-00043O-7g
	for submit <at> debbugs.gnu.org; Tue, 09 Sep 2014 10:38:26 -0400
Received: from mtaout28.012.net.il ([80.179.55.184]:44548)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XRMYm-000433-UM
 for 18417 <at> debbugs.gnu.org; Tue, 09 Sep 2014 10:38:22 -0400
Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il
 (HyperSendmail v2007.08) id <0NBN00J001U1WM00@HIDDEN> for
 18417 <at> debbugs.gnu.org; Tue, 09 Sep 2014 17:36:55 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NBN00INX1XI2H20@HIDDEN>; Tue, 09 Sep 2014 17:36:55 +0300 (IDT)
Date: Tue, 09 Sep 2014 17:38:24 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CACxch4rNSrMXZAm9h_AB+p0k+hpAE3+p_RWHV=zyXxM_GEOVKQ@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <8338c0c10f.fsf@HIDDEN>
References: <86sik513vf.fsf@HIDDEN> <837g1fcpm9.fsf@HIDDEN>
 <CACxch4rNSrMXZAm9h_AB+p0k+hpAE3+p_RWHV=zyXxM_GEOVKQ@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sun, 7 Sep 2014 23:11:35 -0400
> From: Alp Aker <alptekin.aker@HIDDEN>
> Cc: Dmitry <dgutov@HIDDEN>, 18417 <at> debbugs.gnu.org
> 
> > The recipe in effect invokes undefined behavior in posn-at-point,
> > because fci-mode uses a zero-length (a.k.a. "empty") overlay to
> > place, in a very convoluted way, a stretch of whitespace followed
> > by an image, before the newline.
> [snip]
> > Since the buffer position of the newline is not "covered" by the
> > empty overlay, Emacs happily stops when it reaches the newline,
> > oblivious to the fact that on the way it produced the stretch
> > glyph of a very large width.
> 
> I'm not sure it's due to the overlay having zero length. Here's a minimal
> recipe that provokes the same behavior using a overlay of length 1 (covering
> the newline):

You are right, the length of the overlay is not the issue here.  I
mentioned that for completeness, but my wording could indeed mislead
into thinking that the zero length is the culprit.

The actual problem is that overlays with before-strings and
after-strings never "cover" (as in "conceal" or "hide") anything.  The
buffer contents is still there, so Emacs gives you the coordinates of
the buffer position on the display, not of the first glyph produced
from the overlay string.

Btw, the same will happen with cursor positioning if you remove the
'cursor' property from the overlay string, and for the same reason.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.