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:47:10 -0400 Message-ID: References: <87bkg81j0i.fsf@localhost> <83fs5j4zti.fsf@gnu.org> <875y6erjm9.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="40070"; 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:48:15 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 1qMgBj-000AEe-3d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jul 2023 04:48:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMgBZ-0004a3-Sn; Thu, 20 Jul 2023 22:48:06 -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 1qMgBW-0004Zh-NM for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:48:03 -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 1qMgBW-0002LD-DQ for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMgBW-00057d-A7 for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 22:48:02 -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:48:02 +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.168990764319486 (code B ref 64724); Fri, 21 Jul 2023 02:48:02 +0000 Original-Received: (at 64724) by debbugs.gnu.org; 21 Jul 2023 02:47:23 +0000 Original-Received: from localhost ([127.0.0.1]:60286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMgAt-00054D-Er for submit@debbugs.gnu.org; Thu, 20 Jul 2023 22:47:23 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMgAr-00053z-IU for 64724@debbugs.gnu.org; Thu, 20 Jul 2023 22:47:22 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 48489801B3; Thu, 20 Jul 2023 22:47:16 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DD90880058; Thu, 20 Jul 2023 22:47:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689907630; bh=54A4FciDuMxTkrd21O8OvXrvTsr2rApTGM841ErYlLE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KrkPhYWW4XC3hlt03ajt6HiHm5hLWvFjc3vUV5UlkqWBz0zHvde9cGhLCPeiU8k0I pyjJWOpqqmYMN6P4Yr7wHH9JrXAiDCAeX8W/f8gPZSmtPNoBdPEACGLQxg6MRkY87M sdjE62PouP31RJrmBEdDFRrRJf/5cf4j8mCTwv7LI8OQvNuruKqLu3ahnQpZ9271Yh ItSfuoESB03sNzz/ZVcLhagMhQjo0xzG7/Mu98fzu/7utXC4cHLF0Q+5OX+hPvyeUi 1xC79wjYtk/a/8RPKaftDZAUFenC4/5HF3NgbRmvyvpeaHUfLh2T4vEdwyQW28UXXv OLxxorIwzZRmw== Original-Received: from pastel (unknown [104.247.231.138]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B26C612039E; Thu, 20 Jul 2023 22:47:10 -0400 (EDT) In-Reply-To: <875y6erjm9.fsf@localhost> (Ihor Radchenko's message of "Thu, 20 Jul 2023 09:57:02 +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:265648 Archived-At: Ihor Radchenko [2023-07-20 09:57:02] wrote: > Stefan Monnier writes: >> Indeed, the `set_point_both` adjustment is an obsolete (mis-)feature >> that has been deprecated since Emacs-25, when >> `inhibit-point-motion-hooks`s default has been changed to t (and >> replaced with `cursor-sensor-mode` and >> `cursor-intangible-mode`). > > Will it ever be removed though? That's the plan, yes. In Emacs-29, I removed all the places where we defensively let-bound it to non-nil, in preparation for the actual removal. > It appears to affect outline mode a lot. > > We just recently received a somewhat related report with yet another > point adjustment subtlety: > > * Short heading... > * Very very very very long heading... > > C-p will move after hidden text above: > > * Short heading... > * Very very very very long heading... I suspect this has nothing to do with `inhibit-point-motion-hooks` nor `set-point-both` but with the post-command point-adjustment, instead. > And I am pretty sure that there are many edge cases like this, which > rely on the implementation details with point adjustment. point-adjustment cannot get all cases right, because (like in the above example), the "right" thing to do depends on the specific semantics of the last command (e.g. was the last command supposed to move by one logical line or one screen line?). IIRC, `C-p` has ad-hoc code to try and handle cases like the above, but apparently it doesn't handle this specific case. Stefan