From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74091: 31.0.50; string-pixel-width in mode line disables region Date: Wed, 06 Nov 2024 09:01:16 +0100 Message-ID: References: <86y1254owq.fsf@gnu.org> <86ldy54m2g.fsf@gnu.org> <86ed3w33g1.fsf@gnu.org> <865xp82vd2.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21112"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74091@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 06 09:02:24 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 1t8azg-0005Kj-7h for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Nov 2024 09:02:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8azM-0007zP-Io; Wed, 06 Nov 2024 03:02:04 -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 1t8azL-0007zD-43 for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:02: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 1t8azK-0002m8-KL for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:02:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=AxAJ9hoR6+F2L3w/AF1sf/qASl4cf6jABeItkLm36r8=; b=UjjOP56HMqriNdvfwhtD8DDRvUvEoS4QUrhJJwjjRm2MROalf8AzAzhMV66iujJe4J7COSDPfoR4Z82LSwBd0yecuAFVE0u+D0B6NIYJu8bpmRKi43yGtL7rTT/HXeqpV7Yfg+4+wGtq3Qf9hIpixsw1VPAXQAKR8KhO/qzmGDMvTgmUOfeVXRFhjQEh8hOEa+rgwaZEHfRU4Ih+gmwB2L+AOB0YWBwXDMhOjwPEl1ZPwfwn0YTcokgZMdB+FOVvco8j2nXlrOvmY003HrVn4GX2IeLXnzDBC9U9es+kji02TN5MFVyXVBWZ3in+MqiVNvJSPpfSqVeO2ZFIwsb5fg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8azK-0001iJ-Em for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 03:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2024 08:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74091 X-GNU-PR-Package: emacs Original-Received: via spool by 74091-submit@debbugs.gnu.org id=B74091.17308800846526 (code B ref 74091); Wed, 06 Nov 2024 08:02:02 +0000 Original-Received: (at 74091) by debbugs.gnu.org; 6 Nov 2024 08:01:24 +0000 Original-Received: from localhost ([127.0.0.1]:39156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ayh-0001hC-Ji for submit@debbugs.gnu.org; Wed, 06 Nov 2024 03:01:23 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:51378 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ayd-0001gz-00 for 74091@debbugs.gnu.org; Wed, 06 Nov 2024 03:01:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1730880078; bh=dEFzENWglgfyEKs/F7rpVEd9NDUYrDyxX0DIoNyGYiA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DGN6ehAuih2DRYVLnd3LHxfyd/sq4wPChybGiF4EQVsY8NlGVJR+1VcUyRO7Ty9aH QViSoqlFyR9V95Aha56UgRrzP0KT72vcCPO04zdo7uvJ2yoW+HGMdRY6+2GsCsb4C0 7D88F2qYXCDfdzaELKGYz/MPidOO3Ay3q6/qXLc9awB2ajX5sSFP42lXhurbOJLBTp wVViRrZj4sIfY9bYO/S1Xuyp3L0DNQQLxCxNL/0aPfQZXh/TXcj8ddgSX57laBH8Ep cRg8sh6H2+txJaQIU/6qk0vUc4IS5rbWIE9KQDW9lybE7Kq6Qq1fR3DTh5Ga5HK8aA fkBezqNvBSSRA== In-Reply-To: <865xp82vd2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 31 Oct 2024 16:35:37 +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:294935 Archived-At: Hi, Eli Zaretskii writes: >> > Look, you are welcome to keep debugging this if you are interested. I >> > invested enough of my time into figuring out why the region was >> > deactivated by C-n, and the solution I installed satisfies me. But >> > you are welcome to keep digging, and let me tell you what I found to >> > save you some non-trivial tinkering: >> >> Thank you, I'll keep digging and let you know if I figure it out. > > TIA. FYI after spending a bit more time on this issue, I concluded that (kill-all-local-variables t) is inherently problematic: it breaks assumptions that Emacs relies on. (See bug#73005 for another example.) It doesn't seem like killing permanent-local variables in the work buffers is necessary ATM, so the fix I'm using is the following: diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 5b47deb880e..b5cbe28afad 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -361,7 +361,7 @@ work-buffer--release (erase-buffer)) (delete-all-overlays) (let (change-major-mode-hook) - (kill-all-local-variables t)) + (kill-all-local-variables)) ;; Make the buffer available again. (push buffer work-buffer--list))) ;; If the maximum number of reusable work buffers is exceeded, kill Best, Eshel