GNU bug report logs - #58183
29.0.50; Extra spacing before '@' in emacsclient modeline

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Thu, 29 Sep 2022 21:25:01 UTC

Severity: normal

Merged with 52183, 62846

Found in versions 29.0.50, 29.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 58183 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: 58183 <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 miha <at> kamnitnik.top
Subject: Re: bug#58183: 29.0.50; Extra spacing before '@' in emacsclient
 modeline
Date: Fri, 28 Jul 2023 12:48:40 +0200
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?= <ulm <at> gentoo.org>
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





This bug report was last modified 1 year and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.