GNU bug report logs - #14346
24.3; beginning-of-visual-line jumps to previous line in org-mode

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sat, 4 May 2013 09:10:01 UTC

Severity: minor

Found in version 24.3

Done: Stefan Kangas <stefan <at> marxist.se>

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 14346 in the body.
You can then email your comments to 14346 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#14346; Package emacs. (Sat, 04 May 2013 09:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 May 2013 09:10:02 GMT) Full text and rfc822 format available.

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

From: E Sabof <esabof <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; beginning-of-visual-line jumps to previous line in org-mode
Date: Sat, 4 May 2013 10:08:46 +0100
[Message part 1 (text/plain, inline)]
In a buffer with org-mode and visual line-mode, paste this text:

text
[[TEXT]]

Put cursor on E
Press [left arrow].
Press [home] (or C-a, bound to org-beginning-of-line)
The cursor will go to the end of the previous line

The behavior is correct, if one invokes either of those functions through
M-x or M-:

Evgeni
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Sat, 04 May 2013 11:03:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3;
	beginning-of-visual-line jumps to previous line in org-mode
Date: Sat, 04 May 2013 14:01:21 +0300
> Date: Sat, 4 May 2013 10:08:46 +0100
> From: E Sabof <esabof <at> gmail.com>
> 
> In a buffer with org-mode and visual line-mode, paste this text:
> 
> text
> [[TEXT]]
> 
> Put cursor on E
> Press [left arrow].
> Press [home] (or C-a, bound to org-beginning-of-line)
> The cursor will go to the end of the previous line
> 
> The behavior is correct, if one invokes either of those functions through
> M-x or M-:

That's point adjustment feature in action: it moves point further in
the same direction if point winds up in invisible text.  Customize
disable-point-adjustment to a non-nil value, if you don't want that to
happen.

Does anyone (Stefan? Glenn? anyone else?) see any reasons to try and
fix this, as opposed to deciding that this is a "feature"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Sat, 04 May 2013 11:07:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: esabof <at> gmail.com
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3;
	beginning-of-visual-line jumps to previous line in org-mode
Date: Sat, 04 May 2013 14:05:25 +0300
> Date: Sat, 04 May 2013 14:01:21 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 14346 <at> debbugs.gnu.org
> 
> Customize disable-point-adjustment to a non-nil value, if you don't
> want that to happen.

Sorry, I meant global-disable-point-adjustment
(disable-point-adjustment is reset to nil before each command, so it
won't do what I meant).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Sat, 04 May 2013 11:19:02 GMT) Full text and rfc822 format available.

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

From: E Sabof <esabof <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3; beginning-of-visual-line jumps to previous line
	in org-mode
Date: Sat, 4 May 2013 12:17:35 +0100
[Message part 1 (text/plain, inline)]
On Sat, May 4, 2013 at 12:05 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Sat, 04 May 2013 14:01:21 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 14346 <at> debbugs.gnu.org
> >
> > Customize disable-point-adjustment to a non-nil value, if you don't
> > want that to happen.
>
> Sorry, I meant global-disable-point-adjustment
> (disable-point-adjustment is reset to nil before each command, so it
> won't do what I meant).
>

I see what you mean. But it still looks like a bug - whether I follow the
above recipe, or press C-e C-a, the point will (should?) go to the same
position, but the behavior is different.

Evgeni
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Sat, 04 May 2013 12:19:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3;
	beginning-of-visual-line jumps to previous line in org-mode
Date: Sat, 04 May 2013 15:16:48 +0300
> Date: Sat, 4 May 2013 12:17:35 +0100
> From: E Sabof <esabof <at> gmail.com>
> Cc: 14346 <at> debbugs.gnu.org
> 
> I see what you mean. But it still looks like a bug - whether I follow the
> above recipe, or press C-e C-a, the point will (should?) go to the same
> position, but the behavior is different.

The behavior depends on the direction point was moving before ending
up in the invisible text.  It's a heuristic, and as every heuristic,
it sometimes fails.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Sat, 04 May 2013 13:29:03 GMT) Full text and rfc822 format available.

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

From: E Sabof <esabof <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3; beginning-of-visual-line jumps to previous line
	in org-mode
Date: Sat, 4 May 2013 14:27:31 +0100
[Message part 1 (text/plain, inline)]
Wouldn't it be better if forward/backward-char kept the old behavior, and
the rest of the commands did something similar to this in the end:

(setq disable-point-adjustment
      (preceding-or-following-character-visible-p))

I'm not entirely sure whether it would be better, but at the moment, I
can't think of a case where it wouldn't.

Evgeni


On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Sat, 4 May 2013 12:17:35 +0100
> > From: E Sabof <esabof <at> gmail.com>
> > Cc: 14346 <at> debbugs.gnu.org
> >
> > I see what you mean. But it still looks like a bug - whether I follow the
> > above recipe, or press C-e C-a, the point will (should?) go to the same
> > position, but the behavior is different.
>
> The behavior depends on the direction point was moving before ending
> up in the invisible text.  It's a heuristic, and as every heuristic,
> it sometimes fails.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Tue, 07 May 2013 01:36:02 GMT) Full text and rfc822 format available.

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

