From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64724: 30.0.50; Inconsistency between manual, comments in the code, and implementation of point adjustment Date: Thu, 20 Jul 2023 22:39:52 -0400 Message-ID: References: <87bkg81j0i.fsf@localhost> <83fs5j4zti.fsf@gnu.org> <878rbarjuv.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7427"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 64724@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 21 04:41:17 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 1qMg4y-0001mQ-Uv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jul 2023 04:41:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMg4l-00030m-LZ; Thu, 20 Jul 2023 22:41:03 -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 1qMg4k-00030P-0O for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:41:02 -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 1qMg4j-0000Kj-Ou for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMg4j-0004sp-Kq for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 02:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64724 X-GNU-PR-Package: emacs Original-Received: via spool by 64724-submit@debbugs.gnu.org id=B64724.168990720218678 (code B ref 64724); Fri, 21 Jul 2023 02:41:01 +0000 Original-Received: (at 64724) by debbugs.gnu.org; 21 Jul 2023 02:40:02 +0000 Original-Received: from localhost ([127.0.0.1]:60266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMg3m-0004r2-3X for submit@debbugs.gnu.org; Thu, 20 Jul 2023 22:40:02 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMg3j-0004qd-Ly for 64724@debbugs.gnu.org; Thu, 20 Jul 2023 22:40:00 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2DE091000C4; Thu, 20 Jul 2023 22:39:54 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 25E4910001C; Thu, 20 Jul 2023 22:39:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689907193; bh=EuRA8CGAjwxYlUy2z4c2UNQezD4JPWzZ0LGNELts/1w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ksBIJWvOAMuZQuK5uyVqjt/rUUEoiQGjTCLW1fcqs/sCcxEn9N36EkIsk4NgKKErO AXN2gieU/1JAtjrTL/IgLx+T/m9Pu+rRXoDkq7qGesKA11IMOS5jFKj6K5WjqMsSIn qGHtdr3a3MfG2CYGHItgH4Bkk9fnHUBq38uPCl2nGnDmXk9dU0ETsxHUSq42VDIXl0 FCXUHxYHXTGO9w/Xpaz6BTMdpyrLEXn2VaeElCttEXRGnaeyBhA6IBoNQf3s9US487 8UZwe1B0t+e8dWWepSuaeXIZnRpFTn4ehTmNWw1AqJET+WGtV0OSKad5/x8RLPZYap jePE/HK6AonOg== Original-Received: from pastel (unknown [104.247.231.138]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E61C512005A; Thu, 20 Jul 2023 22:39:52 -0400 (EDT) In-Reply-To: <878rbarjuv.fsf@localhost> (Ihor Radchenko's message of "Thu, 20 Jul 2023 09:51:52 +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: , 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:265644 Archived-At: > Let me describe the full sequence how I arrived to that manual page: > > 1. We had a situation where `backward-word' moved further than expected: > > =word > M-b > =word > > This was despite "=" not considered to be a word constituent in > syntax table. > > 2. I noticed that this behavior is related to point movement and > invisible text and searched manual index for "point", "invisible". > The only match was "22.6 Adjusting Point After Commands" > I assumed that it is describing all the cases related to interaction > between point and invisible text. > > 3. I've read that section of the manual and did not find anything about > point ending up not inside, but at the boundary of invisible text. The boundary is usually considered as "inside" for this specific case. More specifically, in your above example, at the end of the command point ends up being *displayed* at a position that could correspond to various buffer positions, and the 22.6 point-adjustment will thus try and choose which of those buffer positions to use (based on the stickiness, as well as the direction of movement). > 4. I reached to sources and tried to track down the cause, eventually > arriving to `set_point_both'. Hmm... I'd be very surprised if `set_point_both` is the cause: `inhibit-point-motion-hooks` should be non-nil, so that code will simply be skipped. If `inhibit-point-motion-hooks` is nil, please send me the recipe so I can try and change the caller that set this var. Stefan