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: Tue, 29 Oct 2024 18:27:05 +0100 Message-ID: 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="18365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 74091@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 29 18:28:27 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 1t5q15-0004Qa-ND for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Oct 2024 18:28:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5q0j-0006uj-7J; Tue, 29 Oct 2024 13:28:05 -0400 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 1t5q0g-0006uJ-NS for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:28:03 -0400 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 1t5q0g-00079o-Ec for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:28:02 -0400 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:From:To:Subject; bh=Dwjg23hN0eOPdEmmBdqgfnx6YitspmxxRO3Y4/hoo3s=; b=D05YB38z+HbEJpA50MvbLnhb/Jq6l2omAgPASgzcf8G8SL+TcmczVC/r0p6mBPPL3L8CheGsZRI5PBaj5BqnIMahBlpQhKa/jXvhUUXLS8pYjuYFOko231APGOMxa7XtdniWQwSFSm4V7k0AdKM9FSTMl/JtN8od1JDSdnQk0pTd4oeYucaIYJqgenvwxogSwp9ix5azuC77WGn/xAz3njiKIbsFsTkqneAR8l4DYHcwEJ5nfinqk87Gv465s2ViEbauSsg9e4yL5ijVL+/ZMQnFwXbnjJlRyq/k1NzWIN+4bQTfqIOtY2fnP/ijw3h8CbTKzWmsNNTEzmHOGhszbw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5q0g-0003qM-8r for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74091 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173022283414755 (code B ref -1); Tue, 29 Oct 2024 17:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 17:27:14 +0000 Original-Received: from localhost ([127.0.0.1]:57580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pzu-0003pv-4K for submit@debbugs.gnu.org; Tue, 29 Oct 2024 13:27:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pzs-0003pp-3C for submit@debbugs.gnu.org; Tue, 29 Oct 2024 13:27:12 -0400 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 1t5pzr-0006su-2d for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:27:11 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5pzp-0006tG-7j for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:27:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1730222828; bh=ltWUgFBi6BmQxRWVlZwcPFVNCrpAB8F3FQqbv5z6ofs=; h=From:To:Subject:Date:From; b=lbHyZNsNQkySduqTSsL1353iF4tJ1hOhC8y+pEJq7e89BvM4qBoKmrRhEZjKLE4OG cmEXTIStB9opzQk+We+zpvEuhAwsZ1JRX0BiGhLSLFMHPf7mvl2BlwvzxbKcLcfOUp TDCNLxlwm1D/Ryz4gtQ5zfb/MkOUWgc89a74wqkdLgFl2DQmO95PrEm8vtzDBn6bju KCNhcMYBimemy/Iq9U7uhQtghyR8AQFBrtBtR5nUGbjLMcDFdYoP8diE7A61qwU+yE +iIjvnKNaypXKFsIghGipbUK6DkSuBOf4LnwRFzdukvPgdIz0M7z9dNzlqvTX/c3n/ 8jmzZgxdY89mQ== X-Hashcash: 1:20:241029:bug-gnu-emacs@gnu.org::fYQmjddbItvU+RgQ:8/mj Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:294512 Archived-At: The new implementation of string-pixel-width has some unexpected effect when it is called from mode-line-format, as happens for example when mode-line-format-right-align occurs in mode-line-format: 1. emacs -Q 2. (setq-default mode-line-format '("" (:eval (progn (string-pixel-width "foo") nil)))) 3. C-x C-f /path/to/emacs/lisp/subr.el 4. C-SPC 5. C-n At this point the region is expected to be active since we activated it in step 4. But in step 5 the mode line is updated, which calls string-pixel-width, which in turn unexpectedly disables the region. I'm not really sure why this happens... Also, if I now trace string-pixel-width, then it no longer disables the region and everything starts working as expected. Thanks, Eshel