* bug#6743: Backslash regexp in Elisp manual
@ 2010-07-27 23:31 Arni Magnusson
2010-07-28 0:25 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Arni Magnusson @ 2010-07-27 23:31 UTC (permalink / raw)
To: 6743
The current version (23.2) of the Elisp manual
(http://www.gnu.org/software/emacs/manual/texi/elisp.texi.tar.gz) has a
minor typo in Section 34.3.1.1 Special Characters in Regular Expressions
(searching.texi) where
Therefore, the read syntax for a regular expression matching
@samp{\} is @code{"\\\\"}.
should be
Therefore, the read syntax for a regular expression matching
@samp{\\} is @code{"\\\\"}.
Arni
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#6743: Backslash regexp in Elisp manual
2010-07-27 23:31 bug#6743: Backslash regexp in Elisp manual Arni Magnusson
@ 2010-07-28 0:25 ` Juanma Barranquero
2010-07-28 2:54 ` Arni Magnusson
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2010-07-28 0:25 UTC (permalink / raw)
To: Arni Magnusson; +Cc: 6743
On Wed, Jul 28, 2010 at 01:31, Arni Magnusson <arnima@hafro.is> wrote:
> Therefore, the read syntax for a regular expression matching
> @samp{\} is @code{"\\\\"}.
>
> should be
>
> Therefore, the read syntax for a regular expression matching
> @samp{\\} is @code{"\\\\"}.
Why do you think so?
The section is talking about the read syntax. To match \, you need a
regexp with \\, and to write \\ in a string, you need \\\\.
Try
emacs -Q
\ <left>
M-: (looking-at "\\") <RET> => (invalid-regexp "Trailing backslash")
q
M-: (looking-at "\\\\") <RET> => t
Note that \\\\ is matching a single \ on the buffer, not \\
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#6743: Backslash regexp in Elisp manual
2010-07-28 0:25 ` Juanma Barranquero
@ 2010-07-28 2:54 ` Arni Magnusson
2010-07-28 2:58 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Arni Magnusson @ 2010-07-28 2:54 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 6743
[-- Attachment #1: Type: TEXT/PLAIN, Size: 828 bytes --]
Sorry, my mistake. The sentence is correct in the manual.
Arni
On Wed, 28 Jul 2010, Juanma Barranquero wrote:
> On Wed, Jul 28, 2010 at 01:31, Arni Magnusson <arnima@hafro.is> wrote:
>
>> Therefore, the read syntax for a regular expression matching
>> @samp{\} is @code{"\\\\"}.
>>
>> should be
>>
>> Therefore, the read syntax for a regular expression matching
>> @samp{\\} is @code{"\\\\"}.
>
> Why do you think so?
>
> The section is talking about the read syntax. To match \, you need a
> regexp with \\, and to write \\ in a string, you need \\\\.
>
> Try
>
> emacs -Q
> \ <left>
> M-: (looking-at "\\") <RET> => (invalid-regexp "Trailing backslash")
> q
> M-: (looking-at "\\\\") <RET> => t
>
> Note that \\\\ is matching a single \ on the buffer, not \\
>
> Juanma
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-28 2:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27 23:31 bug#6743: Backslash regexp in Elisp manual Arni Magnusson
2010-07-28 0:25 ` Juanma Barranquero
2010-07-28 2:54 ` Arni Magnusson
2010-07-28 2:58 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.