emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#55738: closed (character escape bugs in the reader)


From: GNU bug Tracking System
Subject: bug#55738: closed (character escape bugs in the reader)
Date: Wed, 06 Sep 2023 01:57:03 +0000

Your message dated Tue, 5 Sep 2023 18:56:12 -0700
with message-id 
<CADwFkmnTEFVApH-U8bCSzs5Q1nbb-n92y2qx=90R3JamJ0FT4w@mail.gmail.com>
and subject line Re: bug#55738: character escape bugs in the reader
has caused the debbugs.gnu.org bug report #55738,
regarding character escape bugs in the reader
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
55738: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55738
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: character escape bugs in the reader Date: Tue, 31 May 2022 13:33:09 +0200
Some character escape oddities observed in the Emacs reader:

1. ?\LF => -1

This is clearly a bug (no character literal should be -1) and an artefact of 
the underlying implementation.
The correct value should be 10.
(In string literals \LF is ignored entirely, as documented.)

2. The Control modifier (\C- or \^) is nonidempotent. For example,
?\C-a => 1
?\C-\C-a => #x4000001

Similarly, "\C-\C-a" signals a reader error.

This too is an artefact of the implementation. The correct value should be as 
if only a single control modifier were present, eg. ?\C-\C-a => 1.

3. Control-space yields NUL in strings but not as a char literal:
"\C-SPC" => "NUL"
"\^SPC"  => "NUL"
?\C-SPC => #x4000020
?\^SPC  => #x4000020

Emacs takes a conservative stance and normally only generates control 
characters from upper and lower case ASCII letters and the symbols ?@[\]^_ 
because that agrees with custom and suffices for all C0 controls. Since most 
terminals also map Control-SPC to NUL, it would be more consistent to do so in 
both string and character literals.

The first two bugs are straightforward to fix (I have a patch) and doing so is 
unlikely to cause any harm.
I honestly don't think making ?\C-SPC => 0 would either (because of how key 
binding words) but we should investigate further just in case.




--- End Message ---
--- Begin Message --- Subject: Re: bug#55738: character escape bugs in the reader Date: Tue, 5 Sep 2023 18:56:12 -0700
Mattias EngdegÄrd <mattiase@acm.org> writes:

> 18 juni 2022 kl. 08.54 skrev Stefan Kangas <stefankangas@gmail.com>:
>
>> I don't know what other style you have in mind, but feel free to fix
>> this to use a better style, if possible.
>
> Done, thank you for the reminder. Ideally we should try to do away with the 
> old
> TTY-centric coupling between Control-m, RET, 13, and the <return> key (etc) 
> but
> that's for another day.

I guess there's nothing more to do here, so I'm closing this bug.

Please reopen if I missed something.

Thanks.


--- End Message ---

reply via email to

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