GNU bug report logs - #58793
28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 26 Oct 2022 07:59:02 UTC

Severity: normal

Found in version 28.1.90

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 58793 <at> debbugs.gnu.org
Subject: Re: bug#58793: 28.1.90;
 Emacs tries to recenter / rescroll when it hits hidden org emphasis
Date: Thu, 27 Oct 2022 16:13:07 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Date: Wed, 26 Oct 2022 07:59:14 +0000
> 
> 1. Load the repro emacs settings.
> 2. Scroll down in a buffer, such that top of buffer is not visible on
> screen.
> 3. Create an emphasized word at the beginning of the 2nd visual-line in a
> visually-wrapped line.
> 4. Move your point to the start of that emphasized word
> 
> It's a little difficult to describe, so I'll give an example. Assume
> that the visual-line wrapping is happening at the place indicated by
> "$".
> 
> ```
> So, if this were one long line, then this is the first visual line,$
> /whereas/ this is the second visual line in the paragraph, and you'd place$
> point on the italicized "w" in the word "whereas". That triggers the bug.
> ```
> 
> What happens next is that emacs thinks the point is no longer on screen
> and tries to scroll to fix that. Under vanilla emacs, it will just
> recenter the point. This still is misbehaving but not terribly. However,
> with
> smooth-scrolling as mentioned above, the behavior is worse. The window
> scrolls up and point jumps to the top of the window.
> 
> Reproed this with the following: emacs -Q
> with the following:
> ```
> (setq org-hide-emphasis-markers t)
> 
> (org-mode)
> (visual-line-mode 1)
> 
> ;; Without this, emacs will still show bug by calling recenter, but the
> effect is particularly egregious with these settings (i.e. smooth scrolling)
> (setq scroll-conservatively 101
>       scroll-preserve-screen-position t
>       scroll-margin 0)
> ```

Thanks, I hope I fixed this now.




This bug report was last modified 2 years and 210 days ago.

Previous Next


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