From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <838rl1mmu4.fsf@gnu.org> References: <87a65jow19.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17207"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58793@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 15:19:46 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oo2nR-0004E0-Ea for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 15:19:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo2hw-00052x-PF; Thu, 27 Oct 2022 09:14:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo2hu-0004tq-Ff for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 09:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo2hu-0005N8-8F for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 09:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo2hu-0002GA-2O for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 09:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 13:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs Original-Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.16668764058635 (code B ref 58793); Thu, 27 Oct 2022 13:14:02 +0000 Original-Received: (at 58793) by debbugs.gnu.org; 27 Oct 2022 13:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:56408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo2hI-0002FD-Pb for submit@debbugs.gnu.org; Thu, 27 Oct 2022 09:13:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo2hG-0002Ex-Gm for 58793@debbugs.gnu.org; Thu, 27 Oct 2022 09:13:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo2hB-0005EH-Al; Thu, 27 Oct 2022 09:13:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZWxZDFLPX07rhgiMvPhqJ2iDuVxhy2/61zjflsavXj4=; b=a9xlvnJqzXSJ O7IB72AtWQeZQYj//O5EHmil6PFOP/bqAIu9LYejExPTlmEPFY/iEcSSUD2k04ZaVz3TmpE7kUbcd B7tNI+Q9DSkRq8xcR3fRoh4kyrYeHpcWOp4te3VsGGof1xJP2ldNAyyAIoSA9VBb5tpu//Jel2k8r uAEq6O+0y5YKd9FcP+FEulNE+SClCulCb0sOzEmuTnpR4oAm4sMoGC/YHgn9p8Sgs+1wdvik9jaZz dn1V9xxvJhTlv4r8zVNxmf3VW/NlptQDeJfY3JsFqFYfJY/whyKvA8qNQilT/tzXBQuhOuQo2gCaZ QyDTgDTfSeJAuTY9naOe/w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo2h8-0004Bt-Cl; Thu, 27 Oct 2022 09:13:15 -0400 In-Reply-To: <87a65jow19.fsf@localhost> (message from Ihor Radchenko on Wed, 26 Oct 2022 07:59:14 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246297 Archived-At: > From: Ihor Radchenko > 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.