From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: StrawberryTea 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: Tue, 20 Feb 2024 09:42:36 -0600 Message-ID: <871q97b09m.fsf@strawberrytea.xyz> References: <87msrxo4ji.fsf@strawberrytea.xyz> <861q98r64n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27171"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.8; emacs 30.0.50 Cc: 69259@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 16:54:15 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 1rcSRe-0006bP-H5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 16:54:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcSRJ-0006sN-3F; Tue, 20 Feb 2024 10:53:49 -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 1rcSRC-0006s2-HX for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 10:53:44 -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 1rcSRB-0003F1-9N for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 10:53:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcSRW-000500-EZ for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 10:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: StrawberryTea Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 15:54: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.170844442319191 (code B ref 69259); Tue, 20 Feb 2024 15:54:02 +0000 Original-Received: (at 69259) by debbugs.gnu.org; 20 Feb 2024 15:53:43 +0000 Original-Received: from localhost ([127.0.0.1]:46382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcSRD-0004zT-6V for submit@debbugs.gnu.org; Tue, 20 Feb 2024 10:53:43 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:46483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcSRA-0004zF-7F for 69259@debbugs.gnu.org; Tue, 20 Feb 2024 10:53:41 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 5D60D3200312; Tue, 20 Feb 2024 10:53:12 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 20 Feb 2024 10:53:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1708444391; x=1708530791; bh=GVIjChS/Euc/SSQphqQI3eA/kPklwCvaWujwqIGlYK0=; b= n3E70wZ16tDxD05hfezhgX60lG950otsMnUHce/XoW/wdQ6fIWVDE/RvAh1TZYkl 7RtloUKfDfQQfoaQNYzAMPQTK58u0rqzvSh89xhGnLmw32QzCTlWIrl1nKo1+u5f 6xPEOSO2+u2p3VBYCMNNE4XQanaMR0wFytu7WVWlmFfGBk8WWONkUsDXu9V9w9R2 M0v44GS1MmgiN26BdCuB2HM7+4mHxUmA1440AbhK2JryMR5P5J0We1eG9ub0auSF bn2vyNZX120TK+5sj2KsfmQm1YiPk9/f/Z1S7P288cD3hBkKqtU2j5OSqyST7KrH 0eL4GrmJpEUjvkgRATz0Xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708444391; x=1708530791; bh=GVIjChS/Euc/SSQphqQI3eA/kPkl wCvaWujwqIGlYK0=; b=grPymOUqRXVUOTGPLDAbXCHUNIfKCtaUWFRXo/9BI9ib SnxHmtYjg1OEMdV8GXGNvoFwTpiTa0WsjU4/Uuh6BeTyeP5SPiWoV4pvCwOj9oBk An4/3M2EsyAAg+0pQUj5yx08hNEAHR6d9ZrVedO1nB9JLMrJ8uf5x3uNM8DaO+1y AUDe7cptvjUm1xfkBfRTngU5LTsjgQKQg7EjiOPKF6kCjlS7zwU/doxeYlvp5AUk ulMto46l1lbiDsN3j9fQbPAf3dkhsThfjwBilcaL1vNOkhSKgYAq4xwGq06/IoDr Zxk59U5kEg2WIqz2AqxyCH68OO2yB1SP5h0m5TT01w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhephffvvefuffhffggjkfggtgesmhdtreertder jeenucfhrhhomhepufhtrhgrfigsvghrrhihvfgvrgcuoehlohhokhesshhtrhgrfigsvg hrrhihthgvrgdrgiihiieqnecuggftrfgrthhtvghrnhephfelleffvdeijeetgfdtvdfg hfegfedvtefgjeefveejteegudekveelvdeluefhnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheplhhoohhksehsthhrrgifsggvrhhrhihtvggr rdighiii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Feb 2024 10:53:10 -0500 (EST) In-reply-to: <861q98r64n.fsf@gnu.org> 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:280334 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Eli. I inserted a print function into magit-post-command-hook: (defadvice! cae-magit-section-post-command-hook-a (oldfun) :around #=E2=80=99magit-section-post-command-hook (condition-case e (funcall oldfun) (error (+log =E2=80=9Cmagit-post-command-hook error:=E2=80=9D (current-buffer) (selected-window) (buffer-narrowed-p) (point-mi= n) (point-max) (buffer-size))))) and it outputted this: Values: magit-post-command-hook error:, magit: emacs, #, nil, 1, 20993, 20992 Eli Zaretskii So basically, the situation is that the (current-buffer) is magit: emacs wh= ereas the window is on \*Messages\* and so when we call (get-pos-property pos =E2=80=99cursor-intangible), it uses a point value from magit: emacs on the= messages buffer. Why exactly are the window-buffer and the current-buffer different? 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=99= s buffer immediately. Sincerely, StrawberryTea writes: >> From: StrawberryTea >> Date: Sun, 18 Feb 2024 15:08:20 -0600 >> >> Hi. So I noticed that sometimes magit-section-post-command-hook was givi= ng an >> ars-out-of-range error and I have narrowed it down to a C function in Em= acs: >> >> Debugger entered=E2=80=93Lisp error: (args-out-of-range 9482 9482) >> cursor-sensor=E2=80=93intangible-p(9483) >> cursor-sensor-tangible-pos(9483 #) >> cursor-sensor-move-to-tangible(#) >> #() >> apply(# nil) >> (condition-case err (apply func args) ((debug error) (signal (car err) (= cdr err)))) >> cae-debug-reraise-error(#) >> apply(cae-debug-reraise-error # ni= l) >> magit-section-post-command-hook() >> >> Within cursor-sensor=E2=80=93intangible-p, (get-pos-property 9483 =E2=80= =99cursor-intangible) >> is giving that error in the Magit buffer even though that 9483 number is= less >> than (point-max). > > Can you show a recipe to reproduce this, preferably without using > Magit? > > I suspect some code narrows the buffer while this code runs, which is > why the error is signaled. --=-=-=--