[Top][All Lists]

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

Re: character sets as they relate to “Raw” string literals for elisp

From: Eli Zaretskii
Subject: Re: character sets as they relate to “Raw” string literals for elisp
Date: Mon, 04 Oct 2021 21:57:02 +0300

> From: Daniel Brooks <db48x@db48x.net>
> Cc: emacs-devel@gnu.org,  rms@gnu.org,  anna@crossproduct.net
> Date: Mon, 04 Oct 2021 08:36:40 -0700
> Eli Zaretskii <eliz@gnu.org> writes:
> > We can only do this much.  We don't develop any terminal emulators
> > here, except the two built into Emacs.
> I was referring broadly to the whole GNU project, not trying to assign
> the work specifically to the Emacs project. :)

Then this is not necessarily the best place to raise these issues.

> Suppose our hypothetical contributor wanted to contribute a new mode
> with this type of code in it:
>     (defun 日本 () (message "日本"))
> That is, all of the identifiers in the source code for this mode are
> named in some horrible foreign script that you cannot read. Is it so
> much more unreadable if it sometimes has to be displayed like this?
>     (defun \u65E5\u672C () (message "\u65E5\u672C"))
> More to the point, do we turn away this contributor or ask them to
> rewrite their code? My preference is that we simply accept the
> contribution as–is.

It would be very inconvenient to have such code.  We have that where
it's inevitable (like in some packages that define features specific
to some languages), but even there we prefer to use the likes of
\u672c instead of the literal characters.  At the very least, that
avoids the problem with not having a suitable font to display them.

> If we could see our way to accepting such code, then I don’t see why we
> couldn’t accept code that uses Unicode in much smaller ways, such as
> this:
>     (defvar variable-containing-html #r「<a href="foo.html">click here</a>」)

If we avoid non-ASCII characters, we avoid some problems, so all else
being equal, it's better.

> PS: it occurs to me to wonder if my use of Unicode in the prose of this
> message, outside of the examples, detracted from its readability in any
> way?

If someone is reading this on a text-mode terminal, it could.

reply via email to

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