[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disambiguate modeline character for UTF-8?

From: Eli Zaretskii
Subject: Re: Disambiguate modeline character for UTF-8?
Date: Mon, 24 Aug 2020 21:55:39 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,  ulm@gentoo.org,
>   emacs-devel@gnu.org
> Date: Mon, 24 Aug 2020 21:35:56 +0300
> >> I don't see a strong reason to limit ourselves to a single char, FWIW,
> >> so I think `u7` is fine for utf-7* (it should be very rare anyway).
> >
> > It must be a single character, but OTOH it doesn't have to be an ASCII
> > character.
> I don't know where the requirement for a single character comes from,

Look at the implementation of %z format on the mode line, and you will
see that it expects a single character.

> but since I can't memorize these cryptic characters, I customized
> the mode-line to display coding names in full, except a few characters
> that I can remember: "U" for UTF-8, and "-" for ASCII:

So on a TTY, you can have "UTF-8UTF-8UTF-8", if all the 3 encodings
are UTF-8?  Or do you only handle buffer-file-coding-system and ignore
the other 2 encodings?

> A long coding string in the mode-line also serves as a warning that
> a non-standard coding is used in the buffer.

It's okay to customize the mode line to your personal needs, but are
you really proposing this for a general-purpose feature in Emacs?
Because then we'd need to start by deciding what is "non-standard" in
this context.  For example, assuming the "standard" encoding is the
one determined by the locale, then if one lives in a non-UTF-8 locale,
they will always see "non-standard" strings in each and every .el file
they ever edit, which doesn't sound like a good idea to me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]