[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Raw" string literals for elisp
From: |
Stefan Monnier |
Subject: |
Re: "Raw" string literals for elisp |
Date: |
Wed, 08 Sep 2021 16:18:23 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I just think these are two separate dimensions which happen to align
> in the "regexp and backslash" case.
BTW, they can align in somewhat funny ways sometimes.
E.g. the raw-string version of the regexp "[ \t\n]" turns into something like
#r"[
]"
which is not ideal in terms of clarity. Similarly a regexp that matches
the NUL character will be problematic when written as a raw string
because it will need to embed the NUL character in the source code,
which in turn will cause tools like `grep` to treat the file as binary.
For the first problem above we can/should extend our regexp syntax to
include \t and \n as regexps that match TAB and LF respectively (that
would also be handy when writing regexps in the minibuffer).
But \0 is already used for other things so there's no such "obvious"
workaround for the second case :-(
Stefan
- Re: "Raw" string literals for elisp, (continued)
- Re: "Raw" string literals for elisp, Alan Mackenzie, 2021/09/08
- Re: "Raw" string literals for elisp, Philip Kaludercic, 2021/09/08
- Re: "Raw" string literals for elisp, Alan Mackenzie, 2021/09/08
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/08
- Re: "Raw" string literals for elisp, Philip Kaludercic, 2021/09/08
- Re: "Raw" string literals for elisp, tomas, 2021/09/09
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/08
- Re: "Raw" string literals for elisp, tomas, 2021/09/08
- Re: "Raw" string literals for elisp, Lars Ingebrigtsen, 2021/09/08
- Re: "Raw" string literals for elisp, Stefan Monnier, 2021/09/08
- Re: "Raw" string literals for elisp,
Stefan Monnier <=
- Re: "Raw" string literals for elisp, tomas, 2021/09/09
- Re: "Raw" string literals for elisp, Mattias EngdegÄrd, 2021/09/09
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/09
- Re: "Raw" string literals for elisp, Mattias EngdegÄrd, 2021/09/09
- Re: "Raw" string literals for elisp, tomas, 2021/09/09
- Re: "Raw" string literals for elisp, Augusto Stoffel, 2021/09/14
- Re: "Raw" string literals for elisp, Ihor Radchenko, 2021/09/14
- Re: "Raw" string literals for elisp, Stefan Monnier, 2021/09/14
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/14
- Re: "Raw" string literals for elisp, Ihor Radchenko, 2021/09/14