GNU bug report logs - #9034
point adjustment (with invisible text) moves to the next line

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dmitry Kurochkin <dmitry.kurochkin@HIDDEN>; Keywords: confirmed; dated Sat, 9 Jul 2011 13:05:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Changed bug title to 'point adjustment (with invisible text) moves to the next line' from 'point adjustment after `end-of-visual-line' moves to the next line' Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
bug Marked as found in versions 25.2. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Added tag(s) confirmed. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 9034 <at> debbugs.gnu.org:


Received: (at 9034) by debbugs.gnu.org; 11 Jul 2011 08:27:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 11 04:27:34 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QgBq1-0005py-ST
	for submit <at> debbugs.gnu.org; Mon, 11 Jul 2011 04:27:34 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dmitry.kurochkin@HIDDEN>) id 1QgBpy-0005pm-P8
	for 9034 <at> debbugs.gnu.org; Mon, 11 Jul 2011 04:27:31 -0400
Received: by bwb17 with SMTP id 17so3059263bwb.3
	for <9034 <at> debbugs.gnu.org>; Mon, 11 Jul 2011 01:27:24 -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=XIh+0wjpPP2iuQQBMUWabwulD0FdBv6fyYS5K9McV2w=;
	b=U1lVXTtsBqBJjPsugcDHkwPAcRlDcqIWItUxGzAP+vkCorw5FRuElMh5zOq86jCX0v
	wBDKHwETB8+CkM5KB9VsQq4U5e4FtatZjdZJatX0AB75cwEzYOw6ox9wVkrhZCqt/yy0
	oqfZl2sSaQTXfFZVBfUhVMNjcru06a19RGmyM=
Received: by 10.204.154.215 with SMTP id p23mr2521896bkw.113.1310372844809;
	Mon, 11 Jul 2011 01:27:24 -0700 (PDT)
Received: from localhost ([91.144.186.21])
	by mx.google.com with ESMTPS id k5sm9849638bka.5.2011.07.11.01.27.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Mon, 11 Jul 2011 01:27:23 -0700 (PDT)
From: Dmitry Kurochkin <dmitry.kurochkin@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#9034: point adjustment after `end-of-visual-line' moves to
	the next line
In-Reply-To: <jwvtyato3lq.fsf-monnier+emacs@HIDDEN>
References: <87iprb38sa.fsf@HIDDEN> <jwvtyato3lq.fsf-monnier+emacs@HIDDEN>
User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1
	(x86_64-pc-linux-gnu)
Date: Mon, 11 Jul 2011 12:27:18 +0400
Message-ID: <87tyat1au1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 9034
Cc: 9034 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.6 (---)

On Mon, 11 Jul 2011 00:16:31 -0400, Stefan Monnier <monnier@HIDDEN> wrote:
> > If a line ends with invisible text, point adjustment moves to the next
> > line after `end-of-visual-line'.  To reproduce run:
> 
> >   (progn (switch-to-buffer "test")
> >          (insert "aline1\nbline2\ncline3\n")
> >          (put-text-property 7 14 'invisible t) ; region [\nbline2]
> >          (goto-char (point-min)))
> 
> > After that in the test buffer do M-: (progn (end-of-visual-line)
> > (point)).  `end-of-visual-line' moves point to position 14 as expected.
> > But after that the point is adjusted to position 15, as can be checked
> > by C-x =.
> 
> > Sometimes the point is not adjusted to position 15 the first time you
> > run `end-of-visual-line'.  But it is if you run it more than once.
> > Perhaps it is related to the last point position.
> 
> I can reproduce it with M-: (progn (goto-char 14) > (point))
> 

indeed

> > Also, `move-end-of-line` always behaves correctly, so it it something
> > specific to `end-of-visual-line' or `vertical-motion'.
> 
> Apparently not since I can reproduce the problem with just goto-char.

