GNU bug report logs - #17047
24.3.50; visual-line-mode + org-mode + C-f makes cursor jumps to unexpected position

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Thu, 20 Mar 2014 09:34:02 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17047 in the body.
You can then email your comments to 17047 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Thu, 20 Mar 2014 09:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 20 Mar 2014 09:34:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps to unexpected
 position
Date: Thu, 20 Mar 2014 10:33:14 +0100
[Message part 1 (text/plain, inline)]
Hello,

I run (with latest trunk, but the problem exists in earlier builds too) :

$ src/emacs -Q ~/tmp/testemacs.org
then do:
M-x visual-line-mode RET
TAB ;; show the content of the headline
C-x 3 ;; the second line gets wrapped (repeat if needed to achieve effect).
C-n
C-f

At this point, cursor moves erroneously to the end of the headline,
although M-: (point) RET reports 8 as it should (so, only the cursor is
misplaced).

Alternatively, "C-n C-f" can be replaced by "M-g c 8", then inserting
chars shows where point really is.

Here's the testemacs.org file
[testemacs.org (text/plain, inline)]
* foo
 f[[file:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]
[Message part 3 (text/plain, inline)]
In GNU Emacs 24.3.50.6 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2014-03-07 on geodiff-mac3
Windowing system distributor `The X.Org Foundation', version 11.0.11304000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure --with-x-toolkit=lucid 'CFLAGS= -O0 -g3''

Important settings:
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

-- 
Nico.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Thu, 20 Mar 2014 13:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 17047 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 17047 <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps to unexpected
 position
Date: Thu, 20 Mar 2014 14:17:04 +0100
[Message part 1 (text/plain, inline)]
Nicolas Richard <theonewiththeevillook <at> yahoo.fr> writes:

> * foo
>  f[[file:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]

Sorry, the initial 'f' on the second line should not be there. Here's
the correct file as attachment.

[testemacs.org (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Nico.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Thu, 20 Mar 2014 17:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 17047 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 17047 <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps to
 unexpected	position
Date: Thu, 20 Mar 2014 19:24:46 +0200
> From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
> Date: Thu, 20 Mar 2014 14:17:04 +0100
> Cc: 17047 <at> debbugs.gnu.org
> 
> Nicolas Richard <theonewiththeevillook <at> yahoo.fr> writes:
> 
> > * foo
> >  f[[file:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]
> 
> Sorry, the initial 'f' on the second line should not be there. Here's
> the correct file as attachment.

Ugh, and I already wasted an hour trying to reproduce this, and was
about to tell you I can't.

Thanks for the fixed recipe.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Thu, 20 Mar 2014 17:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 17047 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: theonewiththeevillook <at> yahoo.fr
Cc: 17047 <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps
 to	unexpected	position
Date: Thu, 20 Mar 2014 19:34:41 +0200
> Date: Thu, 20 Mar 2014 19:24:46 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 17047 <at> debbugs.gnu.org
> 
> > From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
> > Date: Thu, 20 Mar 2014 14:17:04 +0100
> > Cc: 17047 <at> debbugs.gnu.org
> > 
> > Nicolas Richard <theonewiththeevillook <at> yahoo.fr> writes:
> > 
> > > * foo
> > >  f[[file:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]
> > 
> > Sorry, the initial 'f' on the second line should not be there. Here's
> > the correct file as attachment.
> 
> Ugh, and I already wasted an hour trying to reproduce this, and was
> about to tell you I can't.
> 
> Thanks for the fixed recipe.

Interim report: a very old bug, I see it in Emacs 23.1 (didn't try
earlier).




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 23 Mar 2014 16:04:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
bug acknowledged by developer. (Sun, 23 Mar 2014 16:04:02 GMT) Full text and rfc822 format available.

Message #19 received at 17047-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: theonewiththeevillook <at> yahoo.fr
Cc: 17047-done <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50; visual-line-mode + org-mode + C-f makes cursor
 jumps	to	unexpected	position
Date: Sun, 23 Mar 2014 18:02:48 +0200
> Date: Thu, 20 Mar 2014 19:34:41 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 17047 <at> debbugs.gnu.org
> 
> > Date: Thu, 20 Mar 2014 19:24:46 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 17047 <at> debbugs.gnu.org
> > 
> > > From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
> > > Date: Thu, 20 Mar 2014 14:17:04 +0100
> > > Cc: 17047 <at> debbugs.gnu.org
> > > 
> > > Nicolas Richard <theonewiththeevillook <at> yahoo.fr> writes:
> > > 
> > > > * foo
> > > >  f[[file:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]
> > > 
> > > Sorry, the initial 'f' on the second line should not be there. Here's
> > > the correct file as attachment.
> > 
> > Ugh, and I already wasted an hour trying to reproduce this, and was
> > about to tell you I can't.
> > 
> > Thanks for the fixed recipe.
> 
> Interim report: a very old bug, I see it in Emacs 23.1 (didn't try
> earlier).

Fixed in revision 116843 on the emacs-24 branch.

Note that moving cursor to the "f" of "file" from the left will get
you to position 8, while moving there from the right will get you to
position 10.  But this is a separate "feature".

Also note that this situation is one of the small number where
visual-order-cursor-movement works differently from the default
logical-order one, even though there's no bidirectional context
anywhere in sight.  And that is also a feature.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Mon, 24 Mar 2014 09:42:01 GMT) Full text and rfc822 format available.

Message #22 received at 17047-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 17047-done <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps to unexpected
 position
Date: Mon, 24 Mar 2014 10:41:07 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:
> Fixed in revision 116843 on the emacs-24 branch.

Thanks !

> Note that moving cursor to the "f" of "file" from the left will get
> you to position 8, while moving there from the right will get you to
> position 10.  But this is a separate "feature".

This is not unexpected I think. It would be nice to have a visual clue
about which side of the invisible text we stand, but I have no idea what
kind of clue it should be. Is that worth a wishlist bug anyway ?

> Also note that this situation is one of the small number where
> visual-order-cursor-movement works differently from the default
> logical-order one, even though there's no bidirectional context
> anywhere in sight.  And that is also a feature.

Just for the record, the difference is that no matter if we come from
left or right, we get to position 10.

-- 
Nico.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17047; Package emacs. (Mon, 24 Mar 2014 17:24:01 GMT) Full text and rfc822 format available.

Message #25 received at 17047 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 17047 <at> debbugs.gnu.org
Subject: Re: bug#17047: 24.3.50;
 visual-line-mode + org-mode + C-f makes cursor jumps to unexpected
 position
Date: Mon, 24 Mar 2014 19:23:00 +0200
> From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
> Cc: 17047-done <at> debbugs.gnu.org
> Date: Mon, 24 Mar 2014 10:41:07 +0100
> 
> > Note that moving cursor to the "f" of "file" from the left will get
> > you to position 8, while moving there from the right will get you to
> > position 10.  But this is a separate "feature".
> 
> This is not unexpected I think. It would be nice to have a visual clue
> about which side of the invisible text we stand, but I have no idea what
> kind of clue it should be. Is that worth a wishlist bug anyway ?

The clue you mention is not what bothers me.  What bothers me is that
the same position of the cursor corresponds to 2 different text
positions, and you can only get to one of them, depending on the
direction of the cursor motion.  From the left, you get positions 7,
8, 11, 12, ...  From the right, you get 12, 11, 10, 7, ...  The cursor
is positioned on the same character for both 8 and 10.

The only justification for this "feature" is that otherwise you
couldn't have inserted text before the invisible portion.

> > Also note that this situation is one of the small number where
> > visual-order-cursor-movement works differently from the default
> > logical-order one, even though there's no bidirectional context
> > anywhere in sight.  And that is also a feature.
> 
> Just for the record, the difference is that no matter if we come from
> left or right, we get to position 10.

Indeed, because it goes by characters that are actually displayed, and
the character at position 8 is not.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Apr 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 13 days ago.

Previous Next


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