From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18417: 24.3.93; posn-at-point confused by fill-column-indicator Date: Tue, 09 Sep 2014 17:38:24 +0300 Message-ID: <8338c0c10f.fsf@gnu.org> References: <86sik513vf.fsf@yandex.ru> <837g1fcpm9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410273569 27568 80.91.229.3 (9 Sep 2014 14:39:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 14:39:29 +0000 (UTC) Cc: 18417@debbugs.gnu.org, dgutov@yandex.ru To: Alp Aker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 16:39:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XRMZh-0004Q9-03 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 16:39:17 +0200 Original-Received: from localhost ([::1]:50144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRMZg-0006wd-GO for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 10:39:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRMZY-0006vg-Lw for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 10:39:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRMZT-00019C-6s for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 10:39:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRMZT-000195-4a for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 10:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XRMZS-00044O-Qt for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 10:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Sep 2014 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18417 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18417-submit@debbugs.gnu.org id=B18417.141027350715596 (code B ref 18417); Tue, 09 Sep 2014 14:39:02 +0000 Original-Received: (at 18417) by debbugs.gnu.org; 9 Sep 2014 14:38:27 +0000 Original-Received: from localhost ([127.0.0.1]:35464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRMYs-00043O-7g for submit@debbugs.gnu.org; Tue, 09 Sep 2014 10:38:26 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:44548) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRMYm-000433-UM for 18417@debbugs.gnu.org; Tue, 09 Sep 2014 10:38:22 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NBN00J001U1WM00@mtaout28.012.net.il> for 18417@debbugs.gnu.org; Tue, 09 Sep 2014 17:36:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBN00INX1XI2H20@mtaout28.012.net.il>; Tue, 09 Sep 2014 17:36:55 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93192 Archived-At: > Date: Sun, 7 Sep 2014 23:11:35 -0400 > From: Alp Aker > Cc: Dmitry , 18417@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.