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#74091: 31.0.50; string-pixel-width in mode line disables region Date: Sat, 09 Nov 2024 11:26:48 -0500 Message-ID: References: <86y1254owq.fsf@gnu.org> <86ldy54m2g.fsf@gnu.org> <86ed3w33g1.fsf@gnu.org> 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="17945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eshel Yaron , 74091@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 17:27:22 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 1t9oJ0-0004VS-7x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 17:27:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9oIh-0006PL-AK; Sat, 09 Nov 2024 11:27:03 -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 1t9oIg-0006Oz-5w for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:27:02 -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 1t9oIf-0007hu-Ta for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:27:01 -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=eIXAlFK9UH1APuy5o1JcW77DAbQQzUwYU5yyO1iZBrA=; b=g/u+1RIW6Jl2UVZHvXY2k8TURjQZAaw3criD3Si/kGePBno9WS5aJbHEG8wdRBqmGCgODMxJggmkHUT49Mzrkh7/3oMyYyKux9tSbTKbGnTTcGY9m1bUXZ9xpF6TbeuxN7MpxKl5H9lcP/a83HbwF5Iq6BWmzoWRClhzoqzSaDLy3eyGVlzQIit5ygScD7qIZBJArprCL7Ol1DD3uR2JA9fnm9BVYgVOO5kvWP6dHNZWsdzpXtn/UuOh/bk5AnhCR6qN7Zg5KwXt7lxj1UMd6PxwwC90DmzH6ekECKqG2m5OHzIqYywjQdf+q7XH27I4GjfQAW1Na1YnJd1bgxCEOA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9oIf-0003hd-KJ for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 16:27:01 +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.173116961914224 (code B ref 74091); Sat, 09 Nov 2024 16:27:01 +0000 Original-Received: (at 74091) by debbugs.gnu.org; 9 Nov 2024 16:26:59 +0000 Original-Received: from localhost ([127.0.0.1]:54184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9oId-0003hL-5J for submit@debbugs.gnu.org; Sat, 09 Nov 2024 11:26:59 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9oIa-0003h6-Gh for 74091@debbugs.gnu.org; Sat, 09 Nov 2024 11:26:57 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F3DFC440BFA; Sat, 9 Nov 2024 11:26:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731169609; bh=cQzudkLAGkqSHJxSt9o0lyvvULUxlhKDjCyUSHvqZEg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dotLessx+8xEv41Xgn6TxcWG6DoST3uCiSWKsqO+O+cNej6S+zvE+HMnvVnbM8dmi dAUxAFsHXd7HfSDjTbo+iBSVqCp3efJvepIXM6yTHDispMIDKtXsBASq6/MlNDaW7J PCDS4etZ+/XeyYNbxx3fI3V/Kj2cWZJRsdrfqHRrBcLzQEwaHKdE6BI7oDR40VklK4 eeI/fUj/3/V6D5e6hCjMCb6HIg9oejjudS8W9llJhserofjYm4rKRKHgQOyrj2Ol6K lAfzzeT8psimkq2nhOG2Cei5cCT59LNVRMEhym+dK8b5hQu33I3Um8MiBGxCayvmvi XVsecK2EzAIeQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C7533440B97; Sat, 9 Nov 2024 11:26:49 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97FE11202FD; Sat, 9 Nov 2024 11:26:49 -0500 (EST) In-Reply-To: <86ed3w33g1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 31 Oct 2024 13:41:02 +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:295141 Archived-At: > Killing local variables makes the global value of deactivate-mark be > in effect when the command loop decides whether to deactivate the > region after a command finishes. The thing I don't understand is this: Why is the global value of `deactivate-mark` non-nil? After all, since it is buffer-local when set, it should only be non-nil buffer-locally, so the `kill-all-local-variables` should just through away the non-nil setting, whereas it seems that somehow the non-nil setting gets "promoted" to global. I suspect the problem might be a bug in `reset_buffer_local_variables` around: /* Reset all (or most) per-buffer variables to their defaults. */ if (permanent_too) bset_local_var_alist (b, Qnil); I suspect this was OK in the "original" uses of `permanent_too` because "by construction" none of those vars could be "swapped in" (i.e. have their value held in a C variable like `Vdeactivate_mark`), but we now have cases where this is not the case any more, so that if the value of `Vdeactivate_mark` held a buffer-local value, it ends up "promoted" to global. Stefan