From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis 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-GNU-PR-Keywords: To: 58793@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166677113417410 (code B ref -1); Wed, 26 Oct 2022 07:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 07:58:54 +0000 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 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 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 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 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== 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) From: Ihor Radchenko Date: Wed, 26 Oct 2022 07:59:14 +0000 Message-ID: <87a65jow19.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2022 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko Cc: 58793@debbugs.gnu.org Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.166680219622672 (code B ref 58793); Wed, 26 Oct 2022 16:37:02 +0000 Received: (at 58793) by debbugs.gnu.org; 26 Oct 2022 16:36:36 +0000 Received: from localhost ([127.0.0.1]:55172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onjON-0005tc-Mi for submit@debbugs.gnu.org; Wed, 26 Oct 2022 12:36:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onjOK-0005tN-Cw for 58793@debbugs.gnu.org; Wed, 26 Oct 2022 12:36:34 -0400 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 1onjOE-0001NA-UB; Wed, 26 Oct 2022 12:36:27 -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=HkLcOgTmWA+Nku+Ks+u4EiMq8y5Uk1s/CW6atcXEvM0=; b=XIPthtWtYjV4 5O0XzsylA/8MXaoMZPBSZ4eILJDsummYNkxXDzKFVW78vmM+o+wJyZ7p/plSyg1BcjSxsK3D93LPp eO3SrzrGok/DVuPOYHaE7G5rvkWjVZ4VWd55FXOO0RAzMt6veOo8p2yi1aOjD+5N38barjiLpwk9k D/LwHwM3/BUAfZ/oIoMbKYoSVPgLVpb8lAX+jrCajCgCIVPQ3P74gdw9Zr8cmrugxIeemRJG4142A nczfxGgsxO+bHkPQTzI+2dZKc5Y76iJOX9uT8NX+Jlyj2TdO4LCqQDc65NzZyE6FyD3LncLd7TGXK PCdxUFQncSeZNN5EZ9hudw==; 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 1onjNT-0003hT-4K; Wed, 26 Oct 2022 12:35:52 -0400 Date: Wed, 26 Oct 2022 19:35:30 +0300 Message-Id: <83zgdimtkd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a65jow19.fsf@localhost> (message from Ihor Radchenko on Wed, 26 Oct 2022 07:59:14 +0000) References: <87a65jow19.fsf@localhost> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 26 Oct 2022 07:59:14 +0000 > > 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. But you are not on the italicized "w", are you? Try "C-x =", and you will see. The question is why. Hmm... From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 04:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 58793@debbugs.gnu.org Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.166684463711241 (code B ref 58793); Thu, 27 Oct 2022 04:24:01 +0000 Received: (at 58793) by debbugs.gnu.org; 27 Oct 2022 04:23:57 +0000 Received: from localhost ([127.0.0.1]:55730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onuQu-0002vE-0n for submit@debbugs.gnu.org; Thu, 27 Oct 2022 00:23:56 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onuQi-0002ur-Vp for 58793@debbugs.gnu.org; Thu, 27 Oct 2022 00:23:53 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F3937240101 for <58793@debbugs.gnu.org>; Thu, 27 Oct 2022 06:23:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666844619; bh=rm5ZhZ+ctMMw/hroGU27w/MZIwITij75iqa8Q3RNKu0=; h=From:To:Cc:Subject:Date:From; b=gquT8aFRZA5/GP0fsjOMUB8sPOW7476Po61ktvQgWhZ+7JkuZa7tBQUGHG1V78071 sjxGZYgiGWxLOX2SiAc1AIZ1Z8yRJG6e0Zz2DnFUG5VWffdMMIi7vK8OUsIinUtcA3 eKvJzc95N2k0QxAJRSnJ9y1NS86yC35ECckfXhfuzJfTcNJi7jtZd4X/Ifm6dBNgZJ YnG5v1+sgDxApP6f4k8/rcTJhQKiW6k/jawQFH/dg9Y/rfsVZu8oYcYTNmNhB2lrNT EWjVJYluYTtgMlVc8jWzrvHsGpopU183gMWltpFvJp7jhOm4LSp8sVelcSpjSPPOnN /7l0f+HKuoxtw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MyXc93h00z9rxD; Thu, 27 Oct 2022 06:23:34 +0200 (CEST) From: Ihor Radchenko In-Reply-To: <83zgdimtkd.fsf@gnu.org> References: <87a65jow19.fsf@localhost> <83zgdimtkd.fsf@gnu.org> Date: Thu, 27 Oct 2022 04:24:17 +0000 Message-ID: <87o7txopvy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> 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. > > But you are not on the italicized "w", are you? Try "C-x =", and you > will see. (I assume that you have managed to confirm the bug; I can provide a more detailed recipe if necessary) Yes, C-x = reports invisible "/". -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 06:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko Cc: 58793@debbugs.gnu.org Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.166685057222427 (code B ref 58793); Thu, 27 Oct 2022 06:03:02 +0000 Received: (at 58793) by debbugs.gnu.org; 27 Oct 2022 06:02:52 +0000 Received: from localhost ([127.0.0.1]:55955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onvyd-0005pe-Lt for submit@debbugs.gnu.org; Thu, 27 Oct 2022 02:02:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onvyU-0005pK-SW for 58793@debbugs.gnu.org; Thu, 27 Oct 2022 02:02:49 -0400 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 1onvyP-00067t-1R; Thu, 27 Oct 2022 02:02:37 -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=fj9Fkm60+tf4Gb83XvEdo5VdgRX/nB2jSRrEbMjEfr0=; b=SXYu4jzONa+i 3O/t0d+/cIjJPXZQR9JIpBQr1GuogspLegT+FOvz0Xbxv5lBxK1D6IC7/zkYrd0IWf2tiA7ZfxDCY xjRhzATTNcxRuMpnCU31S2X1o5l/hvtE0IBFKZWCfRxU+gVbGOPjfRzLaPpH+wwUznaUzCURmMy2A eptpXH7FdhVMWTjVG7Uea0ITXZlsoEFckFVpTUF3o7oWG7ZWiT6RQWjYKqUeBJKEA1k/eLDGFPYgp OK5e7s8EAkpTL/5GV+Npa/dnTPQb5WTkteXc6Mp5zWIsg97Je1vw9qx9geJAFTLuQkBUMU497/jy+ KFdKj253fbPpgz4KEN66qQ==; 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 1onvyO-00032c-FU; Thu, 27 Oct 2022 02:02:36 -0400 Date: Thu, 27 Oct 2022 09:02:29 +0300 Message-Id: <83edutn6ru.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o7txopvy.fsf@localhost> (message from Ihor Radchenko on Thu, 27 Oct 2022 04:24:17 +0000) References: <87a65jow19.fsf@localhost> <83zgdimtkd.fsf@gnu.org> <87o7txopvy.fsf@localhost> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 58793@debbugs.gnu.org > Date: Thu, 27 Oct 2022 04:24:17 +0000 > > Eli Zaretskii writes: > > >> 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. > > > > But you are not on the italicized "w", are you? Try "C-x =", and you > > will see. > > (I assume that you have managed to confirm the bug; I can provide a more > detailed recipe if necessary) Yes, I see the recentering scroll. I will look into that shortly. From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis 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 X-GNU-PR-Keywords: To: Ihor Radchenko Cc: 58793@debbugs.gnu.org Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.16668764058635 (code B ref 58793); Thu, 27 Oct 2022 13:14:02 +0000 Received: (at 58793) by debbugs.gnu.org; 27 Oct 2022 13:13:25 +0000 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 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 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==; 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 Date: Thu, 27 Oct 2022 16:13:07 +0300 Message-Id: <838rl1mmu4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a65jow19.fsf@localhost> (message from Ihor Radchenko on Wed, 26 Oct 2022 07:59:14 +0000) References: <87a65jow19.fsf@localhost> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Oct 2022 04:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 58793@debbugs.gnu.org Received: via spool by 58793-submit@debbugs.gnu.org id=B58793.166693002127942 (code B ref 58793); Fri, 28 Oct 2022 04:07:01 +0000 Received: (at 58793) by debbugs.gnu.org; 28 Oct 2022 04:07:01 +0000 Received: from localhost ([127.0.0.1]:59941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooGe4-0007GZ-QB for submit@debbugs.gnu.org; Fri, 28 Oct 2022 00:07:01 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooGe2-0007GM-9a for 58793@debbugs.gnu.org; Fri, 28 Oct 2022 00:06:58 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 42042240101 for <58793@debbugs.gnu.org>; Fri, 28 Oct 2022 06:06:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666930012; bh=DIIW/wf/RuYtXa+oBltNZ7k8Q2PYpomFtBCe6BsAD8A=; h=From:To:Cc:Subject:Date:From; b=jlXncFM6ZJvcEUXy75B/4qVvUlTTWzc5z4qUhiAjPbFOxlP0cgk+FDNLtU1TEWVA8 007tStDI9pIJcEphEGMR32jkJacDzoUSaAQ1tJRsuoRsLp0hD2O6Iub1GTY7eazsNs CBxtHBSDzB4n8d5AjiBvVh86/4GxzK+qi9RHOXBxpwrughays/VCFkVCzSXLnxNRIf 0wtONorYSIaltMWQf3G7XCfgok3DWsSF1MBJpdNP3dDaT1EeyBgQG4E4rMW3dpiR7M ZfIfzet6QynS6tShGkhXLc9L4XfsC1TsTAYuHCtLS95KA4/KjV8JONziZ7NxctDBlP U8MhGASbdEaQA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mz8BL6HVWz6tmK; Fri, 28 Oct 2022 06:06:50 +0200 (CEST) From: Ihor Radchenko In-Reply-To: <838rl1mmu4.fsf@gnu.org> References: <87a65jow19.fsf@localhost> <838rl1mmu4.fsf@gnu.org> Date: Fri, 28 Oct 2022 04:07:33 +0000 Message-ID: <877d0kmvzu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Thanks, I hope I fixed this now. I confirm the fix. Thanks! -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From unknown Mon Jun 23 09:41:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ihor Radchenko Subject: bug#58793: closed (Re: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis) Message-ID: References: <83v8o4jvyc.fsf@gnu.org> <87a65jow19.fsf@localhost> X-Gnu-PR-Message: they-closed 58793 X-Gnu-PR-Package: emacs Reply-To: 58793@debbugs.gnu.org Date: Fri, 28 Oct 2022 06:37:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1666939022-10178-1" This is a multi-part message in MIME format... ------------=_1666939022-10178-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org= emphasis which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 58793@debbugs.gnu.org. --=20 58793: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58793 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1666939022-10178-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 58793-done) by debbugs.gnu.org; 28 Oct 2022 06:36:57 +0000 Received: from localhost ([127.0.0.1]:60066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooIzA-0002dg-Jj for submit@debbugs.gnu.org; Fri, 28 Oct 2022 02:36:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooIz8-0002dT-SX for 58793-done@debbugs.gnu.org; Fri, 28 Oct 2022 02:36:55 -0400 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 1ooIz3-0002m6-0D; Fri, 28 Oct 2022 02:36:49 -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=BQKpE7G4proUDTx6RSqYzFgT+0OD6Zzn+votvMhotgg=; b=IoQkC/lbqZqN DjlZR2jtjlVWxXY/pdraWzmLeb7UpyW+Pbaj8c4CGnm98sW2/p6goIdZnpQX6w8wu4OLNFrZnANy9 kHaO8gUjSE6589UwafM96lA406Kz0Hj7CceH7RrHPpv57oX3KAl10uqZExKxr/x9A6hHA6a+49Sj9 +WWc/OQHpvdm7i+/DZQ3oZud2L4rafNDOS4atMd77GTP0ufy1Oy8FEPsrmmE8NZyLWLpx50EV5yuq 4i0JMgym6CEda3kVv5OCTpeAj17BC1Z2iWHieDYKPgk7qmlzzSfSLdRdRRlJlFl7k8geMotiVGltj rYfadliMzj+2ltUWWGMhwQ==; 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 1ooIz1-0000KV-8A; Fri, 28 Oct 2022 02:36:48 -0400 Date: Fri, 28 Oct 2022 09:36:43 +0300 Message-Id: <83v8o4jvyc.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <877d0kmvzu.fsf@localhost> (message from Ihor Radchenko on Fri, 28 Oct 2022 04:07:33 +0000) Subject: Re: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis References: <87a65jow19.fsf@localhost> <838rl1mmu4.fsf@gnu.org> <877d0kmvzu.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58793-done Cc: 58793-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 58793@debbugs.gnu.org > Date: Fri, 28 Oct 2022 04:07:33 +0000 > > Eli Zaretskii writes: > > > Thanks, I hope I fixed this now. > > I confirm the fix. > Thanks! Thanks for testing, I'm therefore closing the bug. ------------=_1666939022-10178-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 07:58:54 +0000 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 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 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 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 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== 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) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 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 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 ------------=_1666939022-10178-1-- From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Oct 2022 06:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko Cc: 58793-done@debbugs.gnu.org Received: via spool by 58793-done@debbugs.gnu.org id=D58793.166693984911580 (code D ref 58793); Fri, 28 Oct 2022 06:51:02 +0000 Received: (at 58793-done) by debbugs.gnu.org; 28 Oct 2022 06:50:49 +0000 Received: from localhost ([127.0.0.1]:60097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooJCb-00030i-E6 for submit@debbugs.gnu.org; Fri, 28 Oct 2022 02:50:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooJCZ-00030T-Tr for 58793-done@debbugs.gnu.org; Fri, 28 Oct 2022 02:50:48 -0400 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 1ooJCU-0005SW-Gh; Fri, 28 Oct 2022 02:50:42 -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=nRUspDVsMd+99lNQcbJEBvpkf4dyfGUFu74XplsR6BY=; b=qz9U52B8AhHY fvlyxUnykG5dpa+H5XB8aOEvL1PTafhu0DU/k2nH1A7FRo8ggr6072sCOZ2x9Mf00f9XagDup2F9X GK86nnaDAlcLTr3eRlf987kuuRKEDohKOVIVeNKsplSLWgOFPmG2HggZWqqdEVWU1o9GX8YR8RVEu SJnRlP2h2wazwQjW/Fgcj6FggeihTrfhy61DE0ZjLhufZOWPi3NDajTXeQMI4Z8K9qPCYRnKbzp4P kimojq2G2JqZMguppSpift2T/xwrT/8G6hE937UBCdv09I06G6EU6f5C/IB2m2supNwjITXR7gvFa v7OLiai5t/rw2O7T6QQgug==; 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 1ooJCR-00018A-Hq; Fri, 28 Oct 2022 02:50:42 -0400 Date: Fri, 28 Oct 2022 09:50:34 +0300 Message-Id: <83tu3ojvb9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <877d0kmvzu.fsf@localhost> (message from Ihor Radchenko on Fri, 28 Oct 2022 04:07:33 +0000) References: <87a65jow19.fsf@localhost> <838rl1mmu4.fsf@gnu.org> <877d0kmvzu.fsf@localhost> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 58793@debbugs.gnu.org > Date: Fri, 28 Oct 2022 04:07:33 +0000 > > Eli Zaretskii writes: > > > Thanks, I hope I fixed this now. > > I confirm the fix. > Thanks! Thanks for testing, I'm therefore closing the bug. Btw, you wrote to the Org list that this issue has nothing to do with Org, but that is inaccurate. The bug was triggered by the fact that a screen line started with invisible text, and point was inside that invisible text. Emacs display code assumes in a lot of places that the position of point is somewhere between the positions of the first and the last glyph of a screen line which displays the cursor. Invisible text at the beginning or end of a screen line violates that assumption, if point is inside invisible text, because invisible text doesn't produce glyphs on the screen. Violating that assumption delivers a fatal blow to many redisplay optimizations that reuse previous display (instead of redrawing everything anew); one of such optimizations is for the situation when nothing's changed on display except that point moved. The display engine is still capable of dealing with such unusual situations, but it is likely to recenter the window in these cases, something that you find jarring. So by using invisible text too much, Org does risk triggering such situations more frequently. Since the result is not fatally wrong, just aesthetically annoying, I could say "wontfix", because fixing this is notoriously complicated, and risks introducing new exciting bugs (I hope I didn't introduce any this time). In this case I was lucky to be able to find a reasonable solution, but I cannot guarantee that for any similar issue in the future. After all, arguably Emacs just copes with the unusual situation by falling back on the only fail-safe redisplay mechanism we have. So it is not a bug, strictly speaking, just unusual and unexpected behavior. Please keep this in mind as you introduce features into Org and elsewhere which use invisible text. From unknown Mon Jun 23 09:41:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58793: 28.1.90; Emacs tries to recenter / rescroll when it hits hidden org emphasis Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2022 02:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 58793-done@debbugs.gnu.org Received: via spool by 58793-done@debbugs.gnu.org id=D58793.166701130210760 (code D ref 58793); Sat, 29 Oct 2022 02:42:02 +0000 Received: (at 58793-done) by debbugs.gnu.org; 29 Oct 2022 02:41:42 +0000 Received: from localhost ([127.0.0.1]:34670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobn4-0002nT-Ag for submit@debbugs.gnu.org; Fri, 28 Oct 2022 22:41:42 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobmz-0002nD-Bf for 58793-done@debbugs.gnu.org; Fri, 28 Oct 2022 22:41:40 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9C73C240026 for <58793-done@debbugs.gnu.org>; Sat, 29 Oct 2022 04:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667011291; bh=ZStFhIIowr6PsHEgeP8ifa61CMX4u592ExkihHIAqDQ=; h=From:To:Cc:Subject:Date:From; b=qR7r65kyJgAFlQWeN7NXuPj3dOH8o9a9CgFcIRVESgakayG1CWxu84sZgcmJMI4gM B65LsU6aXdFl0HkrnVRV+Iw4mBTQcW07g1ZXUOuFbDZz87RihAzv3txBSBl8ccA6ro d0yLzr2JdNt0+QXAG6YWVOhw+e+EeyX61DN4+9pa5KCJ0/63rgG0f6aAK8Rxkd26Wo 7KWzPQP/G82Y9LhbMWs3tfAxczMbXdncNVw3N9xeQWzp8yTQB7efEyVIrXtdWGXT16 lG6phqihROt1TY9xddeIzz9WN+ZsC4BtaCW+dOKyPCnPKMuSWFxYXlbCb5aImOKtIg 9Auwlh7JqPVXg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MzkFQ2VCnz6trB; Sat, 29 Oct 2022 04:41:29 +0200 (CEST) From: Ihor Radchenko In-Reply-To: <83tu3ojvb9.fsf@gnu.org> References: <87a65jow19.fsf@localhost> <838rl1mmu4.fsf@gnu.org> <877d0kmvzu.fsf@localhost> <83tu3ojvb9.fsf@gnu.org> Date: Sat, 29 Oct 2022 02:42:13 +0000 Message-ID: <87h6znl5a2.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Btw, you wrote to the Org list that this issue has nothing to do with > Org, but that is inaccurate. The bug was triggered by the fact that a > screen line started with invisible text, and point was inside that > invisible text. Emacs display code assumes in a lot of places that > the position of point is somewhere between the positions of the first > and the last glyph of a screen line which displays the cursor. > Invisible text at the beginning or end of a screen line violates that > assumption, if point is inside invisible text, because invisible text > doesn't produce glyphs on the screen. Violating that assumption > delivers a fatal blow to many redisplay optimizations that reuse > previous display (instead of redrawing everything anew); one of such > optimizations is for the situation when nothing's changed on display > except that point moved. The display engine is still capable of > dealing with such unusual situations, but it is likely to recenter the > window in these cases, something that you find jarring. Thanks for the explanation! AFAIU, there is no way to avoid this and also use invisible text somewhere not at bol/eol. The best we can do is minimizing the chance to trigger this redisplay behaviour. > So by using invisible text too much, Org does risk triggering such > situations more frequently. Since the result is not fatally wrong, > just aesthetically annoying, I could say "wontfix", because fixing > this is notoriously complicated, and risks introducing new exciting > bugs (I hope I didn't introduce any this time). In this case I was > lucky to be able to find a reasonable solution, but I cannot guarantee > that for any similar issue in the future. After all, arguably Emacs > just copes with the unusual situation by falling back on the only > fail-safe redisplay mechanism we have. So it is not a bug, strictly > speaking, just unusual and unexpected behavior. > Please keep this in mind as you introduce features into Org and > elsewhere which use invisible text. Noted. Though I feel that we really need to have A LOT of invisible text to hit the issue frequently. (here, I was just digging through old bug reports in Org mailing list; it is not something people often complain about) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at