From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jaft Newsgroups: gmane.emacs.bugs Subject: bug#68900: 29.1; Inconsistent Cursor Behavior when Executed as Lisp Code vs. Run by Key Binding Date: Sat, 3 Feb 2024 22:23:25 +0000 (UTC) Message-ID: References: <86jznm3sy2.fsf@gnu.org> Reply-To: Jaft Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4850342_1829813598.1706999005121" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34316"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "68900@debbugs.gnu.org" <68900@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 03 23:24:05 2024 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 1rWOQf-0008eZ-5G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Feb 2024 23:24:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWOQS-0000MN-E7; Sat, 03 Feb 2024 17:23:52 -0500 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 1rWOQR-0000M7-4F for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 17:23:51 -0500 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 1rWOQQ-0000gn-Sh for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 17:23:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWOQc-0008W3-9f for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 17:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jaft Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Feb 2024 22:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68900 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 68900-submit@debbugs.gnu.org id=B68900.170699903132715 (code B ref 68900); Sat, 03 Feb 2024 22:24:02 +0000 Original-Received: (at 68900) by debbugs.gnu.org; 3 Feb 2024 22:23:51 +0000 Original-Received: from localhost ([127.0.0.1]:47202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWOQR-0008Va-5d for submit@debbugs.gnu.org; Sat, 03 Feb 2024 17:23:51 -0500 Original-Received: from mail-dm6nam11olkn2068.outbound.protection.outlook.com ([40.92.19.68]:11233 helo=NAM11-DM6-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWOQO-0008VM-1K for 68900@debbugs.gnu.org; Sat, 03 Feb 2024 17:23:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T3q87z8R9Hf7DKT8pXQN9uTaPOjbhVb+APIYNuFq5LbEtWfGCekEPDKIpNUqsWMNrFu6J/YMAELoTKs6yA9g8VvtG4J/Ha26B7ngAs2dCUdXOEoXmC3gMUZ2pTLFpjZkeirYnjoOdLQf4dDQXNN3QFJJGhDpMA2Jr3pcDqEmnnzBD8fqv0fxe5CzLnG2+AUsoAxw8LWs+CE3d80ni+U8JZOP+9rWzh3GH/cVRZ2pGHsGinCdUJPYx+UuHiDNQLvIAgvIV5OYDkiIYAR1nGYQEUFHyaJBsiqgT8fJ/Alzh0QhYORznpDny63A0lCHSibPOeKkjrx/X66fv85ECzoAKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W6+Co1Bs6M2Y0qvc267AYPKGoSoPz9Tc1gloszhPem4=; b=B1RI1H35ER3SSu2O2VTFwX5WxVMAppyDEzLLU7DdXipDag/DMHL172lPl+rKrGDL3q6eLSVjwamNteZshw5WDmEBNnV93CJYxBZMc7hCD1N1R1Qc8LVu7rIKVidlN+2nT8/LqxKS0GA62DrFdpvZEoQWB3v8rDGHNVuzb0TbEKAxZijHtzYkIQUQ4Tv2n+k/evHtPka9pg/jo+ctq1nvohymea5nwPzK7SUCURGfBl+IaW+8GOHGJWSdnbxYN/zj7LnCyHvkOGwyM23qn5hXrGdxTPWmCLuyEiCkYgfSM5J8u61dLVEfen9ZVvRlmjwM1CeszhpOKW/iUZUvfhyBUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W6+Co1Bs6M2Y0qvc267AYPKGoSoPz9Tc1gloszhPem4=; b=u6AjwbjsheGvbNqB8YK12uT5kHgHSnbfBRHT8CNohQ/1Ja2CtkmlbkSRVerbG58tebiqqKgyM3EQDlCo+io2BwI61WKqPiMrTvBJkF/FNzzOaeCx+EWVrV6guDUUCE213xf3/XCc6KbVUzFdB+Ff9ar2DsGHi3XW4FN9MGqFMrIOVzmHbBP8KyBjrb0aXk5U3w0WT70c8tc+q2D/sJnbmf0PwJUlIGcgXpllZrT/ECv1OvgjmQo2GfD6v/gz2hTM9jURvGhr+TshbfYsx+pho97jrXO7kIHAEnT28r0eJhfMbtQOPkTMruFTSUb8ntwQUCzpUItUcB0ynLWILjxEXw== Original-Received: from PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:172::9) by PH0PR84MB1671.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:173::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.31; Sat, 3 Feb 2024 22:23:29 +0000 Original-Received: from PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM ([fe80::6a5e:40a:b2fd:51db]) by PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM ([fe80::6a5e:40a:b2fd:51db%7]) with mapi id 15.20.7249.027; Sat, 3 Feb 2024 22:23:29 +0000 X-YMail-OSG: udN.JicVM1mbq5abAu3P0ZfhvTk3XHEjopYWHhxdGva1l3NWW0m8Ysd2Sk1Vu5A CedblrQiaOScU8giCD4exawo2UfVre5_btSrOIZ6NEWox7pJbO_6QcippewkRgDBtAlV2L78cb6p dYCp4GeJVBtoVpqz110u_c9xkxlddFYUrv0GjakkqxsItQ5wON6Uo3TWN2RW_te0B6aWV2jmQh0g wKM3H19lrvblkLF6cUGTy6l92CGOMHChLPJR5bgh_7Ky.1qKtKNFZxFvHSt1TiAYblRV4QxNmvCW T3hgbqeydNVBIepb.O611B7X73g1YPxCh0Xc8cMUkwtFfHrr0E_8.uRs6qteHq4w4vBRVavhvL_l BRZk2js_O7KEJ_QHjFR9O9kVOHVjAFr_5GA.PckbSiosgv3PEKnkww4zR0FjRkPlwVxQMJKHJo_R fPEyqLWi.7.UHv5qiBDwGFkVDxMAwoRKAzsCKFR8Tuww8YGDpagRdugT5vs43CLWGIme8xV5YJz4 koIunRxvFOaNsWQ3QOpf.du_t5_wZyRRS2HonUsSzB7N8vPsX7vV4ZDdEaYFznkghbnMV_WR98Z8 7Wx86JMTInvk7grS9jzibpzNWu2w6cll7wEG6_o7.dgwm_6DrPEhRutZXl_w9jjyq1NULmZL_zDZ aEA00UByqiR.EK82njSUwPjTrtuTsTD41t4QoOZ5kMfsBROlKDXCM_kpL1ryOqT5Y9RJ.051Yip_ CBjuqlvfYPcPF5cYb2HFlknr55P5EKsDevfuPGX3FCucWNZDthChBe9SGuPDPB8xEqdfvJ4cS1Vg oS2kctIZaLj6T0owJ0vXk44vVkEjpvyrJ7mDmS_.HG X-Sonic-MF: X-Sonic-ID: 32d3b6e5-341a-4b40-b4f2-b0554a12473a In-Reply-To: <86jznm3sy2.fsf@gnu.org> X-Mailer: WebService/1.1.22046 YMailNorrin X-TMN: [txuELEs/TpdrM9toTJS7ftdqGdJojWfD] X-ClientProxiedBy: CH5PR04CA0004.namprd04.prod.outlook.com (2603:10b6:610:1f4::10) To PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:172::9) X-Microsoft-Original-Message-ID: <252216262.4850343.1706999005122@mail.yahoo.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR84MB1360:EE_|PH0PR84MB1671:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f6b3c7f-536f-46ea-f082-08dc2506bfae X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QZ81mQf0DY+Pwnx618zq4rtqvMBMRC+aEWk3ECg2NUooiGcsLUD88Vk39HxNO5SrdBQzZaPLnDlQ/UEVvY6Foi9MRPJ4v1O2G3wAY3WhKwlryXi/5HSDZXFGr7czIKcdHEhuVzsyx5SydLobu2i8DtgT3ds/KPTyVmfcXeL6Mh/1FoX9XVdIvbIMUrsLVGmzTPkIM9wRBQBUVbQ0Hcb7TYXbvz5JxWg9KBKIhYGgjaC6UYUVznpUVl4iFRqeYfmPjXllphCjz9XIlUEGYxc7f5M5clPKTF2Dge5CXnOJfiKtu/C1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TuIBUsUokjDD/i5ihtpYKr1diVPgeV8AB2gNynJG6zjLLBdptHj1x0cIh8LF6es 3zmWRK/AJaGMyR68yifpY5rtWT/Sxdb+WDqvq0boSf5wgs43j2dbKSx3Kc4GUUDYc54nf9RAXw0QJRmb46aZJtEmd6Ed67ksGl X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f6b3c7f-536f-46ea-f082-08dc2506bfae X-MS-Exchange-CrossTenant-AuthSource: PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2024 22:23:29.7695 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR84MB1671 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:279385 Archived-At: ------=_Part_4850342_1829813598.1706999005121 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ahhh; you know, I was looking at=C2=A0Invisible Text (GNU Emacs Lisp Refer= ence Manual)=C2=A0but missed the end where it talks about Adjusting Point. = While I'd been wondering if "relocat[ing] point to the other side of the te= xt" might be affecting this, I don't think I'd grasped that it'd be after t= he command runs, either. Thanks so much for clarifying it (and pointing out where to look, in the do= cumentation). Do I need to close this, in any way, or was you tagging it as= "notabug" sufficient? |=20 |=20 | |=20 Invisible Text (GNU Emacs Lisp Reference Manual) Invisible Text (GNU Emacs Lisp Reference Manual) | | | On Saturday, February 3, 2024 at 01:31:09 AM CST, Eli Zaretskii wrote: =20 =20 tags 68900 notabug thanks > Date: Fri, 02 Feb 2024 16:47:57 -0600 > From: Jaft >=20 > This is where the inconsistent behavior is: if we M-: (forward-line -1) > or M-: (previous-line) and, then, M-: (point), we'll get what (I would > think) we'd expect: point 72, the point of the beginning of the second > line. >=20 > BUT, if we do the above via key-binding =E2=80=93 i.e. if, from point 145= , we > press C-p to get to the line above =E2=80=93 and, then, run M-: (point), = we > get back the number 1. This is the point-adjustment feature in action: it moves point out of the invisible text in the direction of the last movement.=C2=A0 If you want to disable it, set global-disable-point-adjustment to a non-nil value; if you want to disable that temporarily in a Lisp program, set disable-point-adjustment non-nil before invoking some cursor-movement command.=C2=A0 In your recipe, if you set global-disable-point-adjustment non-nil, the behavior of previous-line, whether via M-: or C-p, will be consistent: it will end at position 72. This is not a bug, but the intended behavior.=C2=A0 Read all about it in the "Adjusting Point" section of the ELisp manual.=C2=A0 Admittedly, this feature can sometimes cause surprising behavior. =20 ------=_Part_4850342_1829813598.1706999005121 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ahhh; you know, I was lookin= g at Invisible Text (GNU Emacs Lisp Reference Manual)&nbs= p;but missed the end where it talks about Adjusting Point. While I'd been w= ondering if "relocat[ing] point to the other side of the text&qu= ot; might be affecting this, I don't think I'd grasped that it'd be after t= he command runs, either.

