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#64724: 30.0.50; Inconsistency between manual, comments in the code, and implementation of point adjustment Date: Wed, 19 Jul 2023 07:02:21 +0000 Message-ID: <87bkg81j0i.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="23830"; mail-complaints-to="usenet@ciao.gmane.io" To: 64724@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 19 09:03:47 2023 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 1qM1Du-0005ys-Rl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jul 2023 09:03:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM1Dh-00078R-CH; Wed, 19 Jul 2023 03:03:34 -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 1qM1DC-0006tr-IE for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:03:11 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qM1DC-0006SX-9y for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qM1DC-00045T-4h for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:03: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, 19 Jul 2023 07:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64724 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.168975014715667 (code B ref -1); Wed, 19 Jul 2023 07:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jul 2023 07:02:27 +0000 Original-Received: from localhost ([127.0.0.1]:54828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM1Cd-00044c-7E for submit@debbugs.gnu.org; Wed, 19 Jul 2023 03:02:27 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:57616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM1CY-00044K-Dq for submit@debbugs.gnu.org; Wed, 19 Jul 2023 03:02:25 -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 1qM1CS-0006Om-Hm for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:02:16 -0400 Original-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 ) id 1qM1CP-0006GP-Kv for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:02:16 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 404C1240103 for ; Wed, 19 Jul 2023 09:02:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689750131; bh=sgojNXFD/cvuVCQgBUnoaLZdgViBHYOoHTKwaPXFTg4=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=okbLoIX8aXITNTfKqmI2dEpWMbzMFMH3rFNQM8Gs4zPNF80NNVxCqshDEv3lQXeoL vW50e7zGINWSW70uLwvklHTeejgERShwgl2PnpNulnZ9kyXPx5I4eKBmuWOMM3256G QZtsBw9AOvCVjLlSJKvdrMIunrhhDyCIkbDzte2ODpiIyvm/8I6+vP/cpmE8mMm2IQ zxlWqMNPmtB72nfNDT6GYCRgWP/pLcNAdRkTFP8D8b1PZg4pCiBp90nmAjOpUX6JTS TpPZXFmhWOSTs40+wzj0HqNe8zCkaLoyg2jXoAdK86e9uYab4gLMIR92KwjcZoisqj piN+LiHq9fZaw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R5RZp4Gs7z9rxG for ; Wed, 19 Jul 2023 09:02:10 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265514 Archived-At: Hi, This is a followup of https://orgmode.org/list/87ilag1pth.fsf@localhost We recently ran into some subtleties of point adjustment near invisible regions with sticky 'invisible property. The actual code in `set_point_both' makes sure to move point across invisible sticky region if point happens to end up right before front sticky invisible or right after rear sticky invisible region. However, 22.6 Adjusting Point After Commands does not mention this scenario. Further, `set_point_both' contains the following comments: /* If the preceding character is both intangible and invisible, and the invisible property is `rear-sticky', perturb it so that the search starts one character earlier -- this ensures that point can never move to the end of an invisible/ intangible/rear-sticky region. */ charpos = adjust_for_invis_intang (charpos, -1, -1, 1); <...> /* If the following character is both intangible and invisible, and the invisible property is `front-sticky', perturb it so that the search starts one character later -- this ensures that point can never move to the beginning of an invisible/intangible/front-sticky region. */ charpos = adjust_for_invis_intang (charpos, 0, 1, 1); However, 'intanglible text property is, in fact, not necessary to trigger the adjustment. May you (1) document this behaviour in the manual; (2) clarify what's up with intanglible. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-18 built on localhost Repository revision: aba3d13ea8d712bca1b3f23ac7db7e38c2165b3c Repository branch: feature/named-lambdas Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 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