From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: `vertical-motion', `goto-line' set point to invisible text Date: Tue, 05 Jul 2011 03:56:55 -0400 Message-ID: References: <87ei28f4re.fsf@gmail.com> <8362njqtv8.fsf@gnu.org> <83y60eoz6w.fsf@gnu.org> <87sjql5uv3.fsf@gmail.com> <87pqlp5qqe.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1309852965 16028 80.91.229.12 (5 Jul 2011 08:02:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2011 08:02:45 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Kurochkin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 05 10:02:38 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qe0ac-0002pH-0P for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2011 10:02:38 +0200 Original-Received: from localhost ([::1]:52803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0Va-000289-He for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2011 03:57:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0VB-000276-Eg for emacs-devel@gnu.org; Tue, 05 Jul 2011 03:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe0V6-0000XU-7f for emacs-devel@gnu.org; Tue, 05 Jul 2011 03:56:58 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:46993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0V5-0000XO-Nh for emacs-devel@gnu.org; Tue, 05 Jul 2011 03:56:55 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qe0V5-0000eI-0n; Tue, 05 Jul 2011 03:56:55 -0400 In-reply-to: <87pqlp5qqe.fsf@gmail.com> (message from Dmitry Kurochkin on Tue, 05 Jul 2011 07:52:09 +0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141574 Archived-At: > From: Dmitry Kurochkin > Cc: emacs-devel@gnu.org > Date: Tue, 05 Jul 2011 07:52:09 +0400 > > (progn (switch-to-buffer "test") > (insert "aline1\nbline2\ncline3\n") > (put-text-property 7 14 'invisible t) > (goto-char (point-min))) > > Now if you run M-: (progn (end-of-visual-line) (point)), it moves to > point 14, which is end of line 2 as expected. But then emacs adjusts > the point and moves it to beginning of line3, C-x = says point is 15. Interestingly, the first time you do this, there's no adjustment from 14 to 15. Sounds like some snafu with the last point position? I can confirm that this happens because point adjustment: setting global-disable-point-adjustment to non-nil eliminates the problem: point stays at position 14. Also, C-e behaves correctly no matter what. So it's something specific to end-of-visual-line or vertical-motion. Perhaps stepping through adjust_point_for_property with a debugger will show what's wrong.