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 13:06:13 -0500 Message-ID: References: <86y1254owq.fsf@gnu.org> <86ldy54m2g.fsf@gnu.org> <86ed3w33g1.fsf@gnu.org> <8634k0mkgy.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="23949"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: me@eshelyaron.com, 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 19:07:12 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 1t9prc-00065J-1y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 19:07:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9prV-00055C-PF; Sat, 09 Nov 2024 13:07:05 -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 1t9prT-0004zL-7K for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 13:07: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 1t9prS-0000yp-SQ for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 13:07: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=jsOYkKw50H4yfRBgnkLSLx7EeIs0OKaAmkUlksP0V4I=; b=T62cR3IBw5JTaGpaB2gb/c56RMIWo5D1h89g2E/YHEjyJC6bsVxsPQiUZG9KhjZW4y6TO6hRvRpVYQzsGNXfroL6V4wTDTFbVeuIHxmE9F8cM0WY5UPLTpNAjL7H4qJvhggx9rHZCotgBvb8SMmidvez1nYFDhEJHjxCqS3gC/emv7TCYxy2HtcfuMzKsi+YE0+9iEZIgzrPhq46AqsJEG/MPSsSyCs+wqqlIFzwz6JBoqkGaWsgXU4JisVVbCWg0ur8JotGh/8r1G3DZmcrHfnYMx9WDl+dHyi56/lyIKDgF/L9KNqNqa+ETEij/B+1ukPNpDAn/89/2k4bTtbJ/Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9prS-0008Hk-If for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 13:07: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: Sat, 09 Nov 2024 18:07: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.173117558531792 (code B ref 74091); Sat, 09 Nov 2024 18:07:02 +0000 Original-Received: (at 74091) by debbugs.gnu.org; 9 Nov 2024 18:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:54406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9pqq-0008Gh-UN for submit@debbugs.gnu.org; Sat, 09 Nov 2024 13:06:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9pqn-0008GS-7b for 74091@debbugs.gnu.org; Sat, 09 Nov 2024 13:06:23 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 11B6180B3A; Sat, 9 Nov 2024 13:06:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731175574; bh=uzoKMaNAt2fpsYsmqKl+pvbIqPHJOkHBiuAuo/0manU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=I76sxKKeesWRavSyKeQGTNU90xmttXgPoBlLs3v2dGe087XuXAhfplI/ZnS0EDU3n 2H3zNGP63jOOnq0We1l8voeqXpsuR7o7DsuuqOHSN7t//yZ90IMrRun2Iop2VfLkH7 SdI9BLQ8n9cKY7+SToDO/uJvJonr2Di5UlT/00d9i+Y3QWTnYjvX2c1ELP6owHI91q Ur+9eijXxhPBDtEffKc4/JgH8d4SctC6wXBZFYZFSgD8Uqi3PIHWAftG3AxyxIvQHT /JdbWq30TN1aoF9VQqUv+6ZX9xidBrkLd1ogB/1+c9okW6z4KdQgPgtlO1QW21YrtJ 7G6EEZIp4N6eg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 01F13801F1; Sat, 9 Nov 2024 13:06:14 -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 C3A4E12056B; Sat, 9 Nov 2024 13:06:13 -0500 (EST) In-Reply-To: <8634k0mkgy.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Nov 2024 18:37:49 +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:295152 Archived-At: >> 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. Hmm... I was wrong, it's not actually promoted to global, it's just that the former local value "lingers". > Which development in Emacs made such a "promotion" possible? AFAICT the problem is new with the addition of the `kill-permanent` arg to `kill-all-local-variables`. Here's an example of a problem: src/emacs -Q --batch --eval '(message "%s" (list (setq-default foo nil) (setq-local foo t) (kill-all-local-variables t) (local-variable-p `foo) foo (default-value `foo) (with-temp-buffer foo) foo))' => (nil t nil t t nil nil nil) If we call `kill-all-local-variables` without the additional argument, we get the correct answer: (nil t nil nil nil nil nil nil) - Stefan