all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1108: 23.0.60; conversion bugs of rx.el
@ 2008-10-07 14:02 ` Shigeru Fukaya
  2008-10-07 18:15   ` bug#1108: marked as done (23.0.60; conversion bugs of rx.el) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Shigeru Fukaya @ 2008-10-07 14:02 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]

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

[-- Attachment #2: rx.tgz --]
[-- Type: application/x-gzip, Size: 18367 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#1108: marked as done (23.0.60; conversion bugs of rx.el)
  2008-10-07 14:02 ` bug#1108: 23.0.60; conversion bugs of rx.el Shigeru Fukaya
@ 2008-10-07 18:15   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2008-10-07 18:15 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]


Your message dated Tue, 07 Oct 2008 14:11:15 -0400
with message-id <87wsgk9sxo.fsf@cyd.mit.edu>
and subject line Re: 23.0.60; conversion bugs of rx.el
has caused the Emacs bug report #1108,
regarding 23.0.60; conversion bugs of rx.el
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1108: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1108
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 30138 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 2087 bytes --]

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

[-- Attachment #2.1.2: rx.tgz --]
[-- Type: application/x-gzip, Size: 18367 bytes --]

[-- Attachment #3: Type: message/rfc822, Size: 1158 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Shigeru Fukaya" <shigeru.fukaya@gmail.com>
Cc: 1108-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.60; conversion bugs of rx.el
Date: Tue, 07 Oct 2008 14:11:15 -0400
Message-ID: <87wsgk9sxo.fsf@cyd.mit.edu>

> 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-07 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87wsgk9sxo.fsf@cyd.mit.edu>
2008-10-07 14:02 ` bug#1108: 23.0.60; conversion bugs of rx.el Shigeru Fukaya
2008-10-07 18:15   ` bug#1108: marked as done (23.0.60; conversion bugs of rx.el) Emacs bug Tracking System

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.