From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Date: Wed, 26 Oct 2022 07:59:14 +0000 Message-ID: <87a65jow19.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3735"; mail-complaints-to="usenet@ciao.gmane.io" To: 58793@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 26 10:00:08 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 1onbKZ-0000jn-TF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Oct 2022 10:00:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onbJY-0002Sb-DV; Wed, 26 Oct 2022 03:59: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 1onbJW-0002Ij-VS for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 03:59: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 1onbJW-0006zu-N9 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 03:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onbJW-0004XM-IR for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 03:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2022 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58793 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166677113417410 (code B ref -1); Wed, 26 Oct 2022 07:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 07:58:54 +0000 Original-Received: from localhost ([127.0.0.1]:53182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onbJK-0004WZ-JP for submit@debbugs.gnu.org; Wed, 26 Oct 2022 03:58:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onbJA-0004W9-Ub for submit@debbugs.gnu.org; Wed, 26 Oct 2022 03:58:49 -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 1onbJA-00006A-9V for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 03:58:40 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onbJ7-0006y7-EO for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 03:58:40 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2C818240028 for ; Wed, 26 Oct 2022 09:58:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666771115; bh=lMFt6Xg/yS/sMGMZAJJ9gtFLtOXuhqHSHFWnCLoNLlk=; h=From:To:Subject:Date:From; b=kAsrc5GTfpjXkRu9J8Dfo3YuxYK8qi1iTO546/nwzL5556JCDNAb6pUORX578Oezi mmIpiVzdb28BTTn6KMscOnEAvFwIuIwbtqusdMYtdBPJApIpMXWixLsOq0H9rQjNoU gw6kneVPjdMcTfo8uF6XpDePU+j2hhaeiB8iN1lcZ/j0pful0wP6Ztthrx0YpUbJG7 29b0gZF+QHjtD1TODhASVlNSg0Tv/kMWo/6VCf5aNAGVwpHOJjUQYYr/savH7ZBVcw cBUrm9iCYxTZKmOBXcC6/zO0bdOvHlcgHZLgi2lM5Awo+uBJQndQGCrwrmvLQitXsr BKdRIXfwf+mvw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4My1Qd5tLBz6tm9 for ; Wed, 26 Oct 2022 09:58:30 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:246201 Archived-At: Hello, I am forwarding the following bug report from Org mailing list (https://orgmode.org/list/CA+FzMhahT16w5KPi3hgq8Gn7wnb+PjcNuS_ULk_jroGLHBVBaw@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 . Support Org development at , or support my work at