emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-indent-mode with visual-line-mode breaks C-a and C-e
@ 2017-03-30 19:33 Thibault Polge
  2017-04-01  8:13 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Thibault Polge @ 2017-03-30 19:33 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]


* Summary

With visual-line-mode and org-indent-mode activated, C-a and C-e
misbehaves on indented text blocks.  C-a and C-e sometimes start jumping
over lines (ie, go backwards or forward one extra line) and sometimes
even reverses direction (C-e goes backward). I can reproduce this from
emacs -Q with builtin Org 8.2.10. The issue can also be reproduced
without enabling org-indent-mode, although it is much less severe
without it.

* Steps to reproduce

From emacs -Q:

 1. Open the attached document, or create a new org-mode file with an
    heading and a (preferably long) paragraph or text under it.
 2. Enable visual-line-mode and org-indent-mode
 3. Reduce Emacs frame width.
 4. With text-scale-mode or (set-frame-parameter), seriously increase
    the font size (if it can't display more than two or three words per
    line, that's perfect).
 5. Go to the last character of the huge paragraph.
 6. Start playing with C-a and C-e.  The cursor will wander erratically
    within the paragraph, often in the wrong direction.

Notice: setting the frame width, the font size and going to the end of
the document is not strictly required, as the bug will appear sooner or
later, but in my tests it made it appear much faster, in a matter of
seconds.]

I'm using Emacs 25.2rc2 with org 9.0.5 from ELPA, but have been
experiencing this since Emacs 24.5 and the built-in Org (8.x I believe).
I can reproduce under the same conditions with the built-in org of Emacs
25.2rc2 as well.

Thanks a lot for your help,
Thibault


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-bug.org --]
[-- Type: text/x-org, Size: 1018 bytes --]

* This will break

On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances a
 ccepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: org-indent-mode with visual-line-mode breaks C-a and C-e
  2017-03-30 19:33 Bug: org-indent-mode with visual-line-mode breaks C-a and C-e Thibault Polge
@ 2017-04-01  8:13 ` Nicolas Goaziou
  2017-04-01  9:43   ` Thibault Polge
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2017-04-01  8:13 UTC (permalink / raw)
  To: Thibault Polge; +Cc: emacs-orgmode

Hello,

Thibault Polge <thibault@thb.lt> writes:

> With visual-line-mode and org-indent-mode activated, C-a and C-e
> misbehaves on indented text blocks.  C-a and C-e sometimes start jumping
> over lines (ie, go backwards or forward one extra line) and sometimes
> even reverses direction (C-e goes backward). I can reproduce this from
> emacs -Q with builtin Org 8.2.10. The issue can also be reproduced
> without enabling org-indent-mode, although it is much less severe
> without it.

C-a, aka `org-beginning-of-line', merely calls
`beginning-of-visual-line' when Visual Line mode is active. Would it be
possible that the bug lies in that function? I.e., could you try
reproducing the bug just calling `beginning-of-visual-line'?

If my assumption is true, you could report the problem to Emacs devs
instead.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: org-indent-mode with visual-line-mode breaks C-a and C-e
  2017-04-01  8:13 ` Nicolas Goaziou
@ 2017-04-01  9:43   ` Thibault Polge
  0 siblings, 0 replies; 3+ messages in thread
From: Thibault Polge @ 2017-04-01  9:43 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

I can confirm the issue appears with those two commands. I forwarded
this report to the Emacs bug tracker.

Regards,

Nicolas Goaziou writes:

> Hello,
>
> Thibault Polge <thibault@thb.lt> writes:
>
>> With visual-line-mode and org-indent-mode activated, C-a and C-e
>> misbehaves on indented text blocks.  C-a and C-e sometimes start jumping
>> over lines (ie, go backwards or forward one extra line) and sometimes
>> even reverses direction (C-e goes backward). I can reproduce this from
>> emacs -Q with builtin Org 8.2.10. The issue can also be reproduced
>> without enabling org-indent-mode, although it is much less severe
>> without it.
>
> C-a, aka `org-beginning-of-line', merely calls
> `beginning-of-visual-line' when Visual Line mode is active. Would it be
> possible that the bug lies in that function? I.e., could you try
> reproducing the bug just calling `beginning-of-visual-line'?
>
> If my assumption is true, you could report the problem to Emacs devs
> instead.
>
> Regards,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-01  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 19:33 Bug: org-indent-mode with visual-line-mode breaks C-a and C-e Thibault Polge
2017-04-01  8:13 ` Nicolas Goaziou
2017-04-01  9:43   ` Thibault Polge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).