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: Thu, 22 Feb 2024 11:15:28 -0600 Message-ID: <87wmqwbdvk.fsf@strawberrytea.xyz> References: <87msrxo4ji.fsf@strawberrytea.xyz> <861q98r64n.fsf@gnu.org> <871q97b09m.fsf@strawberrytea.xyz> <86zfvum21y.fsf@gnu.org> <87y1bdmlwa.fsf@strawberrytea.xyz> <87edd4plzh.fsf@bernoul.li> 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="12229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.8; emacs 30.0.50 Cc: Eli Zaretskii , Jonas Bernoulli , 69259@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 22 18:47: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 1rdDA6-0002jk-6r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Feb 2024 18:47:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdD9e-0005ZT-GA; Thu, 22 Feb 2024 12:46:43 -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 1rdD9c-0005YT-1L for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 12:46:40 -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 1rdD9b-0006ql-PB for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 12:46:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdD9y-0005Hf-Dq for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 12:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: StrawberryTea Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Feb 2024 17:47: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.170862399720243 (code B ref 69259); Thu, 22 Feb 2024 17:47:02 +0000 Original-Received: (at 69259) by debbugs.gnu.org; 22 Feb 2024 17:46:37 +0000 Original-Received: from localhost ([127.0.0.1]:45030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdD9X-0005GM-SH for submit@debbugs.gnu.org; Thu, 22 Feb 2024 12:46:37 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdD9U-0005Fe-EZ for 69259@debbugs.gnu.org; Thu, 22 Feb 2024 12:46:33 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2D7FF5C00C9; Thu, 22 Feb 2024 12:36:02 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 22 Feb 2024 12:36:02 -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=1708623362; x=1708709762; bh=NwY7SVN7abC3+n0bZxu9/r4h6MZ2b77S6T7eWgxMU3E=; b= cjTz9MwmmKDY7a2yxsvjzpa30VzlJ3ndAgxiPhR4QahsDbhJ7BKFZ8LuZC56tLAq pABVKB1LAsaF40+6i7Fx9uwc5d/vlECNoK9W667CoCJ0iNedDlx2lrd0ADPCGUtj I8Z7Fk4cJ5W6M+zmmo8ZQE3Ppf6B6MPWg/GLhppKUB/py1u/V3dWG3d/gDcNxYPe pEo6Ds8iaF8V+EHDl1iWU7L2TPQuyIncv5pvndCxGYGFc2lwSFICvWQzex6uqtZ+ kjJBB0c9rblm/vdCNF4gfzApK443937WYU0RlrZl6HwP69YqHC1maZCtJ3KEXjCT AKUsVlHNqSZq5vO9Kd5+Vw== 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=1708623362; x=1708709762; bh=NwY7SVN7abC3+n0bZxu9/r4h6MZ2 b77S6T7eWgxMU3E=; b=hjXR5IKSEomV1gri+zNphj9dkJYTyrOFujdg8ksZ38/N JHy26EgfEBxt79Cmh+yoEKDJ9edSkOsBanf8rQ11F9YdJPf+IYgQqX/X6G3vRl50 HogIAul0sfG0/OpJcCv5+ZAhoxGsFT9608CBt5Gpu2q7QH2OPksXybZj2AfdazqK f8w2FF4H1UVw1f4L4xkpeVY2Q5BNF7XP6pPoxa9k8QbGdixZZr9LbLVJpeNZMUVl H/z8D1TdGTyet/jpzo2IrqBUovg4NnzwM+YFq+IDRd5nTCdvQI393VJ9uxJiKMIe OJi8mSMgvKo+sWhisEnZOf1noesze3frj8++cPRjFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeggddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpefhvfevuffffhgfjgfkgggtsehmtderredt reejnecuhfhrohhmpefuthhrrgifsggvrhhrhifvvggruceolhhoohhksehsthhrrgifsg gvrhhrhihtvggrrdighiiiqeenucggtffrrghtthgvrhhnpefhleelffdvieejtefgtddv gffhgeefvdetgfejfeevjeetgedukeevledvleeuhfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlohhokhesshhtrhgrfigsvghrrhihthgv rgdrgiihii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Feb 2024 12:36:00 -0500 (EST) In-reply-to: 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:280463 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok. I was looking at: (defun view-echo-area-messages () =E2=80=9CView the log of recent echo-area messages: the `*Messages*=E2=80= =99 buffer. The number of messages retained in that buffer is specified by the variable `message-log-max=E2=80=99.=E2=80=9D (interactive) (with-current-buffer (messages-buffer) (goto-char (point-max)) (let ((win (display-buffer (current-buffer)))) ;; If the buffer is already displayed, we need to forcibly set ;; the window point to scroll to the end of the buffer. (set-window-point win (point)) win))) and it=E2=80=99s an example of a function which updates the window-buffer b= ut not the current-buffer. When I look at the C code for set-window-point, it explicit= ly restores the current-buffer to the state it was in before the call. So over= all, this function pops messages-buffer up but will activate the post-command-ho= ok for the buffer that was current before the call. I=E2=80=99m not sure if this is a bug or not, but it=E2=80=99s definitely a= n edge case that catches a lot of packages off guard. Stefan Monnier writes: >> That was my guess. The merged commit just forgoes calling that function >> if things aren=E2=80=99t as expected. My plan was (and obviously still = is) to >> look into instead ensuring that the expected buffer is current, making >> it current if necessary. > > As alluded to in my other message, maybe we should consider it a bug > if `post-command-hook` functions get called with (current-buffer) > different from (window-buffer) and similarly I=E2=80=99d consider it a bu= g if > such a function breaks this invariant. > > [ Just putting this out there, hoping to influence who you > blame at the end of your =E2=80=9Clook into=E2=80=9D =F0=9F=99=82 ] > > Stefan --=-=-=--