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

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

[debbugs-tracker] bug#20655: closed (According to docs non-greedy regexp


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20655: closed (According to docs non-greedy regexp should work in guile but they don't)
Date: Thu, 23 Jun 2016 20:42:02 +0000

Your message dated Thu, 23 Jun 2016 22:41:47 +0200
with message-id <address@hidden>
and subject line Re: bug#20655: According to docs non-greedy regexp should work 
in guile but they don't
has caused the debbugs.gnu.org bug report #20655,
regarding According to docs non-greedy regexp should work in guile but they 
don't
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20655: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20655
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: According to docs non-greedy regexp should work in guile but they don't Date: Mon, 25 May 2015 23:58:53 +0200 User-agent: KMail/4.14.8 (Linux/4.0.4-1-ARCH; KDE/4.14.8; x86_64; ; )
Hi list,

the guile documentation under
https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html#index-regular-expressions
directly references Regular expressions used in Emacs which do
support non-greedy regexp.

However in the archive of the guile-devel ML I found a thread that seems
to indicate that guile simply does not support non-greedy regexp, which
is perfectly in line with my findings (see below).
The thread I'm referring to is found under
https://www.mail-archive.com/guile-devel%40gnu.org/msg12022.html

Testcase:
If non-greedy regexp do work the following two statements should provide
the exakt same strings:
(match:substring (string-match "_(.*?)_" "a_ä_ö_de_fü_") 1)
(match:substring (string-match "_([^_]*)_" "a_ä_ö_de_fü_") 1)

However for me they don't. Here is a log how I tested it:
$ guile
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (match:substring (string-match "_(.*?)_"
"a_ä_ö_de_fü_") 1)
$1 = "ä_ö_de_fü"
scheme@(guile-user)> (match:substring (string-match "_([^_]*)_"
"a_ä_ö_de_fü_") 1)
$2 = "ä"
scheme@(guile-user)> ,q

For the record:
I check the same regexp in Perl where they provide the same result.


AFAICT this is either misleading if not an outright documentation bug,
or a missing feature in guile.

Kind regards,
Michael
-- 
 Michael Gerdau       email: address@hidden
 GPG-keys available on request or at public keyserver

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message --- Subject: Re: bug#20655: According to docs non-greedy regexp should work in guile but they don't Date: Thu, 23 Jun 2016 22:41:47 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
On Mon 25 May 2015 23:58, Michael Gerdau <address@hidden> writes:

> the guile documentation under
> https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html#index-regular-expressions
> directly references Regular expressions used in Emacs which do
> support non-greedy regexp.
>
> However in the archive of the guile-devel ML I found a thread that seems
> to indicate that guile simply does not support non-greedy regexp, which
> is perfectly in line with my findings (see below).
>
> AFAICT this is either misleading if not an outright documentation bug,
> or a missing feature in guile.

A documentation bug indeed.  Fixed in git by Diogo Ramos.

Thanks for the report,

Andy


--- End Message ---

reply via email to

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