GNU bug report logs - #6743
Backslash regexp in Elisp manual

Previous Next

Package: emacs;

Reported by: Arni Magnusson <arnima <at> hafro.is>

Date: Tue, 27 Jul 2010 23:33:01 UTC

Severity: normal

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6743 in the body.
You can then email your comments to 6743 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6743; Package emacs. (Tue, 27 Jul 2010 23:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arni Magnusson <arnima <at> hafro.is>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 27 Jul 2010 23:33:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arni Magnusson <arnima <at> hafro.is>
To: bug-gnu-emacs <at> gnu.org
Subject: Backslash regexp in Elisp manual
Date: Tue, 27 Jul 2010 23:31:30 +0000 (UTC)
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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6743; Package emacs. (Wed, 28 Jul 2010 00:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 6743 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arni Magnusson <arnima <at> hafro.is>
Cc: 6743 <at> debbugs.gnu.org
Subject: Re: bug#6743: Backslash regexp in Elisp manual
Date: Wed, 28 Jul 2010 02:25:35 +0200
On Wed, Jul 28, 2010 at 01:31, Arni Magnusson <arnima <at> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6743; Package emacs. (Wed, 28 Jul 2010 02:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 6743 <at> debbugs.gnu.org (full text, mbox):

From: Arni Magnusson <arnima <at> hafro.is>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 6743 <at> debbugs.gnu.org
Subject: Re: bug#6743: Backslash regexp in Elisp manual
Date: Wed, 28 Jul 2010 02:54:46 +0000 (GMT)
[Message part 1 (text/plain, inline)]
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 <at> 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
>

Reply sent to Juanma Barranquero <lekktu <at> gmail.com>:
You have taken responsibility. (Wed, 28 Jul 2010 02:59:02 GMT) Full text and rfc822 format available.

Notification sent to Arni Magnusson <arnima <at> hafro.is>:
bug acknowledged by developer. (Wed, 28 Jul 2010 02:59:02 GMT) Full text and rfc822 format available.

Message #16 received at 6743-done <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arni Magnusson <arnima <at> hafro.is>
Cc: 6743-done <at> debbugs.gnu.org
Subject: Re: bug#6743: Backslash regexp in Elisp manual
Date: Wed, 28 Jul 2010 04:58:17 +0200
> Sorry, my mistake. The sentence is correct in the manual.

Thanks for the report anyway.

    Juanma




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 25 Aug 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.