GNU bug report logs -
#58183
29.0.50; Extra spacing before '@' in emacsclient modeline
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58183 in the body.
You can then email your comments to 58183 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58183
; Package
emacs
.
(Thu, 29 Sep 2022 21:25:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
miha <at> kamnitnik.top
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Sep 2022 21:25:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Graphical emacsclient frames have modelines that look something like
U: @---
instead of
U:@----
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58183
; Package
emacs
.
(Fri, 30 Sep 2022 05:52:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 58183 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 29 Sep 2022 23:37:50 +0200
> From: miha--- via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Graphical emacsclient frames have modelines that look something like
>
> U: @---
>
> instead of
>
> U:@----
I cannot reproduce this. Please show a full recipe starting from
"emacs -Q".
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58183
; Package
emacs
.
(Fri, 30 Sep 2022 13:00:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 58183 <at> debbugs.gnu.org (full text, mbox):
miha <at> kamnitnik.top writes:
> Graphical emacsclient frames have modelines that look something like
>
> U: @---
>
> instead of
>
> U:@----
It seems to have something to do with the min-width display property.
When the client element is present, the default format is making the "U:"
element five chars wide instead of the entire "U:@---".
To experiment:
(setq mode-line-format
'("%e" mode-line-front-space (:propertize ("" mode-line-mule-info mode-line-client mode-line-modified mode-line-remote)
display (min-width (5.0)))
mode-line-frame-identification mode-line-buffer-identification " " mode-line-position (vc-mode vc-mode) " " mode-line-modes mode-line-misc-info mode-line-end-spaces))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58183
; Package
emacs
.
(Fri, 30 Sep 2022 13:40:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 58183 <at> debbugs.gnu.org (full text, mbox):
> Cc: 58183 <at> debbugs.gnu.org
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Fri, 30 Sep 2022 14:59:39 +0200
>
> miha <at> kamnitnik.top writes:
>
> > Graphical emacsclient frames have modelines that look something like
> >
> > U: @---
> >
> > instead of
> >
> > U:@----
>
> It seems to have something to do with the min-width display property.
> When the client element is present, the default format is making the "U:"
> element five chars wide instead of the entire "U:@---".
>
> To experiment:
>
> (setq mode-line-format
> '("%e" mode-line-front-space (:propertize ("" mode-line-mule-info mode-line-client mode-line-modified mode-line-remote)
> display (min-width (5.0)))
> mode-line-frame-identification mode-line-buffer-identification " " mode-line-position (vc-mode vc-mode) " " mode-line-modes mode-line-misc-info mode-line-end-spaces))
This doesn't show the extra spaces here. Strange.
Merged 58183 62846.
Request was from
miha <at> kamnitnik.top
to
control <at> debbugs.gnu.org
.
(Sun, 16 Apr 2023 08:06:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58183
; Package
emacs
.
(Fri, 28 Jul 2023 10:49:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 58183 <at> debbugs.gnu.org (full text, mbox):
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
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 28 Jul 2023 12:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
miha <at> kamnitnik.top
:
bug acknowledged by developer.
(Fri, 28 Jul 2023 12:41:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 58183-done <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Müller <ulm <at> gentoo.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
> <miha <at> kamnitnik.top>
> Date: Fri, 28 Jul 2023 12:48:40 +0200
>
> The following patch fixes the problem for me.
Thanks, installed on the master branch, and closing the bug.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 28 Jul 2023 12:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gustavo Barros <gusbrs.2016 <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 28 Jul 2023 12:41:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 26 Aug 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.