From: E Sabof <esabof <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, emacs-orgmode <at> gnu.org
Cc: 14346 <at> debbugs.gnu.org
Subject: Re: bug#14346: 24.3; beginning-of-visual-line jumps to previous line
	in org-mode
Date: Tue, 7 May 2013 02:34:40 +0100
[Message part 1 (text/plain, inline)]
Even if the behavior doesn't change (soon), could the equivalent of the
following be implemented in org-mode? It's the only place where this has
been problematic for me.

(defadvice org-beginning-of-line (after smart-point-adjustment activate)
  (setq disable-point-adjustment
        (or (not (invisible-p (point)))
            (not (invisible-p (max (point-min) (1- (point))))))))

(defadvice org-end-of-line (after smart-point-adjustment activate)
  (setq disable-point-adjustment
        (or (not (invisible-p (point)))
            (not (invisible-p (max (point-min) (1- (point))))))))

Evgeni


On Sat, May 4, 2013 at 2:27 PM, E Sabof <esabof <at> gmail.com> wrote:

> Wouldn't it be better if forward/backward-char kept the old behavior, and
> the rest of the commands did something similar to this in the end:
>
> (setq disable-point-adjustment
>       (preceding-or-following-character-visible-p))
>
> I'm not entirely sure whether it would be better, but at the moment, I
> can't think of a case where it wouldn't.
>
> Evgeni
>
>
> On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > Date: Sat, 4 May 2013 12:17:35 +0100
>> > From: E Sabof <esabof <at> gmail.com>
>> > Cc: 14346 <at> debbugs.gnu.org
>> >
>> > I see what you mean. But it still looks like a bug - whether I follow
>> the
>> > above recipe, or press C-e C-a, the point will (should?) go to the same
>> > position, but the behavior is different.
>>
>> The behavior depends on the direction point was moving before ending
>> up in the invisible text.  It's a heuristic, and as every heuristic,
>> it sometimes fails.
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14346; Package emacs. (Fri, 10 May 2013 07:01:01 GMT) Full text and rfc822 format available.

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

From: Carsten Dominik <carsten.dominik <at> gmail.com>
To: E Sabof <esabof <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 14346 <at> debbugs.gnu.org, emacs-orgmode <at> gnu.org
Subject: Re: [O] bug#14346: 24.3;
	beginning-of-visual-line jumps to previous line in org-mode
Date: Fri, 10 May 2013 09:00:03 +0200
[Message part 1 (text/plain, inline)]
On 7.5.2013, at 03:34, E Sabof <esabof <at> gmail.com> wrote:

> Even if the behavior doesn't change (soon), could the equivalent of the following be implemented in org-mode? It's the only place where this has been problematic for me. 
> 
> (defadvice org-beginning-of-line (after smart-point-adjustment activate)
>   (setq disable-point-adjustment
>         (or (not (invisible-p (point)))
>             (not (invisible-p (max (point-min) (1- (point))))))))
> 
> (defadvice org-end-of-line (after smart-point-adjustment activate)
>   (setq disable-point-adjustment
>         (or (not (invisible-p (point)))
>             (not (invisible-p (max (point-min) (1- (point))))))))

I have implemented these in Org master, so this will eventually mode into emacs as well.

- Carsten

> 
> Evgeni
> 
> 
> On Sat, May 4, 2013 at 2:27 PM, E Sabof <esabof <at> gmail.com> wrote:
> Wouldn't it be better if forward/backward-char kept the old behavior, and the rest of the commands did something similar to this in the end:
> 
> (setq disable-point-adjustment
>       (preceding-or-following-character-visible-p))
> 
> I'm not entirely sure whether it would be better, but at the moment, I can't think of a case where it wouldn't.
> 
> Evgeni
> 
> 
> On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sat, 4 May 2013 12:17:35 +0100
> > From: E Sabof <esabof <at> gmail.com>
> > Cc: 14346 <at> debbugs.gnu.org
> >
> > I see what you mean. But it still looks like a bug - whether I follow the
> > above recipe, or press C-e C-a, the point will (should?) go to the same
> > position, but the behavior is different.
> 
> The behavior depends on the direction point was moving before ending
> up in the invisible text.  It's a heuristic, and as every heuristic,
> it sometimes fails.
> 
> 

[Message part 2 (text/html, inline)]

Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 30 Sep 2019 16:00:02 GMT) Full text and rfc822 format available.

Notification sent to E Sabof <esabof <at> gmail.com>:
bug acknowledged by developer. (Mon, 30 Sep 2019 16:00:03 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Carsten Dominik <carsten.dominik <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, E Sabof <esabof <at> gmail.com>,
 14346-done <at> debbugs.gnu.org
Subject: Re: bug#14346: [O] bug#14346: 24.3; beginning-of-visual-line jumps to
 previous line in org-mode
Date: Mon, 30 Sep 2019 17:59:28 +0200
Carsten Dominik <carsten.dominik <at> gmail.com> writes:

> I have implemented these in Org master, so this will eventually mode
> into emacs as well.

It seems like this was implemented at the time, and should be merged
to master by now.  I'm therefore closing this bug report.

If there is still any issues here that I'm missing, please reopen the
bug report.

Best regards,
Stefan Kangas




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

This bug report was last modified 4 years and 173 days ago.

Previous Next


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