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#19200: Point adjustemnt moves *into* invisible text Date: Wed, 23 Mar 2016 17:15:14 +0200 Message-ID: <83vb4d2pkt.fsf@gnu.org> References: <87mvpskb84.fsf@web.de> <87io0gbmpl.fsf@web.de> <87d1qnevco.fsf@web.de> <83h9fz65ze.fsf@gnu.org> <83r3f24gbk.fsf@gnu.org> <83egb24a5y.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458746186 486 80.91.229.3 (23 Mar 2016 15:16:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 15:16:26 +0000 (UTC) Cc: michael_heerdegen@web.de, jonas@bernoul.li, 19200@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 16:16:14 2016 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 1aikW6-0006yP-5X for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 16:16:14 +0100 Original-Received: from localhost ([::1]:44493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aikW5-00016H-Hg for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 11:16:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aikVx-000167-T7 for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 11:16:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aikVt-0006rh-Si for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 11:16:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aikVt-0006rc-Pd for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 11:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aikVt-0001ig-M0 for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 11:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Mar 2016 15:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19200 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19200-submit@debbugs.gnu.org id=B19200.14587461576599 (code B ref 19200); Wed, 23 Mar 2016 15:16:01 +0000 Original-Received: (at 19200) by debbugs.gnu.org; 23 Mar 2016 15:15:57 +0000 Original-Received: from localhost ([127.0.0.1]:34571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aikVo-0001iN-LH for submit@debbugs.gnu.org; Wed, 23 Mar 2016 11:15:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aikVn-0001iC-Ma for 19200@debbugs.gnu.org; Wed, 23 Mar 2016 11:15:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aikVc-0006ni-FB for 19200@debbugs.gnu.org; Wed, 23 Mar 2016 11:15:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aikVQ-0006l9-Et; Wed, 23 Mar 2016 11:15:32 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1814 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aikVP-00015g-8h; Wed, 23 Mar 2016 11:15:31 -0400 In-reply-to: (message from Stefan Monnier on Tue, 22 Mar 2016 22:13:04 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:115386 Archived-At: > From: Stefan Monnier > Cc: 19200@debbugs.gnu.org, michael_heerdegen@web.de, jonas@bernoul.li > Date: Tue, 22 Mar 2016 22:13:04 -0400 > > >> - point adjustment doesn't bring us to position 3 after C-n > > Why is that a problem? Position 3 is invisible, so we shouldn't > > expect to end up with point there. > > No, you have it backwards: position 5 is invisible and position 3 is not. So you are saying that we also have a display bug, in that what should have been on the screen is "3" and not "5"? ;-) > The "evidence" for that is that if you go to position 3 and insert a char, > that char will be visible, whereas if you go to position 5 and insert > a char, that char will be invisible. You are talking about a different kind of "invisible", the kind that is different from how the display engine, and any cursor-motion commands that use its layout routines, interprets "invisible". That is why what you expect from the related code is hard to get: it is barely supported by the relevant code. (Personally, I think your notion of "invisible" is also confusing for the user, in that it puts the cursor on a character whose position is not the same as point. The other notion of "invisible" also has its disadvantages, so it's not easy to decide which one is "right", but at least it doesn't fight an uphill battle against the display engine.) > >> - M-: (point) has the side-effect of bringing us to position 3 > >> My guess here is that after the M-: command, at the end of > >> command_loop_1, last_point_position refers to a position in another > >> buffer (i.e. in the minibuffer), so it thinks there was a movement and > >> hence re-runs adjust_point_for_property, which this time gets it right. > > Maybe. If this is the bug to solve, I could look into it. > > No, this bug is secondary. The main bug is that we end up at position > 5 after C-n. Since we don't know how to fix the main bug, would it be an improvement to solve the secondary one?