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: Fri, 21 Jul 2023 10:58:11 -0400 Message-ID: References: <87bkg81j0i.fsf@localhost> <83fs5j4zti.fsf@gnu.org> <878rbarjuv.fsf@localhost> <83pm4m3mkh.fsf@gnu.org> <87tttx7leo.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36702"; 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 16:59:13 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 1qMrb6-0009Im-PY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jul 2023 16:59:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMraz-00037S-ED; Fri, 21 Jul 2023 10:59:05 -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 1qMraw-00037K-AO for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:59: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 1qMraw-0007cX-2V for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMrav-0004LN-KX for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:59: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 14:59: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.168995150416653 (code B ref 64724); Fri, 21 Jul 2023 14:59:01 +0000 Original-Received: (at 64724) by debbugs.gnu.org; 21 Jul 2023 14:58:24 +0000 Original-Received: from localhost ([127.0.0.1]:34478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMraJ-0004KX-PZ for submit@debbugs.gnu.org; Fri, 21 Jul 2023 10:58:24 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMraE-0004KI-Ol for 64724@debbugs.gnu.org; Fri, 21 Jul 2023 10:58:22 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 73EF910006C; Fri, 21 Jul 2023 10:58:13 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4EB0D1000C3; Fri, 21 Jul 2023 10:58:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689951492; bh=Iphep5yjGGUhKNdGFPMQpTfCkcU85DLJkHA0LGp2iMo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aPG3vw2YapczBQl0JFR4xDYlTXNXig8QO8hmwyQi68ZBcwCwD1YLB3Q14UGFEf0U/ LiTIJ03Ium0Grj30Q4hJYWpV7JTtoktI3Tn4PIBlFadP8enHSfqsqtpst0BqL0rIhp 5g5vheWFG7Q953Ob0KyaMnMOpXwcBwowFTnVEu+Is+VyZv2EeKiate810Wl+5KYP7C KFsXc3b7pweh08goe5nuNba3CFFSFcX6Zfqtmvl1lDPthu6JXPZVBsoa/PlgrnD/PZ NLsVxLGE68MJN/QIGsiCvbK7UwGql76GA88BJpUeHHSlG6QFNHyHcpAtq5bkPGsY45 qIE+pa9Bth6VQ== Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0DD7C12043B; Fri, 21 Jul 2023 10:58:12 -0400 (EDT) In-Reply-To: <87tttx7leo.fsf@localhost> (Ihor Radchenko's message of "Fri, 21 Jul 2023 07:50:55 +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:265723 Archived-At: Ihor Radchenko [2023-07-21 07:50:55] wrote: > Eli Zaretskii writes: > >>> So, there is no problem with this section of the manual. The problem is >>> that manual does not describe the behavior with invisible text >>> boundaries I was trying to figure out. >> >> Which aspects of the behavior you describe are not mentioned in the >> manual. It does refer to invisible text. > > It talks about "in the middle of a sequence .. that ... is invisible" > > Emacs cannot display the cursor when point is in the middle of a > sequence of text that has the =E2=80=98display=E2=80=99 or =E2=80=98c= omposition=E2=80=99 property, or is > invisible. Therefore, after a command finishes and returns to the > command loop, if point is within such a sequence, the command loop > normally moves point to the edge of the sequence, making this sequence > effectively intangible. > > The situation I encountered is when point ends up not in the middle, but > already on the edge. So, Emacs moving point to _other_ edge was > surprising. How 'bout the rephrasing below? Stefan diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 037f42124cc..ca009d97b39 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -1253,12 +1253,13 @@ Adjusting Point @cindex @code{display} property, and point display @cindex @code{composition} property, and point display =20 - Emacs cannot display the cursor when point is in the middle of a -sequence of text that has the @code{display} or @code{composition} -property, or is invisible. Therefore, after a command finishes and -returns to the command loop, if point is within such a sequence, the -command loop normally moves point to the edge of the sequence, making this -sequence effectively intangible. + When point is in the middle of a sequence of text that has the +@code{display} or @code{composition} property, or is invisible, Emacs +there can be several buffer positions that result in the cursor being +displayed at same place. Therefore, after a command finishes and +returns to the command loop, if point is in such a sequence, the +command loop normally moves point to one of the two edges of the +sequence, making this sequence effectively intangible. =20 A command can inhibit this feature by setting the variable @code{disable-point-adjustment}: