From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74091: 31.0.50; string-pixel-width in mode line disables region Date: Sat, 09 Nov 2024 13:13:52 +0200 Message-ID: <86a5e8mzgv.fsf@gnu.org> References: <86y1254owq.fsf@gnu.org> <86ldy54m2g.fsf@gnu.org> <86ed3w33g1.fsf@gnu.org> <865xp82vd2.fsf@gnu.org> <86ldxwsf11.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74091@debbugs.gnu.org To: Eshel Yaron , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 12:15:14 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 1t9jQw-00087d-0I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 12:15:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9jQm-0001Ui-9M; Sat, 09 Nov 2024 06:15: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 1t9jQl-0001UW-25 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 06:15: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 1t9jQk-0006H9-PN for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 06:15:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=xoEkT3k3MDa0oGaHoPtmR8/6briKBBub9zx00tPwyXw=; b=AnqZe0TTbTz7I40KenUfgZcXfIYjqS+bZD4TY2mTWKzsY3SjirnFMKZb4NhYMSPrZlu/cOfhEVLqtv57sCHniue2d8HReKwswEAcdm0VW+K7D3FoigsV5+jWTe4MZe0H17bwoEC8v4BDTZRjtCA/suNQhIWMDKlDzQkIzuDLnGyYkGgxlZXllQf6WbUd991AhsTRguzrua5fUvrmYy1IDOZX85vHFwX5C0Fm/Wpb+hEJRNw/9+sXDcPeUEzcUAbPGcAqDhnNCGDQvQX+vJgM7mSGURb9n11BGA85thj2NkoZYjtOJtqiyA1Wq+IfTzKR2RD+nh4BAETy52RRgo+Iow==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9jQk-0006oR-JM for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 06:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 11:15: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.173115084326088 (code B ref 74091); Sat, 09 Nov 2024 11:15:02 +0000 Original-Received: (at 74091) by debbugs.gnu.org; 9 Nov 2024 11:14:03 +0000 Original-Received: from localhost ([127.0.0.1]:53666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9jPn-0006mi-7r for submit@debbugs.gnu.org; Sat, 09 Nov 2024 06:14:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9jPk-0006m4-Lg for 74091@debbugs.gnu.org; Sat, 09 Nov 2024 06:14:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9jPf-0006Ew-0b; Sat, 09 Nov 2024 06:13:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xoEkT3k3MDa0oGaHoPtmR8/6briKBBub9zx00tPwyXw=; b=QcR17iGhazcy TpbPaQMEckcv9wJhKE8j5Lcoq9v0IKy5GfSxgH+cVQWm1QKBtPikcVMu52EVDrdtEGGDgPUlhdvbF jYPl8CB+d8mQYyB47rGwuQe6f/UzORsARuonI+Ac/e1Zb6tWT0YNQUHAl4DyxAmpAePuIozf4/0T3 RXNkx0BVRsvrqjZB8+ePwnWFbKK45pQ6e1J7HAu/usqz0i8AZ4Fqy2cG8Zs6nvVTmHle/Hcyw5j6K uLzlWoVNfXg82sOzKM7FTHMxeqFYfrDpcKF5OW492TAe1ziWlKLJTrKL40T1OLUd7t5trmNQZ6CyE YmWzms0BFShLkOzV8j0E9w==; In-Reply-To: (message from Eshel Yaron on Wed, 06 Nov 2024 15:12:24 +0100) 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:295128 Archived-At: > From: Eshel Yaron > Cc: 74091@debbugs.gnu.org > Date: Wed, 06 Nov 2024 15:12:24 +0100 > > Eli Zaretskii writes: > > >> From: Eshel Yaron > >> Cc: 74091@debbugs.gnu.org > >> Date: Wed, 06 Nov 2024 09:01:16 +0100 > >> > >> 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: > > > > Can't _any_ variable become permanent-local, by virtue of some Lisp > > program or the user giving it a permanent-local property? > > > > More generally, how do we know that there are no permanent-local > > variables out there that affect layout, and thus affect the results of > > this function? > > > > I believe these considerations were those which led the author to use > > kill-all-local-variables like this: we want to be sure that nothing > > will dupe string-pixel-width into producing unexpected results. > > Yes, this reasoning is perfectly understandable. However, the current > way of killing all permanent-local variables has bad consequences that > that author, naturally, did not expect. So my suggestion is to avoid > (kill-all-local-variables t) here and elsewhere. > > For string-pixel-width specifically, we take care to clear variables > that may affect width calculation. If other variables may interfere, we > should just clear those too. Let's see what Stefan (CC'ed) thinks about these issues.