X-Loop: help-debbugs@HIDDEN
Subject: bug#79787: 31.0.50; Unexpected point adjustment when passing over text that has 'invisible property and an overlay with 'display on top
Resent-From: Ihor Radchenko <yantar92@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 08 Nov 2025 10:44:01 +0000
Resent-Message-ID: <handler.79787.B.176259863629644 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 79787
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 79787 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.176259863629644
(code B ref -1); Sat, 08 Nov 2025 10:44:01 +0000
Received: (at submit) by debbugs.gnu.org; 8 Nov 2025 10:43:56 +0000
Received: from localhost ([127.0.0.1]:50934 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vHgQF-0007i4-L1
for submit <at> debbugs.gnu.org; Sat, 08 Nov 2025 05:43:56 -0500
Received: from lists.gnu.org ([2001:470:142::17]:50642)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
id 1vHgQC-0007hs-D1
for submit <at> debbugs.gnu.org; Sat, 08 Nov 2025 05:43:53 -0500
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 <yantar92@HIDDEN>)
id 1vHgQ3-0006U3-2F
for bug-gnu-emacs@HIDDEN; Sat, 08 Nov 2025 05:43:43 -0500
Received: from mout02.posteo.de ([185.67.36.66])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <yantar92@HIDDEN>)
id 1vHgQ0-0002ET-KB
for bug-gnu-emacs@HIDDEN; Sat, 08 Nov 2025 05:43:42 -0500
Received: from submission (posteo.de [185.67.36.169])
by mout02.posteo.de (Postfix) with ESMTPS id 1F63D240101
for <bug-gnu-emacs@HIDDEN>; Sat, 8 Nov 2025 11:43:37 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
t=1762598618; bh=jJXwqWMCv6r5B4uNtbLrMx+fKTQ7yNKlRNASvkP3xJQ=;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
b=U88YA+eI+HvxAqSprNtx89MEc2xLTNVj0D4OPq5o/FZukiw1rN1yo7KT+QD8epncc
wa5K4EVuiRU/unK/Pz2xbZ51SsDzEWfczm1gm8fRzAbclojXPgJljXjl4OoJQ2NLqC
ImtLROEdmtXBKfr9WKRmvaj6Dmuc5RRexx/hjAEMZ3hNbII8kh9/Y8nddLHzdyKEdV
u13Ud3woh1v+hb7HPMndbWZUsSJ5nWJqmYgMcnc3PbPC9t0lQK9OlYTZ+dMp60vryI
TXjOQbga+01u8Id79WtqodhUFWNRXFBgU0dTlsrz8BOLhz+fHs9N/qLIYgnP46eAen
aeZ4q34tW2s7A==
Received: from customer (localhost [127.0.0.1])
by submission (posteo.de) with ESMTPSA id 4d3XbF4Dnmz9rxG
for <bug-gnu-emacs@HIDDEN>; Sat, 8 Nov 2025 11:43:37 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
Date: Sat, 08 Nov 2025 10:43:37 +0000
Message-ID: <87wm40954s.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@HIDDEN;
helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
Hello,
Consider the following reproducer
(let (ovs)
(with-current-buffer (generate-new-buffer "*temp*")
(display-buffer-below-selected (current-buffer) nil)
(insert "\n\n12345789")
(goto-char (point-min))
(with-silent-modifications
(search-forward "1")
(backward-char)
(put-text-property (+ (point) 2) (+ (point) 4) 'invisible t)
(read-char "Press any key (part of 123456789 hidden)")
(dolist (offset '(0 1 2 3 4 5 6 7 8))
(push (make-overlay (+ offset (point)) (+ offset (point) 1)) ovs)
(overlay-put (car ovs) 'display (copy-sequence "!")))
(message "NOW, move cursor across 123456789 string, observe point jumping across some !"))))
When we put an overlay with 'display property on top of 'invisible text,
the overlay takes precedence and the text from 'display is visible on
place of the underlying text.
However, point adjustment does not seem to account for this scenario -
the point gets adjusted to bypass 'invisible text anyway, which is
unexpected as the point jumps over the visible overlay.
This issue has been originally reported in https://orgmode.org/list/87ms50z1bp.fsf@localhost
In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
1.18.4) of 2025-04-28 built on localhost
Repository revision: 509cbe1c35b3dd005a53ac041f9c87ee53b8e115
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101018
System Description: Gentoo Linux
--
Ihor Radchenko // yantar92,
Org mode maintainer,
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>
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ihor Radchenko <yantar92@HIDDEN> Subject: bug#79787: Acknowledgement (31.0.50; Unexpected point adjustment when passing over text that has 'invisible property and an overlay with 'display on top) Message-ID: <handler.79787.B.176259863629644.ack <at> debbugs.gnu.org> References: <87wm40954s.fsf@localhost> X-Gnu-PR-Message: ack 79787 X-Gnu-PR-Package: emacs Reply-To: 79787 <at> debbugs.gnu.org Date: Sat, 08 Nov 2025 10:44:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 79787 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 79787: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79787 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.