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#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer Date: Wed, 21 Feb 2024 09:30:06 -0500 Message-ID: References: <87msrxo4ji.fsf@strawberrytea.xyz> <861q98r64n.fsf@gnu.org> <871q97b09m.fsf@strawberrytea.xyz> <86zfvum21y.fsf@gnu.org> 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="14585"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69259@debbugs.gnu.org, Jonas Bernoulli , StrawberryTea To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 21 16:32:53 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 1rcoab-0003Ww-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Feb 2024 16:32:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcoTx-0008J1-VT; Wed, 21 Feb 2024 10:26:02 -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 1rcoMB-0003Rf-ND for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2024 10:18:03 -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 1rcncO-00029V-GC for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2024 09:30:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcnck-0001ca-K4 for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2024 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2024 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69259 X-GNU-PR-Package: emacs Original-Received: via spool by 69259-submit@debbugs.gnu.org id=B69259.17085258436197 (code B ref 69259); Wed, 21 Feb 2024 14:31:02 +0000 Original-Received: (at 69259) by debbugs.gnu.org; 21 Feb 2024 14:30:43 +0000 Original-Received: from localhost ([127.0.0.1]:48056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcncR-0001br-Aw for submit@debbugs.gnu.org; Wed, 21 Feb 2024 09:30:43 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcncK-0001bZ-OQ for 69259@debbugs.gnu.org; Wed, 21 Feb 2024 09:30:41 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D82CC80974; Wed, 21 Feb 2024 09:30:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708525807; bh=jQ6POYuWZBiL2OsGWq+3Bmy9BMafn2MZE/e6PhdThc8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BoSIkm9Id9q+J1PjlBDOD6PeSOkUMt6p21DvmQZ/B1n/NP7n3/ydzutETaoN/tKKc kqK+eO+TjHlTSKgHfSVcjqhQHL30tZ//s2wlB2/vaZSEbyWa0EUncFdr77ey+ipZU8 KhJ7LFwwS7nyfjEkmGzrFRXneBiN06bxqQBhuOAhlxV0koFn+KQ3zVhrrrRrpjfa2B ZoOiZIFtY1dBT0p4IXije86SYXjv2/RmAe/TcBwEIFCBq+qrSqBrCNQvzpS+91OorS wyswPCu6HeNLscDXIOJcMUCyL/6bRo/aDSy35b11PEhnJMPZiUIj23h+KHRiP/8AA3 Gyc0IsLuDKidA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C24DB80813; Wed, 21 Feb 2024 09:30:07 -0500 (EST) Original-Received: from milanesa (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8E89F120021; Wed, 21 Feb 2024 09:30:07 -0500 (EST) In-Reply-To: <86zfvum21y.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Feb 2024 14:31:21 +0200") 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:280383 Archived-At: Eli wrote: > I think cursor-sensor is written under the assumption that the > selected window's buffer is also the current buffer, and if so, > magit-post-command-hook should abide by that protocol. Stefan, am I > right? Not `cursor-sensor.el` in its entirety, but `cursor-sensor-move-to-tangible` presumes that it is called with the current-buffer already set to (window-buffer window). StrawberryTea wrote: > Why exactly are the window-buffer and the current-buffer different? Good question. AFAIK the code that runs `post-command-hook` normally tries to avoid such situations. > I think this has to do with persp-mode. My guess is that when it sets > the new window configuration, the current-buffer is not updated to the > new window=E2=80=99s buffer immediately. Could be a "bad citizen" on `post-command-hook`, indeed, which messes up subsequent functions on the hook. Maybe the code that runs `post-command-hook` should be more careful to (re)set current-buffer after each function, but it seems easier to fix the rare functions which mess it up. Stefan