GNU bug report logs -
#58793
28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Oct 2022 09:36:43 +0300
with message-id <83v8o4jvyc.fsf <at> gnu.org>
and subject line Re: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis
has caused the debbugs.gnu.org bug report #58793,
regarding 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
58793: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58793
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello,
I am forwarding the following bug report from Org mailing list
(https://orgmode.org/list/CA+FzMhahT16w5KPi3hgq8Gn7wnb+PjcNuS_ULk_jroGLHBVBaw <at> mail.gmail.com)
It appears to be related to Emacs.
I can also reproduce on my side and I have seen similar scrolling quirks
myself in the daily usage.
-------------
To reproduce this:
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)
```
Best,
Ihor
In GNU Emacs 28.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
of 2022-07-17 built on localhost
Repository revision: f5218385c064aa959650bfe49ca32795270851eb
Repository branch: emacs-28
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Gentoo Linux
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
[Message part 3 (message/rfc822, inline)]
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: 58793 <at> debbugs.gnu.org
> Date: Fri, 28 Oct 2022 04:07:33 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Thanks, I hope I fixed this now.
>
> I confirm the fix.
> Thanks!
Thanks for testing, I'm therefore closing the bug.
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.