Subject: bug#34476: fluffy whitespace in the mode-line, despite it running off the screen

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 15 Aug 2020 12:55:33 +0200

Eli Zaretskii <[email-masked]> writes:

> Here's the result.  Note that this is slightly sub-optimal, because if
> 2 Lisp strings are displayed one after another, and the first one ends
> with a space, while the second one begins with a space, this will not
> be squeezed, because we consider each string separately.

Hm...  I think the main use case for squeezing isn't really removing
spaces from individual strings, but consider the entire resulting mode
line as a whole.  We end up with too-spacey mode lines, often, because
we have formats that may or may not display something, but we still have
spaces surrounding that element.

> If this is not acceptable, then we will have to go back to your
> original proposal of using Fformat_mode_line

Yeah, I think that may be the way to go.

> (although I'm still unhappy with doing that, as we had over the years
> quite a few complaints that the result is not exactly identical to the
> displayed mode line).

Perhaps that's something that can be fixed?

> If the patch below is deemed "good enough", we will probably need to
> implement something similar for Fformat_mode_line, because users might
> expect the latter to produce a similarly squeezed whitespace.

Yup.  Perhaps the squeezing should just be moved into that function?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no