GNU bug report logs - #1108
23.0.60; conversion bugs of rx.el

Previous Next

Package: emacs;

Reported by: "Shigeru Fukaya" <shigeru.fukaya <at> gmail.com>

Date: Tue, 7 Oct 2008 14:10:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Shigeru Fukaya" <shigeru.fukaya <at> gmail.com>
Subject: bug#1108 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re: 
 23.0.60; conversion bugs of rx.el)
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1108: 23.0.60; conversion bugs of rx.el

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
1108: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1108
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Shigeru Fukaya" <shigeru.fukaya <at> gmail.com>
Cc: 1108-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; conversion bugs of rx.el
Date: Tue, 07 Oct 2008 14:11:15 -0400
> rx.el of the latest Emacs (23.0.60) has several problems.  I fixed
> them and attach a tar file including the following.

Thanks for fixing the bugs.  Your changes look good; I've checked them
into CVS.

[Message part 3 (message/rfc822, inline)]
From: "Shigeru Fukaya" <shigeru.fukaya <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.0.60; conversion bugs of rx.el
Date: Tue, 7 Oct 2008 23:02:28 +0900
[Message part 4 (text/plain, inline)]
Hello,

rx.el of the latest Emacs (23.0.60) has several problems.
I fixed them and attach a tar file including the following.

   rx.diff     - diff file
   rx-new.el   - new replacement of rx.el (as many changes)
   rx-test.el  - for simple output of original and fixed
   RX.txt      - test output of mine (not by the above)
   Changelog

Fixed problems are as follows:


* (NOT CHAR-CLASS-SYMBOL) cause an error.

   (rx (not word))      => (error "rx `not' syntax error: word")
   (rx (not digit))     => (error "rx `not' syntax error: digit")


* "^" in ANY produce a unnecessary escape or incorrect result.

   (rx (any "^"))       => "[\\^]"
   (rx (not (any "^"))) => "[^\\^]"
   (rx (any ?^ ?a))     => "[\\^a]"
   (rx (any ?a ?^))     => "[a\\^]"


* "]", "-" in ANY produce incorrect result.

   (rx (any ?- ?a ?\]))			=> "[]-a]"
   (rx (any "--]"))	   => "[]--]"


* NOT-NOT-ANY produce incorrect result for special characters.

   (rx (not (not (any ".")))) => "."


* NOT-WORDCHAR is incorrectly treated as character class.
  NOT-WORDCHAR should not be defined as a character class.

   (rx (any ascii not-wordchar)) => "[[:ascii:]^[:word:]]"


* ANY accept syntax symbols and produce an senseless result.

   (rx (any symbol-start symbol-end))  => "[__]"
   (rx (any word-boundary))            => "[]"


* NOT-NOT to symbol produce an incorrect result.

   (rx (not (not word-boundary)))      => "[^\\B]"
   (rx (not (not (syntax word))))      => "[^\\Sw]"


* Rx produce unnecessary shy groups easily.

   (rx (or (and "a" "b") (and "b" "c"))) =>
				    "\\(?:\\(?:ab\\)\\|\\(?:bc\\)\\)"


* ANYTHING always produce shy groups even when unnecessary.

   (rx anything)	      => "\\(?:.\\|\n\\)"
   (rx (or anything "abc"))   => "\\(?:\\(?:.\\|\n\\)\\|abc\\)"


* NO-GROUP in `rx-to-string' doesn't work as documented, or is
  ambiguously defined.

   (rx-to-string "ab" t)               => "ab"
   (rx-to-string "ab" nil)             => "ab"
   (rx-to-string '(and "a" "b") t)     => "\\(?:ab\\)"
   (rx-to-string '(and "a" "b") nil)   => "\\(?:ab\\)"


Regards,
Shigeru
[rx.tgz (application/x-gzip, attachment)]

This bug report was last modified 16 years and 286 days ago.

Previous Next


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