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#11094: Wrong cursor positioning with display+invisible Date: Mon, 02 Apr 2012 05:56:34 +0300 Message-ID: <83wr5yj0yl.fsf@gnu.org> References: <83vclljesi.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1333335483 20375 80.91.229.3 (2 Apr 2012 02:58:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2012 02:58:03 +0000 (UTC) Cc: 11094@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 02 04:57:57 2012 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 1SEXSu-0007Yt-6R for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2012 04:57:56 +0200 Original-Received: from localhost ([::1]:47345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEXSt-0006WF-FM for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Apr 2012 22:57:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEXSp-0006Vy-W1 for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 22:57:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEXSn-0000lt-Qc for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 22:57:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEXSn-0000lo-Na for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 22:57:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SEXT0-0000r4-Es for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 22:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Apr 2012 02:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11094-submit@debbugs.gnu.org id=B11094.13333354243218 (code B ref 11094); Mon, 02 Apr 2012 02:58:02 +0000 Original-Received: (at 11094) by debbugs.gnu.org; 2 Apr 2012 02:57:04 +0000 Original-Received: from localhost ([127.0.0.1]:35222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SEXS4-0000pq-1M for submit@debbugs.gnu.org; Sun, 01 Apr 2012 22:57:04 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:62773) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SEXRm-0000pC-PC for 11094@debbugs.gnu.org; Sun, 01 Apr 2012 22:57:01 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1U00A00001UR00@a-mtaout22.012.net.il> for 11094@debbugs.gnu.org; Mon, 02 Apr 2012 05:56:31 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1U00AS1066JR70@a-mtaout22.012.net.il>; Mon, 02 Apr 2012 05:56:31 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58455 Archived-At: > From: Stefan Monnier > Cc: 11094@debbugs.gnu.org > Date: Sun, 01 Apr 2012 21:06:59 -0400 > > > For some value of "correctly". E.g., position the cursor over the > > ".", which is the first file name in the archive, and type "C-x =". > > You will see "63", which is a lie: the actual value of point is 111. > > I don't think it's a lie because that text is preceded by invisible > text, so while "." is at 111, point is indeed at 63 (and that's just > because of adjust_point_for_property, so we can get point to stay at > 111 by being more careful with text property's stickiness). Having point report X when it is position on a character whose position is Y, or jump when you move it from one character of a file name to the next violates the principle of least astonishment, IMO. > I see that the problem is not so much that all the text is covered by > those properties, but rather that there is are contiguous texts with > `invisible' and `display' properties. Yes, that doesn't help, as I mentioned. > emacs -Q > (put-text-property (point-min) (+ 4 (point-min)) 'display "<>") > (goto-char (point-min)) > > the cursor is drawn at the right place. I think this is the core of the > problem that's handled differently from Emacs-23. > [ IIUC you've gotten to the same conclusion. ] While there could be more than one way to cut this cake, I still think we should encourage Lips programmers to use the `cursor' property in these situations. > > If you still think we should support your original code, we should > > schedule some post-24.1 redesign and refactoring. Let me know what > > you think. > > I don't think it's a very high priority problem, but it would be good to > try and tackle it, yes (post-24.1). OK. Should we close this bug, then?