From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich =?UTF-8?Q?M=C3=BCller?= Newsgroups: gmane.emacs.bugs Subject: bug#58183: 29.0.50; Extra spacing before '@' in emacsclient modeline Date: Fri, 28 Jul 2023 12:48:40 +0200 Message-ID: References: <87r0ztuaj5.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27562"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Lars Ingebrigtsen , miha@kamnitnik.top To: 58183@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 28 13:26:42 2023 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 1qPLcI-000721-O2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jul 2023 13:26:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPL1t-0004vh-IA; Fri, 28 Jul 2023 06:49: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 1qPL1s-0004vM-1T for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 06:49:04 -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 1qPL1r-0001jV-0a for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 06:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPL1p-0007z6-TH for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 06:49:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r0ztuaj5.fsf@miha-pc> Resent-From: Ulrich =?UTF-8?Q?M=C3=BCller?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2023 10:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58183 X-GNU-PR-Package: emacs Original-Received: via spool by 58183-submit@debbugs.gnu.org id=B58183.169054133730682 (code B ref 58183); Fri, 28 Jul 2023 10:49:01 +0000 Original-Received: (at 58183) by debbugs.gnu.org; 28 Jul 2023 10:48:57 +0000 Original-Received: from localhost ([127.0.0.1]:43793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPL1k-0007yo-Ta for submit@debbugs.gnu.org; Fri, 28 Jul 2023 06:48:57 -0400 Original-Received: from smtp.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:45163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPL1f-0007yX-A5 for 58183@debbugs.gnu.org; Fri, 28 Jul 2023 06:48:55 -0400 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:266258 Archived-At: The following patch fixes the problem for me. TBH I don't entirely understand why it fixes it (the code in xdisp.c related to display properties is complicated). Apparently it has something to do with properties calculated in advance vs calculated in a :propertize form, which seems to affect what characters belong to the min-width sequence. >From fc283c40871b050ba6a58d7dd2957f6e19633d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Fri, 28 Jul 2023 12:21:42 +0200 Subject: [PATCH] Kill spurious whitespace in the modeline of emacsclient frames * lisp/bindings.el (mode-line-client): Compute text properties in advance. (bug#58183) --- lisp/bindings.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index 0a0fef1b564..22f05939235 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -226,9 +226,9 @@ mode-line-mule-info (put 'mode-line-mule-info 'risky-local-variable t) (defvar mode-line-client - `("" - (:propertize ("" (:eval (if (frame-parameter nil 'client) "@" ""))) - help-echo ,(purecopy "emacsclient frame"))) + `(:eval + (if (frame-parameter nil 'client) + ,(propertize "@" 'help-echo (purecopy "emacsclient frame")))) "Mode line construct for identifying emacsclient frames.") ;; Autoload if this file no longer dumped. ;;;###autoload -- 2.41.0