Thanks= so much for clarifying it (and pointing out where to look, in the document= ation). Do I need to close this, in any way, or was you tagging it as "= ;notabug" sufficient?




=20
=20
On Saturday, February 3, 2024 at 01:31:09 AM CST, Eli Z= aretskii <eliz@gnu.org> wrote:


tags 68900 notabug
= thanks
> Date: Fri, 02 Feb 2024 16:47:57 -0600
> From: Jaft <jaft.r@outlook.com>
>
> This is where the inconsistent behav= ior is: if we M-: (forward-line -1)
> or M-: (previous= -line) and, then, M-: (point), we'll get what (I would
&g= t; think) we'd expect: point 72, the point of the beginning of the second> line.
>
> = BUT, if we do the above via key-binding =E2=80=93 i.e. if, from point 145, = we
> press C-p to get to the line above =E2=80=93 and,= then, run M-: (point), we
> get back the number 1.

This is the point-adjustment featu= re in action: it moves point out of
the invisible text in= the direction of the last movement.  If you want
to= disable it, set global-disable-point-adjustment to a non-nil value;
if you want to disable that temporarily in a Lisp program, set<= br clear=3D"none">disable-point-adjustment non-nil before invoking some cur= sor-movement
command.  In your recipe, if you set gl= obal-disable-point-adjustment
non-nil, the behavior of pr= evious-line, whether via M-: or C-p, will
be consistent: = it will end at position 72.

This is no= t a bug, but the intended behavior.  Read all about it in
the "Adjusting Point" section of the ELisp manual.  Ad= mittedly, this
feature can sometimes cause surprising beh= avior.

= ------=_Part_4850342_1829813598.1706999005121--