If visual-line-mode is enabled (so that C-e is mapped to
`end-of-visual-line' instead of `move-end-of-line'),
`end-of-visual-line' works correctly when run with C-e.

> Maybe it has to do with the use of M-: instead.
> 

Seems plausible.

Regards,
  Dmitry

> 
>         Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9034; Package emacs. Full text available.

Message received at 9034 <at> debbugs.gnu.org:


Received: (at 9034) by debbugs.gnu.org; 11 Jul 2011 04:16:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 11 00:16:41 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Qg7vF-0000FY-6H
	for submit <at> debbugs.gnu.org; Mon, 11 Jul 2011 00:16:41 -0400
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1Qg7vD-0000FM-DS
	for 9034 <at> debbugs.gnu.org; Mon, 11 Jul 2011 00:16:40 -0400
Received: from cpe-66-108-39-217.nyc.res.rr.com ([66.108.39.217]:44660
	helo=ceviche.home)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <monnier@HIDDEN>)
	id 1Qg7v7-00012Y-NW; Mon, 11 Jul 2011 00:16:33 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id AC647660D5; Mon, 11 Jul 2011 00:16:31 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Dmitry Kurochkin <dmitry.kurochkin@HIDDEN>
Subject: Re: bug#9034: point adjustment after `end-of-visual-line' moves to
	the next line
Message-ID: <jwvtyato3lq.fsf-monnier+emacs@HIDDEN>
References: <87iprb38sa.fsf@HIDDEN>
Date: Mon, 11 Jul 2011 00:16:31 -0400
In-Reply-To: <87iprb38sa.fsf@HIDDEN> (Dmitry Kurochkin's message of "Sat,
	09 Jul 2011 17:04:05 +0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 9034
Cc: 9034 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)

> If a line ends with invisible text, point adjustment moves to the next
> line after `end-of-visual-line'.  To reproduce run:

>   (progn (switch-to-buffer "test")
>          (insert "aline1\nbline2\ncline3\n")
>          (put-text-property 7 14 'invisible t) ; region [\nbline2]
>          (goto-char (point-min)))

> After that in the test buffer do M-: (progn (end-of-visual-line)
> (point)).  `end-of-visual-line' moves point to position 14 as expected.
> But after that the point is adjusted to position 15, as can be checked
> by C-x =.

> Sometimes the point is not adjusted to position 15 the first time you
> run `end-of-visual-line'.  But it is if you run it more than once.
> Perhaps it is related to the last point position.

I can reproduce it with M-: (progn (goto-char 14) > (point))

> Also, `move-end-of-line` always behaves correctly, so it it something
> specific to `end-of-visual-line' or `vertical-motion'.

Apparently not since I can reproduce the problem with just goto-char.
Maybe it has to do with the use of M-: instead.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9034; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Jul 2011 13:04:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 09 09:04:22 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QfXCn-00074m-Qh
	for submit <at> debbugs.gnu.org; Sat, 09 Jul 2011 09:04:22 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dmitry.kurochkin@HIDDEN>) id 1QfXCl-00074a-V4
	for submit <at> debbugs.gnu.org; Sat, 09 Jul 2011 09:04:21 -0400
Received: by bwb17 with SMTP id 17so2304225bwb.3
	for <submit <at> debbugs.gnu.org>; Sat, 09 Jul 2011 06:04:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=from:to:subject:user-agent:date:message-id:mime-version
	:content-type; bh=qiKDE8kVQu6di3MsN3/ee2uMfypHlMpbH3ANEi9vezs=;
	b=EATau4EpmngpMEKqF6lDO97a9dcuDFSNifHRN7mPxnSjYcJF4Xaz/DDL2K4GV69wV2
	T1Ws8xxNju28EvE4QNOQNoiHFj7/9SJtBO5Q4gw+ZusgE4P9JANfcbrjP3ZMZcYzldOY
	7Jz/gBPsldgUj/FD6V4poyyP8oewIi0kG6uxA=
Received: by 10.205.65.9 with SMTP id xk9mr761756bkb.388.1310216652258;
	Sat, 09 Jul 2011 06:04:12 -0700 (PDT)
Received: from localhost ([91.144.186.21])
	by mx.google.com with ESMTPS id c8sm522806bkc.15.2011.07.09.06.04.10
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 09 Jul 2011 06:04:11 -0700 (PDT)
From: Dmitry Kurochkin <dmitry.kurochkin@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: point adjustment after `end-of-visual-line' moves to the next line
User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1
	(x86_64-pc-linux-gnu)
Date: Sat, 09 Jul 2011 17:04:05 +0400
Message-ID: <87iprb38sa.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.6 (---)

Package: emacs
Version: 24.0.50

If a line ends with invisible text, point adjustment moves to the next
line after `end-of-visual-line'.  To reproduce run:

  (progn (switch-to-buffer "test")
         (insert "aline1\nbline2\ncline3\n")
         (put-text-property 7 14 'invisible t) ; region [\nbline2]
         (goto-char (point-min)))

After that in the test buffer do M-: (progn (end-of-visual-line)
(point)).  `end-of-visual-line' moves point to position 14 as expected.
But after that the point is adjusted to position 15, as can be checked
by C-x =.

Sometimes the point is not adjusted to position 15 the first time you
run `end-of-visual-line'.  But it is if you run it more than once.
Perhaps it is related to the last point position.

It is definitely happens because of point adjustment, setting
global-disable-point-adjustment to non-nil fixes the problem.

Also, `move-end-of-line` always behaves correctly, so it it something
specific to `end-of-visual-line' or `vertical-motion'.

The issue was originally reported on the emacs-devel ML [1].

Regards,
  Dmitry

[1] http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00255.html




Acknowledgement sent to Dmitry Kurochkin <dmitry.kurochkin@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#9034; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 25 Mar 2017 01:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.