all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 58793@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <838rl1mmu4.fsf@gnu.org> (raw)
In-Reply-To: <87a65jow19.fsf@localhost> (message from Ihor Radchenko on Wed, 26 Oct 2022 07:59:14 +0000)

> From: Ihor Radchenko <yantar92@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.





  parent reply	other threads:[~2022-10-27 13:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  7:59 bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Ihor Radchenko
2022-10-26 16:35 ` Eli Zaretskii
2022-10-27  4:24   ` Ihor Radchenko
2022-10-27  6:02     ` Eli Zaretskii
2022-10-27 13:13 ` Eli Zaretskii [this message]
2022-10-28  4:07   ` Ihor Radchenko
2022-10-28  6:36     ` Eli Zaretskii
2022-10-28  6:50     ` Eli Zaretskii
2022-10-29  2:42       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838rl1mmu4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58793@debbugs.gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.