Subject: bug#76852: 30.1; Regression in whitespace-mode causes display issue under terminal

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Mar 2025 16:21:12 +0200

> From: 张海 <[email-masked]>
> Date: Tue, 11 Mar 2025 21:56:00 -0700
> Cc: [email-masked]
> 
> > That rings a bell.  What happens if, before turning on whitespace-mode
> > for the first time in a session, you customize the variable
> > cjk-ambiguous-chars-are-wide to the nil value?  This must be done
> > either via setopt or interactively via customize-option, not via setq.
> > Does the problem go away if you do that, and then turn on
> > global-whitespace-mode?
> 
> I can confirm this does make the issue go away.

OK, so we now at least understand what caused the issue.

> But looking at the NEWS announcement for cjk-ambiguous-chars-are-wide,
> it seems to suggest the previous default was already full-width, which
> conflicts with the fact that whitespace-mode was working fine in
> terminal in Emacs 29.4 under a CJK locale. So was there an
> unintentional default behavior change, and should that be fixed?

The change was intentional, but it follows the Unicode data tables, so
evidently some characters which were previously half-width because
full-width by default in Emacs 30.  Thus, the NEWS text is indeed
slightly misleading.

> > Can you look for a font where the characters U+00B7 MIDDLE DOT and
> > U+00A4 CURRENCY SIGN have fullwidth glyphs?  I presume some
> > CJK-specific fonts should be like that, since these characters are
> > referred to as having "ambiguous width" in the Unicode character
> > database.  If you can find such a font, please try setting up
> > gnome-console to use it, and see if the problem then goes away.
> 
> No, the same issue persisted and the only difference is that this time
> only the first half of the full-width middle dot was rendered.

Hmm... does gnome-console have any configuration options for this?  It
sounds like it assumes these characters are half-width regardless of
what the font does.  This URL:

  https://superuser.com/questions/573876/how-to-let-gnome-terminal-to-use-specific-font-to-display-punctuations-in-their

seems to imply you should be able to control this aspect of the
terminal.