From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Kurochkin Newsgroups: gmane.emacs.devel Subject: Re: `vertical-motion', `goto-line' set point to invisible text Date: Sat, 09 Jul 2011 17:13:21 +0400 Message-ID: <87fwmf38cu.fsf@gmail.com> References: <87ei28f4re.fsf@gmail.com> <8362njqtv8.fsf@gnu.org> <83y60eoz6w.fsf@gnu.org> <87sjql5uv3.fsf@gmail.com> <87pqlp5qqe.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310217233 11650 80.91.229.12 (9 Jul 2011 13:13:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2011 13:13:53 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 09 15:13:48 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 1QfXLv-0006O4-CU for ged-emacs-devel@m.gmane.org; Sat, 09 Jul 2011 15:13:47 +0200 Original-Received: from localhost ([::1]:49970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfXLu-00006t-1Y for ged-emacs-devel@m.gmane.org; Sat, 09 Jul 2011 09:13:46 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfXLf-00006j-Ud for emacs-devel@gnu.org; Sat, 09 Jul 2011 09:13:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfXLf-0002bV-0Y for emacs-devel@gnu.org; Sat, 09 Jul 2011 09:13:31 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:65272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfXLd-0002bD-GS; Sat, 09 Jul 2011 09:13:29 -0400 Original-Received: by bwd14 with SMTP id 14so2900586bwd.0 for ; Sat, 09 Jul 2011 06:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=+D53qI1epbIamY5OyuuPFgdMhJNY/44xpnLt6/+D31k=; b=qd8W7PI0stB/wCpfbCUrTlq97u9bL+uQ8EZYPjSexELbtWN1I5m1UG0DWYYzgzS5Fr 8VUYn42At5qyZh1h/BkqRhcbWl4Uq3jEA0qACrNl0jVnqoNxR1WCIpq6HuCUD8Z8bdQL 8IM034QUJzDiAo3Cg4fwtetEnsNBqxnSFEkTQ= Original-Received: by 10.205.65.206 with SMTP id xn14mr846173bkb.329.1310217207935; Sat, 09 Jul 2011 06:13:27 -0700 (PDT) Original-Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id f16sm3638960bke.4.2011.07.09.06.13.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jul 2011 06:13:26 -0700 (PDT) In-Reply-To: User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 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:141848 Archived-At: On Tue, 05 Jul 2011 03:56:55 -0400, Eli Zaretskii wrote: > > 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. I have opened a bug report #9034 [1] for this issue. Hopefully it would get some attention. Seems it should not be too hard to investigate investigate the problem for somebody how understands the code well enough. Please provide additional details for the bug report if I missed anything. Regards, Dmitry [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9034