From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#19200: Point adjustemnt moves *into* invisible text Date: Tue, 22 Mar 2016 14:36:10 -0400 Message-ID: References: <87mvpskb84.fsf@web.de> <87io0gbmpl.fsf@web.de> <87d1qnevco.fsf@web.de> <83h9fz65ze.fsf@gnu.org> <83r3f24gbk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458671843 27322 80.91.229.3 (22 Mar 2016 18:37:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 18:37:23 +0000 (UTC) Cc: michael_heerdegen@web.de, jonas@bernoul.li, 19200@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 19:37:12 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 1aiRB0-00018d-Mp for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 19:37:11 +0100 Original-Received: from localhost ([::1]:38926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiRB0-0003jP-6I for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 14:37:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiRAw-0003jH-KA for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 14:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiRAt-0003fL-8k for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 14:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiRAt-0003f9-58 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 14:37:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aiRAr-0005KH-SE for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 14:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2016 18:37: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.145867177820424 (code B ref 19200); Tue, 22 Mar 2016 18:37:01 +0000 Original-Received: (at 19200) by debbugs.gnu.org; 22 Mar 2016 18:36:18 +0000 Original-Received: from localhost ([127.0.0.1]:60353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiRAA-0005JM-9x for submit@debbugs.gnu.org; Tue, 22 Mar 2016 14:36:18 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiRA9-0005JB-En for 19200@debbugs.gnu.org; Tue, 22 Mar 2016 14:36:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/5a2xEVcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fsz+BRSOBZoIuIoJ4AQEB X-IPAS-Result: A0A+FgA731xV/5a2xEVcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0Fsz+BRSOBZoIuIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197786286" Original-Received: from 69-196-182-150.dsl.teksavvy.com (HELO pastel.home) ([69.196.182.150]) by ironport2-out.teksavvy.com with ESMTP; 22 Mar 2016 14:36:10 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BDA5063F25; Tue, 22 Mar 2016 14:36:10 -0400 (EDT) In-Reply-To: <83r3f24gbk.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 22 Mar 2016 18:39:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:115347 Archived-At: > But I'm sure you know very well that point adjustment code doesn't use > get-pos-property, it uses get-char-property-and-overlay, and the > latter says position 5 is visible. There was an attempt to use > get-pos-property in that code, but it backfired and was disabled. No, I didn't remember (and still don't actually, tho I now see the corresponding comments and #if0 in the code). But that change only affects the decision of what we consider as the boundaries of a chunk of invisible text (so it makes no difference in the present test case where there is no such ambiguity). Once those boundaries are found, we do use Fget_pos_property to decide which boundary to go to. > So what exactly is this bug about? There are 2 odd behaviors: - point adjustment doesn't bring us to position 3 after C-n - 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. Stefan