[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: Daniel Brooks
Subject: Re: character sets as they relate to “Raw” string literals for elisp
Date: Tue, 05 Oct 2021 10:08:01 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Alan Mackenzie <acm@muc.de> writes:

> Hello, Daniel.
> On Mon, Oct 04, 2021 at 15:19:22 -0700, Daniel Brooks wrote:
>> But alas, it’s fairly ordinary; I don’t actually have the keyboard of my
>> dreams. Instead, there are some xkb options that I turn on to make it
>> more capable. To type a 「"」 I have to press S-', while to type 「“」 I
>> press Level3-k; it’s a different pair of fingers, but not really any
>> more difficult or awkward to type.
> So, you've set up your keyboard specially to be able to type these things
> easily.  I think we can be sure that a lot of your readers won't have
> done the same.  I've set up mine to be able to type ä, Ä, ö, Ö, ü, Ü, and
> ß.

Ah, I think I understand what you are getting at. You are asking why raw
strings should use 「」? I’m suggesting that like Raku, the elisp parser
allow _any_ nonalphanumeric character as a delimiter, and that if that
opening delimiter is part of a pair, then the closing delimiter would be
the closing character of the pair. So #r「foo」 would be a raw string, but
so would #r(foo) or #r[foo] or #r@foo@, or whatever else you wanted to

The idea is that you would never be required to escape the
delimiter, because you can always choose a delimiter that is not part of
your string. As long as your keyboard has at least one or two
punctuation characters in addition to the usual quotes, then you would
be in good shape. Well, I suppose you would also rarely want to use
period or comma as the delimiter either; they are likely to show up in
the strings you might want to type. But we can be fairly certain that
the user at least has parentheses close by.

>> I use a GUI precisely because the range of characters is so much wider,
>> making the text work more fun.
> OK.  If the kernel's console also had the same range of characters, would
> you then use that console for text work?

I would miss some other features, such as multiple monitor support, but
nearly so.

>> I can hear the laughter already, as we propose adding a 2 or 3 megabyte
>> kernel module. It would be hilarious. Can you imagine it now?
> Actually, if it was an optional feature, I think it would be welcome in
> the kernel, although most kernel hackers would probably continue not to
> use it.  2 or 3 Mb isn't a large amount of RAM on a desktop machine any
> more.

Yes, but look at the size of the rest of the kernel on disk. Mine is 11
megabytes :)


reply via email to

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