From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2019 09:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 37659@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157052741711407 (code B ref -1); Tue, 08 Oct 2019 09:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Oct 2019 09:36:57 +0000 Received: from localhost ([127.0.0.1]:49585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHlvM-0002xu-Sk for submit@debbugs.gnu.org; Tue, 08 Oct 2019 05:36:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:39283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHlvK-0002xm-JV for submit@debbugs.gnu.org; Tue, 08 Oct 2019 05:36:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37473) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHlvJ-0004tD-6q for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 05:36:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHlvI-0001nK-0N for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 05:36:52 -0400 Received: from mail214c50.megamailservers.eu ([91.136.10.224]:40234 helo=mail193c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHlvH-0001m0-A1 for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 05:36:51 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570527408; bh=zONrw5173hEmfGIqpfRHyBdUqcbly9I916GlHKhc+Y4=; h=From:Subject:Date:To:From; b=BsptC+ZurLVk+phdYoKPBtTCequOQKDXXyUZ3F+1saW6yv9RLGIWb6Ud2/fbryjPA 9sjKwkYlHNN2+9taprzrWjxYGGFrVfEmJq9wOqGNZNgi1TazMAFNEjH+MAdnp0oWXz 7CRpDfaEHbf5LVA0R95qbEBElNi9+XZ5/H3kiIy0= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x989ajQs002249 for ; Tue, 8 Oct 2019 09:36:47 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-Id: Date: Tue, 8 Oct 2019 11:36:44 +0200 X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0212.5D9C58B0.0006, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=b7vMHeOx c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=M51BFTxLslgA:10 a=9lzXkryqxNDBGJw50dcA:9 a=CjuIK1q_8ugA:10 a=Tu2DVULvuFSytnuRUwkA:9 a=B2y7HmGcmWMA:10 a=6CYVNyq5QJvP7n3JsKEA:9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.136.10.224 X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Three minor rx additions follow: * Add `anychar' as an alias for `anything': the latter suggests an = expression that can match any string, while in reality it only matches a = single character. The documentation now uses `anychar' as the preferred = name. (`any-char' would also be possible, but is longer.) * Add `unmatchable' for a never-match regexp. This follows the = previously introduced variable `regexp-unmatchable'. * Add `unordered-or' as a variant of `or' without the left-to-right = match order guarantee. It allows unconditional regexp-opt optimisations, = and is particularly useful for matching sets of keywords. With rx-let = and rx-define, it also has the potential for better compositionality, = allowing expressions to be put together from smaller parts. Abstractly: while `or' is associative, `unordered-or' is also = commutative. The name `unordered-or' is descriptive but phonetically (and lexically) = somewhat weak. Strong alternatives welcome. --Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1 Content-Disposition: attachment; filename=0001-Add-anychar-as-alias-to-anything-in-rx.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-anychar-as-alias-to-anything-in-rx.patch" Content-Transfer-Encoding: quoted-printable =46rom=200b79693cdace549a8d6edda58cea20232d82faec=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=207=20Oct=202019=2018:07:16=20+0200=0A= Subject:=20[PATCH=201/3]=20Add=20`anychar'=20as=20alias=20to=20= `anything'=20in=20rx=0A=0A*=20lisp/emacs-lisp/rx.el=20= (rx--translate-symbol,=20rx--builtin-symbols,=20rx):=0A*=20= test/lisp/emacs-lisp/rx-tests.el=20(rx-atoms):=0A*=20= doc/lispref/searching.texi=20(Rx=20Constructs):=0A*=20etc/NEWS:=0AAdd=20= `anychar',=20an=20alias=20for=20`anything'.=20=20Since=20`anychar'=20is=20= more=0Adescriptive=20(and=20slightly=20shorter),=20treat=20it=20as=20the=20= preferred=20name.=0A---=0A=20doc/lispref/searching.texi=20=20=20=20=20=20= =20|=203=20++-=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20|=204=20++++=0A=20lisp/emacs-lisp/rx.el=20=20= =20=20=20=20=20=20=20=20=20=20|=207=20+++----=0A=20= test/lisp/emacs-lisp/rx-tests.el=20|=204=20++--=0A=204=20files=20= changed,=2011=20insertions(+),=207=20deletions(-)=0A=0Adiff=20--git=20= a/doc/lispref/searching.texi=20b/doc/lispref/searching.texi=0Aindex=20= a4b6533412..2274bab002=20100644=0A---=20a/doc/lispref/searching.texi=0A= +++=20b/doc/lispref/searching.texi=0A@@=20-1220,7=20+1220,8=20@@=20Rx=20= Constructs=0A=20Match=20any=20character=20except=20a=20newline.@*=0A=20= Corresponding=20string=20regexp:=20@samp{.}=20(dot)=0A=20=0A-@item=20= @code{anything}=0A+@item=20@code{anychar},=20@code{anything}=0A+@cindex=20= @code{anychar}=20in=20rx=0A=20@cindex=20@code{anything}=20in=20rx=0A=20= Match=20any=20character.@*=0A=20Corresponding=20string=20regexp:=20= @samp{.\|\n}=20(for=20example)=0Adiff=20--git=20a/etc/NEWS=20b/etc/NEWS=0A= index=20906dc912d6..0fea5164a7=20100644=0A---=20a/etc/NEWS=0A+++=20= b/etc/NEWS=0A@@=20-1795,6=20+1795,10=20@@=20at=20run=20time,=20instead=20= of=20a=20constant=20string.=0A=20***=20New=20rx=20extension=20mechanism:=20= 'rx-define',=20'rx-let',=20'rx-let-eval'.=0A=20These=20macros=20add=20= new=20forms=20to=20the=20rx=20notation.=0A=20=0A++++=0A+***=20'anychar'=20= is=20now=20an=20alias=20for=20'anything'=0A+Both=20match=20any=20single=20= character;=20'anychar'=20is=20more=20descriptive.=0A+=0A=20**=20Frames=0A= =20=0A=20+++=0Adiff=20--git=20a/lisp/emacs-lisp/rx.el=20= b/lisp/emacs-lisp/rx.el=0Aindex=2045fec796cc..6c0b206930=20100644=0A---=20= a/lisp/emacs-lisp/rx.el=0A+++=20b/lisp/emacs-lisp/rx.el=0A@@=20-126,7=20= +126,6=20@@=20rx--lookup-def=0A=20=20=20=20=20=20=20(get=20name=20= 'rx-definition)))=0A=20=0A=20;;=20TODO:=20Additions=20to=20consider:=0A= -;;=20-=20A=20better=20name=20for=20`anything',=20like=20`any-char'=20or=20= `anychar'.=0A=20;;=20-=20A=20name=20for=20(or),=20maybe=20`unmatchable'.=0A= =20;;=20-=20A=20construct=20like=20`or'=20but=20without=20the=20match=20= order=20guarantee,=0A=20;;=20=20=20maybe=20`unordered-or'.=20=20Useful=20= for=20composition=20or=20generation=20of=0A@@=20-138,7=20+137,7=20@@=20= rx--translate-symbol=0A=20=20=20=20=20;;=20Use=20`list'=20instead=20of=20= a=20quoted=20list=20to=20wrap=20the=20strings=20here,=0A=20=20=20=20=20= ;;=20since=20the=20return=20value=20may=20be=20mutated.=0A=20=20=20=20=20= ((or=20'nonl=20'not-newline=20'any)=20(cons=20(list=20".")=20t))=0A-=20=20= =20=20('anything=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(rx--translate-form=20'(or=20nonl=20"\n")))=0A+=20=20=20=20((or=20= 'anychar=20'anything)=20=20=20=20=20=20(rx--translate-form=20'(or=20nonl=20= "\n")))=0A=20=20=20=20=20((or=20'bol=20'line-start)=20=20=20=20=20=20=20=20= (cons=20(list=20"^")=20'lseq))=0A=20=20=20=20=20((or=20'eol=20'line-end)=20= =20=20=20=20=20=20=20=20=20(cons=20(list=20"$")=20'rseq))=0A=20=20=20=20=20= ((or=20'bos=20'string-start=20'bot=20'buffer-start)=20(cons=20(list=20= "\\`")=20t))=0A@@=20-913,7=20+912,7=20@@=20rx--builtin-forms=0A=20=20=20= "List=20of=20built-in=20rx=20function-like=20symbols.")=0A=20=0A=20= (defconst=20rx--builtin-symbols=0A-=20=20(append=20'(nonl=20not-newline=20= any=20anything=0A+=20=20(append=20'(nonl=20not-newline=20any=20anychar=20= anything=0A=20=20=20=20=20=20=20=20=20=20=20=20=20bol=20eol=20line-start=20= line-end=0A=20=20=20=20=20=20=20=20=20=20=20=20=20bos=20eos=20= string-start=20string-end=0A=20=20=20=20=20=20=20=20=20=20=20=20=20bow=20= eow=20word-start=20word-end=0A@@=20-1016,7=20+1015,7=20@@=20rx=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20can=20be=20(any=20...),=20= (syntax=20...),=20(category=20...),=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20or=20a=20character=20class.=0A=20not-newline=20=20=20=20=20= Match=20any=20character=20except=20a=20newline.=20=20Alias:=20nonl.=0A= -anything=20=20=20=20=20=20=20=20Match=20any=20character.=0A+anychar=20=20= =20=20=20=20=20=20=20Match=20any=20character.=20=20Alias:=20anything.=0A=20= =0A=20CHARCLASS=20=20=20=20=20=20=20Match=20a=20character=20from=20a=20= character=20class.=20=20One=20of:=0A=20=20alpha,=20alphabetic,=20letter=20= =20=20Alphabetic=20characters=20(defined=20by=20Unicode).=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=2076dcf41942..d4524e5a25=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-184,8=20+184,8=20@@=20= rx-repeat=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "ab")))=0A=20=0A=20(ert-deftest=20rx-atoms=20()=0A-=20=20(should=20= (equal=20(rx=20anything)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20".\\|\n"))=0A+=20=20(should=20(equal=20(rx=20anychar=20anything)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\(?:.\\|\n\\)\\(?:.\\|\n\\)"))=0A=20=20=20(should=20(equal=20(rx=20= line-start=20not-newline=20nonl=20any=20line-end)=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20"^...$"))=0A=20=20=20(should=20(equal=20= (rx=20bol=20string-start=20string-end=20buffer-start=20buffer-end=0A--=20= =0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1 Content-Disposition: attachment; filename=0002-Add-unmatchable-as-alias-for-or-in-rx.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Add-unmatchable-as-alias-for-or-in-rx.patch" Content-Transfer-Encoding: quoted-printable =46rom=206ad34bf9aa86aee6539851366c5267fa8a72d929=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=207=20Oct=202019=2018:28:18=20+0200=0A= Subject:=20[PATCH=202/3]=20Add=20`unmatchable'=20as=20alias=20for=20(or)=20= in=20rx=0A=0A*=20lisp/emacs-lisp/rx.el=20(rx--translate-symbol,=20= rx--builtin-symbols,=20rx):=0A*=20test/lisp/emacs-lisp/rx-tests.el=20= (rx-atoms):=0A*=20doc/lispref/searching.texi=20(Rx=20Constructs):=0A*=20= etc/NEWS:=0AAdd=20`unmatchable',=20more=20descriptive=20than=20(or),=20= and=20corresponding=20to=0Athe=20variable=20`regexp-unmatchable'.=0A---=0A= =20doc/lispref/searching.texi=20=20=20=20=20=20=20|=206=20++++++=0A=20= etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=201=20+=0A=20lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20= =20=20|=205=20+++--=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=202=20++=0A= =204=20files=20changed,=2012=20insertions(+),=202=20deletions(-)=0A=0A= diff=20--git=20a/doc/lispref/searching.texi=20= b/doc/lispref/searching.texi=0Aindex=202274bab002..a6c6bf2d4a=20100644=0A= ---=20a/doc/lispref/searching.texi=0A+++=20b/doc/lispref/searching.texi=0A= @@=20-1083,6=20+1083,11=20@@=20Rx=20Constructs=0A=20Match=20exactly=20= one=20of=20the=20@var{rx}s,=20trying=20from=20left=20to=20right.=0A=20= Without=20arguments,=20the=20expression=20will=20not=20match=20anything=20= at=20all.@*=0A=20Corresponding=20string=20regexp:=20= @samp{@var{A}\|@var{B}\|@dots{}}.=0A+=0A+@item=20@code{unmatchable}=0A= +@cindex=20@code{unmatchable}=20in=20rx=0A+Refuse=20any=20match.=20=20= Equivalent=20to=20@code{(or)}.=0A+@xref{regexp-unmatchable}.=0A=20@end=20= table=0A=20=0A=20@subsubheading=20Repetition=0A@@=20-1806,6=20+1811,7=20= @@=20Regexp=20Functions=0A=20=0A=20@c=20Internal=20functions:=20= regexp-opt-group=0A=20=0A+@anchor{regexp-unmatchable}=0A=20@defvar=20= regexp-unmatchable=0A=20This=20variable=20contains=20a=20regexp=20that=20= is=20guaranteed=20not=20to=20match=20any=0A=20string=20at=20all.=20=20It=20= is=20particularly=20useful=20as=20default=20value=20for=0Adiff=20--git=20= a/etc/NEWS=20b/etc/NEWS=0Aindex=200fea5164a7..96c26c6623=20100644=0A---=20= a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-1785,6=20+1785,7=20@@=20the=20= 128...255=20range,=20as=20expected.=0A=20matches=20the=20empty=20string,=20= each=20being=20an=20identity=20for=20the=20operation.=0A=20This=20also=20= works=20for=20their=20aliases:=20'|'=20for=20'or';=20':',=20'and'=20and=0A= =20'sequence'=20for=20'seq'.=0A+The=20symbol=20'unmatchable'=20can=20be=20= used=20as=20an=20alternative=20to=20(or).=0A=20=0A=20---=0A=20***=20= 'regexp'=20and=20new=20'literal'=20accept=20arbitrary=20lisp=20as=20= arguments.=0Adiff=20--git=20a/lisp/emacs-lisp/rx.el=20= b/lisp/emacs-lisp/rx.el=0Aindex=206c0b206930..cf02df239f=20100644=0A---=20= a/lisp/emacs-lisp/rx.el=0A+++=20b/lisp/emacs-lisp/rx.el=0A@@=20-126,7=20= +126,6=20@@=20rx--lookup-def=0A=20=20=20=20=20=20=20(get=20name=20= 'rx-definition)))=0A=20=0A=20;;=20TODO:=20Additions=20to=20consider:=0A= -;;=20-=20A=20name=20for=20(or),=20maybe=20`unmatchable'.=0A=20;;=20-=20= A=20construct=20like=20`or'=20but=20without=20the=20match=20order=20= guarantee,=0A=20;;=20=20=20maybe=20`unordered-or'.=20=20Useful=20for=20= composition=20or=20generation=20of=0A=20;;=20=20=20alternatives;=20= permits=20more=20effective=20use=20of=20regexp-opt.=0A@@=20-138,6=20= +137,7=20@@=20rx--translate-symbol=0A=20=20=20=20=20;;=20since=20the=20= return=20value=20may=20be=20mutated.=0A=20=20=20=20=20((or=20'nonl=20= 'not-newline=20'any)=20(cons=20(list=20".")=20t))=0A=20=20=20=20=20((or=20= 'anychar=20'anything)=20=20=20=20=20=20(rx--translate-form=20'(or=20nonl=20= "\n")))=0A+=20=20=20=20('unmatchable=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(rx--empty))=0A=20=20=20=20=20((or=20'bol=20'line-start)=20=20= =20=20=20=20=20=20(cons=20(list=20"^")=20'lseq))=0A=20=20=20=20=20((or=20= 'eol=20'line-end)=20=20=20=20=20=20=20=20=20=20(cons=20(list=20"$")=20= 'rseq))=0A=20=20=20=20=20((or=20'bos=20'string-start=20'bot=20= 'buffer-start)=20(cons=20(list=20"\\`")=20t))=0A@@=20-912,7=20+912,7=20= @@=20rx--builtin-forms=0A=20=20=20"List=20of=20built-in=20rx=20= function-like=20symbols.")=0A=20=0A=20(defconst=20rx--builtin-symbols=0A= -=20=20(append=20'(nonl=20not-newline=20any=20anychar=20anything=0A+=20=20= (append=20'(nonl=20not-newline=20any=20anychar=20anything=20unmatchable=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20bol=20eol=20line-start=20line-end=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20bos=20eos=20string-start=20= string-end=0A=20=20=20=20=20=20=20=20=20=20=20=20=20bow=20eow=20= word-start=20word-end=0A@@=20-1016,6=20+1016,7=20@@=20rx=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20or=20a=20character=20class.=0A=20= not-newline=20=20=20=20=20Match=20any=20character=20except=20a=20= newline.=20=20Alias:=20nonl.=0A=20anychar=20=20=20=20=20=20=20=20=20= Match=20any=20character.=20=20Alias:=20anything.=0A+unmatchable=20=20=20=20= =20Never=20match=20anything=20at=20all.=0A=20=0A=20CHARCLASS=20=20=20=20=20= =20=20Match=20a=20character=20from=20a=20character=20class.=20=20One=20= of:=0A=20=20alpha,=20alphabetic,=20letter=20=20=20Alphabetic=20= characters=20(defined=20by=20Unicode).=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=20d4524e5a25..903b191c98=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-186,6=20+186,8=20@@=20= rx-repeat=0A=20(ert-deftest=20rx-atoms=20()=0A=20=20=20(should=20(equal=20= (rx=20anychar=20anything)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"\\(?:.\\|\n\\)\\(?:.\\|\n\\)"))=0A+=20=20(should=20(equal=20= (rx=20unmatchable)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\`a\\`"))=0A=20=20=20(should=20(equal=20(rx=20line-start=20not-newline=20= nonl=20any=20line-end)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20"^...$"))=0A=20=20=20(should=20(equal=20(rx=20bol=20string-start=20= string-end=20buffer-start=20buffer-end=0A--=20=0A2.21.0=20(Apple=20= Git-122)=0A=0A= --Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1 Content-Disposition: attachment; filename=0003-Add-rx-unordered-or-construct.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-Add-rx-unordered-or-construct.patch" Content-Transfer-Encoding: quoted-printable =46rom=2055bbcccf26e95bcb69a27431d72a802b7e457a75=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=207=20Oct=202019=2019:39:08=20+0200=0A= Subject:=20[PATCH=203/3]=20Add=20rx=20`unordered-or'=20construct=0A=0A*=20= lisp/emacs-lisp/rx.el=20(rx--translate-or,=20rx--translate-form)=0A= (rx--builting-forms,=20rx):=0A*=20test/lisp/emacs-lisp/rx-tests.el=20= (rx-unordered-or):=0A*=20doc/lispref/searching.texi=20(Rx=20Constructs):=0A= *=20etc/NEWS:=0AAdd=20`unordered-or',=20like=20`or'=20but=20with=20= unconstrained=20matching=20order.=0A---=0A=20doc/lispref/searching.texi=20= =20=20=20=20=20=20|=20=208=20++++++++=0A=20etc/NEWS=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=205=20+++++=0A=20= lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=2016=20= +++++++---------=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=20=208=20= ++++++++=0A=204=20files=20changed,=2028=20insertions(+),=209=20= deletions(-)=0A=0Adiff=20--git=20a/doc/lispref/searching.texi=20= b/doc/lispref/searching.texi=0Aindex=20a6c6bf2d4a..faeedc5978=20100644=0A= ---=20a/doc/lispref/searching.texi=0A+++=20b/doc/lispref/searching.texi=0A= @@=20-1084,6=20+1084,13=20@@=20Rx=20Constructs=0A=20Without=20arguments,=20= the=20expression=20will=20not=20match=20anything=20at=20all.@*=0A=20= Corresponding=20string=20regexp:=20@samp{@var{A}\|@var{B}\|@dots{}}.=0A=20= =0A+@item=20@code{(unordered-or=20@var{rx}@dots{})}=0A+@cindex=20= @code{unordered-or}=20in=20rx=0A+Like=20@code{or},=20but=20with=20= unspecified=20matching=20order.=0A+This=20may=20be=20more=20efficient=20= when=20the=20order=20doesn't=20matter,=0A+in=20particular=20if=20all=20= subforms=20are=20string=20literals.=0A+@xref{regexp-opt}.=0A+=0A=20@item=20= @code{unmatchable}=0A=20@cindex=20@code{unmatchable}=20in=20rx=0A=20= Refuse=20any=20match.=20=20Equivalent=20to=20@code{(or)}.=0A@@=20-1728,6=20= +1735,7=20@@=20Regexp=20Functions=0A=20any=20special=20characters.=0A=20= @end=20defun=0A=20=0A+@anchor{regexp-opt}=0A=20@cindex=20optimize=20= regexp=0A=20@defun=20regexp-opt=20strings=20&optional=20paren=20= keep-order=0A=20This=20function=20returns=20an=20efficient=20regular=20= expression=20that=20will=20match=0Adiff=20--git=20a/etc/NEWS=20= b/etc/NEWS=0Aindex=2096c26c6623..cf3ef8183b=20100644=0A---=20a/etc/NEWS=0A= +++=20b/etc/NEWS=0A@@=20-1800,6=20+1800,11=20@@=20These=20macros=20add=20= new=20forms=20to=20the=20rx=20notation.=0A=20***=20'anychar'=20is=20now=20= an=20alias=20for=20'anything'=0A=20Both=20match=20any=20single=20= character;=20'anychar'=20is=20more=20descriptive.=0A=20=0A++++=0A+***=20= New=20'unordered-or'=20rx=20construct=0A+It=20works=20like=20'or',=20but=20= with=20unspecified=20matching=20order.=20=20It=20may=20be=0A+faster=20in=20= some=20cases,=20especially=20when=20the=20clauses=20are=20string=20= literals.=0A+=0A=20**=20Frames=0A=20=0A=20+++=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= cf02df239f..0b14144698=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-125,11=20+125,6=20@@=20rx--lookup-def=0A=20= =20=20(or=20(cdr=20(assq=20name=20rx--local-definitions))=0A=20=20=20=20=20= =20=20(get=20name=20'rx-definition)))=0A=20=0A-;;=20TODO:=20Additions=20= to=20consider:=0A-;;=20-=20A=20construct=20like=20`or'=20but=20without=20= the=20match=20order=20guarantee,=0A-;;=20=20=20maybe=20`unordered-or'.=20= =20Useful=20for=20composition=20or=20generation=20of=0A-;;=20=20=20= alternatives;=20permits=20more=20effective=20use=20of=20regexp-opt.=0A-=0A= =20(defun=20rx--translate-symbol=20(sym)=0A=20=20=20"Translate=20an=20rx=20= symbol.=20=20Return=20(REGEXP=20.=20PRECEDENCE)."=0A=20=20=20(pcase=20= sym=0A@@=20-230,8=20+225,9=20@@=20rx--every=0A=20=20=20=20=20(setq=20= list=20(cdr=20list)))=0A=20=20=20(null=20list))=0A=20=0A-(defun=20= rx--translate-or=20(body)=0A+(defun=20rx--translate-or=20(body=20= unordered)=0A=20=20=20"Translate=20an=20or-pattern=20of=20one=20of=20= more=20rx=20items.=0A+If=20UNORDERED,=20then=20matching=20order=20is=20= unspecified.=0A=20Return=20(REGEXP=20.=20PRECEDENCE)."=0A=20=20=20;;=20= FIXME:=20Possible=20improvements:=0A=20=20=20;;=0A@@=20-268,7=20+264,7=20= @@=20rx--translate-or=0A=20=20=20=20((null=20(cdr=20body))=20=20=20=20=20= =20=20=20=20=20=20=20=20=20;=20Single=20item.=0A=20=20=20=20=20= (rx--translate=20(car=20body)))=0A=20=20=20=20((rx--every=20#'stringp=20= body)=20=20=20=20=20;=20All=20strings.=0A-=20=20=20=20(cons=20(list=20= (regexp-opt=20body=20nil=20t))=0A+=20=20=20=20(cons=20(list=20= (regexp-opt=20body=20nil=20(not=20unordered)))=0A=20=20=20=20=20=20=20=20= =20=20=20t))=0A=20=20=20=20(t=0A=20=20=20=20=20(cons=20(append=20(car=20= (rx--translate=20(car=20body)))=0A@@=20-835,7=20+831,8=20@@=20= rx--translate-form=0A=20=20=20(let=20((body=20(cdr=20form)))=0A=20=20=20=20= =20(pcase=20(car=20form)=0A=20=20=20=20=20=20=20((or=20'seq=20:=20'and=20= 'sequence)=20(rx--translate-seq=20body))=0A-=20=20=20=20=20=20((or=20'or=20= '|)=20=20=20=20=20=20=20=20=20=20=20=20=20=20(rx--translate-or=20body))=0A= +=20=20=20=20=20=20((or=20'or=20'|)=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(rx--translate-or=20body=20nil))=0A+=20=20=20=20=20=20((or=20= 'unordered-or)=20=20=20=20=20=20=20(rx--translate-or=20body=20t))=0A=20=20= =20=20=20=20=20((or=20'any=20'in=20'char)=20=20=20=20=20=20= (rx--translate-any=20nil=20body))=0A=20=20=20=20=20=20=20('not-char=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(rx--translate-any=20t=20= body))=0A=20=20=20=20=20=20=20('not=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(rx--translate-not=20nil=20body))=0A@@=20-899,7=20= +896,7=20@@=20rx--translate-form=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(error=20"Unknown=20rx=20form=20`%s'"=20op)))))))))=0A=20=0A=20= (defconst=20rx--builtin-forms=0A-=20=20'(seq=20sequence=20:=20and=20or=20= |=20any=20in=20char=20not-char=20not=0A+=20=20'(seq=20sequence=20:=20and=20= or=20|=20unordered-or=20any=20in=20char=20not-char=20not=0A=20=20=20=20=20= repeat=20=3D=20>=3D=20**=0A=20=20=20=20=20zero-or-more=200+=20*=0A=20=20=20= =20=20one-or-more=201+=20+=0A@@=20-990,6=20+987,7=20@@=20rx=0A=20=0A=20= (seq=20RX...)=20=20=20=20Match=20the=20RXs=20in=20sequence.=20=20Alias:=20= :,=20sequence,=20and.=0A=20(or=20RX...)=20=20=20=20=20Match=20one=20of=20= the=20RXs.=20=20Alias:=20|.=0A+(unordered-or=20RX...)=20Match=20one=20of=20= the=20RXs,=20in=20unspecified=20order.=0A=20=0A=20(zero-or-more=20RX...)=20= Match=20RXs=20zero=20or=20more=20times.=20=20Alias:=200+.=0A=20= (one-or-more=20RX...)=20=20Match=20RXs=20one=20or=20more=20times.=20=20= Alias:=201+.=0Adiff=20--git=20a/test/lisp/emacs-lisp/rx-tests.el=20= b/test/lisp/emacs-lisp/rx-tests.el=0Aindex=20903b191c98..bced74569f=20= 100644=0A---=20a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-49,6=20+49,14=20@@=20rx-or=0A=20= =20=20(should=20(equal=20(rx=20(|))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"\\`a\\`")))=0A=20=0A+(ert-deftest=20rx-unordered-or=20= ()=0A+=20=20(should=20(equal=20(rx=20(unordered-or=20"ab"=20nonl=20= "cd"))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "ab\\|.\\|cd"))=0A+=20=20(should=20(equal=20(rx=20(unordered-or=20"ab"=20= "abc"=20"a"))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\(?:a\\(?:bc?\\)?\\)"))=0A+=20=20(should=20(equal=20(rx=20= (unordered-or))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\`a\\`")))=0A+=0A=20(ert-deftest=20rx-char-any=20()=0A=20=20=20"Test=20= character=20alternatives=20with=20`]'=20and=20`-'=20(Bug#25123)."=0A=20=20= =20(should=20(equal=0A--=20=0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_B90F51FF-B081-438E-9859-64846A71F9D1-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 08 06:24:53 2019 Received: (at control) by debbugs.gnu.org; 8 Oct 2019 10:24:53 +0000 Received: from localhost ([127.0.0.1]:49612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHmfk-00048F-VW for submit@debbugs.gnu.org; Tue, 08 Oct 2019 06:24:53 -0400 Received: from mail214c50.megamailservers.eu ([91.136.10.224]:52690 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHmfh-000482-DU for control@debbugs.gnu.org; Tue, 08 Oct 2019 06:24:51 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570530286; bh=31rK5tdS8Z3kvDoofX2JCGu/wgZrbvS9P9jL1MGzy74=; h=From:Subject:Date:To:From; b=Sf0IdjeC43lpxBJLHROkYN5SoyMdQh9924TX27XBZGLHV2IknlxGnD6wxImGP8UUq j+2NhW9ralitNwg471qHGBZXHD0LVM1JsCQCbhTdtebz8kjbvrhKLumiq0j9p/ah99 n/tVN1hmVzdQN5zDSoArKrfX4U5OOClsiySVu7g8= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x98AOidN003786 for ; Tue, 8 Oct 2019 10:24:46 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: tags Message-Id: <9CDD6CBB-E1C9-415E-95B7-4ABD7B55D7B8@acm.org> Date: Tue, 8 Oct 2019 12:24:44 +0200 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020B.5D9C63EE.005B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=b7vMHeOx c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=GGu1X8TFeo5Smh8xjScA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 37659 patch stop From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or References: In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2019 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157061159412242 (code B ref 37659); Wed, 09 Oct 2019 09:00:02 +0000 Received: (at 37659) by debbugs.gnu.org; 9 Oct 2019 08:59:54 +0000 Received: from localhost ([127.0.0.1]:52130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI7p3-0003BO-N5 for submit@debbugs.gnu.org; Wed, 09 Oct 2019 04:59:53 -0400 Received: from mail239c50.megamailservers.eu ([91.136.10.249]:58508 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI7p0-0003BE-PB for 37659@debbugs.gnu.org; Wed, 09 Oct 2019 04:59:52 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570611588; bh=8OatQhlrNY0RGT7KkegWzZRqEZPO19P6xjPIYlIms7o=; h=From:Subject:Date:To:From; b=JsYxHLDNramIXXtA8Zc3npeiGRbg65nWydmLCHWBf40k+4rKbJbir1zwwgU97gb5N cQngR6AxZQ0ArPuzYeyrEtM/kVZpxqViVFlUwZfcnKLR2/cAE3M56cEAM8S4AM83mz ocM0SmGt20Ml008zosU62Dkmk8MXAAsyTqUZaSTc= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x998xh03009167 for <37659@debbugs.gnu.org>; Wed, 9 Oct 2019 08:59:48 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_3B02A38C-4C65-4D55-81B5-62C49B99F18A" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-Id: <7926BA83-93AB-47A5-875E-229BE7192874@acm.org> Date: Wed, 9 Oct 2019 10:59:43 +0200 X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020C.5D9DA184.005D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=V9gDLtvi c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=M51BFTxLslgA:10 a=yfByiC1x32EFdN7T0pwA:9 a=CjuIK1q_8ugA:10 a=NEe33fA4q6k3_J40bDIA:9 a=B2y7HmGcmWMA:10 a=pHzHmUro8NiASowvMSCR:22 a=6VlIyEUom7LUIeUMNQJH:22 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_3B02A38C-4C65-4D55-81B5-62C49B99F18A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Also consider changing the rendition of anychar/anything from ".\\|\n" = to "[^z-a]", which is faster and does not allocate stack space. = Previously, (* anything) wouldn't match large strings. --Apple-Mail=_3B02A38C-4C65-4D55-81B5-62C49B99F18A Content-Disposition: attachment; filename=0004-Use-z-a-for-matching-any-character-anychar-anything-.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-Use-z-a-for-matching-any-character-anychar-anything-.patch" Content-Transfer-Encoding: quoted-printable =46rom=20c72633774b375eaadd6117eb0b26fb9792fed1bd=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=209=20Oct=202019=2010:22:10=20+0200=0A= Subject:=20[PATCH=204/4]=20Use=20[^z-a]=20for=20matching=20any=20= character=20(anychar/anything)=0A=20in=20rx=0AMIME-Version:=201.0=0A= Content-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0A*=20lisp/emacs-lisp/rx.el=20= (rx--translate-symbol):=0A*=20test/lisp/emacs-lisp/rx-tests.el=20= (rx-any,=20rx-atoms):=0AUse=20[^z-a]=20instead=20of=20".\\|\n"=20for=20= anychar.=0A=0AThe=20new=20expression=20is=20faster=20(about=202=C3=97)=20= and=20does=20not=20allocate=20regexp=0Astack=20space.=20=20For=20= example,=20(0+=20anychar)=20now=20matches=20strings=20of=20any=0Asize.=0A= ---=0A=20lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=202=20= +-=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=206=20+++---=0A=202=20files=20= changed,=204=20insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= 0b14144698..2f58033ffd=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-131,7=20+131,7=20@@=20= rx--translate-symbol=0A=20=20=20=20=20;;=20Use=20`list'=20instead=20of=20= a=20quoted=20list=20to=20wrap=20the=20strings=20here,=0A=20=20=20=20=20= ;;=20since=20the=20return=20value=20may=20be=20mutated.=0A=20=20=20=20=20= ((or=20'nonl=20'not-newline=20'any)=20(cons=20(list=20".")=20t))=0A-=20=20= =20=20((or=20'anychar=20'anything)=20=20=20=20=20=20(rx--translate-form=20= '(or=20nonl=20"\n")))=0A+=20=20=20=20((or=20'anychar=20'anything)=20=20=20= =20=20=20(cons=20(list=20"[^z-a]")=20t))=0A=20=20=20=20=20('unmatchable=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(rx--empty))=0A=20=20=20=20= =20((or=20'bol=20'line-start)=20=20=20=20=20=20=20=20(cons=20(list=20= "^")=20'lseq))=0A=20=20=20=20=20((or=20'eol=20'line-end)=20=20=20=20=20=20= =20=20=20=20(cons=20(list=20"$")=20'rseq))=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=20bced74569f..a098784a85=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-134,9=20+134,9=20@@=20rx-any=0A= =20=20=20(should=20(equal=20(rx=20(not=20(any=20"!a"=20"0-8"=20digit=20= nonascii)))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "[^!0-8a[:digit:][:nonascii:]]"))=0A=20=20=20(should=20(equal=20(rx=20= (any)=20(not=20(any)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20"\\`a\\`\\(?:.\\|\n\\)"))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"\\`a\\`[^z-a]"))=0A=20=20=20(should=20(equal=20(rx=20(any=20= "")=20(not=20(any=20"")))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20"\\`a\\`\\(?:.\\|\n\\)")))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20"\\`a\\`[^z-a]")))=0A=20=0A=20(ert-deftest=20rx-pcase=20()=0A= =20=20=20(should=20(equal=20(pcase=20"a=201=202=203=201=201=20b"=0A@@=20= -193,7=20+193,7=20@@=20rx-repeat=0A=20=0A=20(ert-deftest=20rx-atoms=20()=0A= =20=20=20(should=20(equal=20(rx=20anychar=20anything)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20"\\(?:.\\|\n\\)\\(?:.\\|\n\\)"))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"[^z-a][^z-a]"))=0A=20=20=20= (should=20(equal=20(rx=20unmatchable)=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20"\\`a\\`"))=0A=20=20=20(should=20(equal=20(rx=20= line-start=20not-newline=20nonl=20any=20line-end)=0A--=20=0A2.21.0=20= (Apple=20Git-122)=0A=0A= --Apple-Mail=_3B02A38C-4C65-4D55-81B5-62C49B99F18A-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= acm.org> References: In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2019 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157083525622341 (code B ref 37659); Fri, 11 Oct 2019 23:08:02 +0000 Received: (at 37659) by debbugs.gnu.org; 11 Oct 2019 23:07:36 +0000 Received: from localhost ([127.0.0.1]:60497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ40V-0005oH-LU for submit@debbugs.gnu.org; Fri, 11 Oct 2019 19:07:35 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ40T-0005o0-6l for 37659@debbugs.gnu.org; Fri, 11 Oct 2019 19:07:34 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DB625160661; Fri, 11 Oct 2019 16:07:26 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Cyai6ERHVWge; Fri, 11 Oct 2019 16:07:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3F595160662; Fri, 11 Oct 2019 16:07:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ts_AVZHn4j4n; Fri, 11 Oct 2019 16:07:26 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2535F160661; Fri, 11 Oct 2019 16:07:26 -0700 (PDT) From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Fri, 11 Oct 2019 16:07:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Thanks for the proposed patch. Two thoughts: 1. Instead of the symbol 'unordered-or' (which is remarkably hard to=20 read), I suggest using the ASCII letter 'V'. This ASCIIfies the Unicode=20 symbol U+2228 LOGICAL OR (=E2=88=A8). If you prefer, you could make the U= nicode=20 symbol an alias for 'V', or use lower-case ASCII 'v', or whatever. The=20 point is that '(unordered-or A B)' is too hard to read with all those=20 'or's in there. 2. Re this patch: > - ((or 'anychar 'anything) (rx--translate-form '(or nonl "\n"))= ) > + ((or 'anychar 'anything) (cons (list "[^z-a]") t)) Is there a reason this uses (cons (list "[^z-a]") t) rather than=20 '(("[^z-a]") . t) ? I realize neighboring code does something similar,=20 but it's not clear to me why it's important to construct new objects=20 here instead of using literals. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= acm.org> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2019 10:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157087725322840 (code B ref 37659); Sat, 12 Oct 2019 10:48:02 +0000 Received: (at 37659) by debbugs.gnu.org; 12 Oct 2019 10:47:33 +0000 Received: from localhost ([127.0.0.1]:60768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJEvs-0005wI-4T for submit@debbugs.gnu.org; Sat, 12 Oct 2019 06:47:33 -0400 Received: from mail231c50.megamailservers.eu ([91.136.10.241]:37754 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJEvn-0005w6-Pc for 37659@debbugs.gnu.org; Sat, 12 Oct 2019 06:47:30 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570877235; bh=7XYXBanHxb825ALeKiLjuq7knzCM7ZLVjfal3m/sPFY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=gx6m9fDWskcf8Z2SqrpiaIWHrya3Y/nOxO5YCjHpbNoM0E+Urzmwm9zdU8bEBaWsw igd4QA73lQ3ZHg9VHhU9D760f+uUym/doBC4lH2qAzfc6jDhhPk3pjQMG3TlORGce8 i681TrchIkhA/fUM2m3BuWUF8X8BMCnBqQgyPFUM= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9CAlDFE011348; Sat, 12 Oct 2019 10:47:15 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 12 Oct 2019 12:47:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0208.5DA1AF33.003C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eN1tc0h1 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=5KLPUuaC_9wA:10 a=M51BFTxLslgA:10 a=M0d5irrpWGhhgbURTnIA:9 a=QEXdDO2ut3YA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 12 okt. 2019 kl. 01.07 skrev Paul Eggert : >=20 > 1. Instead of the symbol 'unordered-or' (which is remarkably hard to = read), I suggest using the ASCII letter 'V'. This ASCIIfies the Unicode = symbol U+2228 LOGICAL OR (=E2=88=A8). If you prefer, you could make the = Unicode symbol an alias for 'V', or use lower-case ASCII 'v', or = whatever. The point is that '(unordered-or A B)' is too hard to read = with all those 'or's in there. Definitely agree on the imperfections of 'unordered-or', and while I'd = be the first to welcome more use of Unicode symbols, I'm not sure V (or = v, or =E2=88=A8) are very descriptive --- even if an alert reader = intuits the rebus of 'V' (perhaps via \vee in TeX), there is no hint of = the difference from 'or' or '|'. Other suggestions: 'or*' --- follows the Lisp tradition of appending a star to get a = variant and informs the reader that it's like 'or' but with a twist. The = downside is that it might suggest a Kleene closure somehow. 'either', 'one-of', 'choose', 'pick-one', 'alternative', 'alt' --- very = readable although the relationship to 'or' isn't quite clear. Perhaps = they suggest a looser sense of ordering? 'unseq-or' --- a bit more readable and phonetically sharper than = 'unordered-or', but it suggest a relation to 'seq'. 'nonstrict-or' --- abuses the familiar programming notion of strictness? 'or-ooo' --- will mostly make sense to the comp-arch crowd. > Is there a reason this uses (cons (list "[^z-a]") t) rather than = '(("[^z-a]") . t) ? I realize neighboring code does something similar, = but it's not clear to me why it's important to construct new objects = here instead of using literals. Yes, there is a comment right above explaining that the returned value = may be mutated (at least one use of mapcan). I tried doing it the other = way, but neither was clearly better than the other (in performance or = style), so I've let it stand for now. Nothing I feel strongly about = either way. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= acm.org> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Oct 2019 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157098556716611 (code B ref 37659); Sun, 13 Oct 2019 16:53:01 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Oct 2019 16:52:47 +0000 Received: from localhost ([127.0.0.1]:36780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJh6t-0004Jr-83 for submit@debbugs.gnu.org; Sun, 13 Oct 2019 12:52:47 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJh6p-0004JV-Pb for 37659@debbugs.gnu.org; Sun, 13 Oct 2019 12:52:45 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 736E816023B; Sun, 13 Oct 2019 09:52:37 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id TDF-JPiMDmbb; Sun, 13 Oct 2019 09:52:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C01381605D8; Sun, 13 Oct 2019 09:52:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id olvGoxW5b5ti; Sun, 13 Oct 2019 09:52:36 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9A69916023B; Sun, 13 Oct 2019 09:52:36 -0700 (PDT) References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 13 Oct 2019 09:52:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 10/12/19 3:47 AM, Mattias Engdeg=C3=A5rd wrote: > there is no hint of the difference from 'or' or '|'. That goal is secondary and can be dispensed with. It is OK to use a symbo= l that=20 one must remember or look up. 'unordered-or' is simply too ungainly. Of the names you suggest, 'alt' is the the best. But here's another idea:= use=20 '|' for unordered or, and 'or' for ORdered OR. Strictly speaking this wou= ld be=20 an incompatible change, but I doubt whether many users will notice or car= e. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= acm.org> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Oct 2019 19:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157099612817702 (code B ref 37659); Sun, 13 Oct 2019 19:49:02 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Oct 2019 19:48:48 +0000 Received: from localhost ([127.0.0.1]:37083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJjrD-0004bS-O6 for submit@debbugs.gnu.org; Sun, 13 Oct 2019 15:48:47 -0400 Received: from mail1424c50.megamailservers.eu ([91.136.14.24]:60264 helo=mail102c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJjrB-0004bA-LB for 37659@debbugs.gnu.org; Sun, 13 Oct 2019 15:48:46 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570996107; bh=14isSM0752hLXx7blKp9ZN++xf0V+7jWxNT6w0AHtOM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=LIObzmjEA+teznT3nR4V5LwtsY8+422cLZx6jtOCiCMgYrBHNFjZJZWY8b4mCOyBZ bQrjwS6vHhb2TjU129TM1sEgktW2fqU9h5fkkyOos4TiE7Sx2BpqXYzJhal5OqzP2e 9Tazscnb3v/nmIxaWy3ce07p7tQcaJWYbC8fTc1Q= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail102c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9DJmPBd006159; Sun, 13 Oct 2019 19:48:27 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sun, 13 Oct 2019 21:48:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <279AC7BD-E650-4796-9876-DA3A6B0B7E91@acm.org> References: X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0206.5DA37F8B.0035, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=R8J95uZX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=5KLPUuaC_9wA:10 a=M51BFTxLslgA:10 a=-e2APVP_ivfnJFuW-88A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 13 okt. 2019 kl. 18.52 skrev Paul Eggert : >=20 > Of the names you suggest, 'alt' is the the best. But here's another = idea: use '|' for unordered or, and 'or' for ORdered OR. Strictly = speaking this would be an incompatible change, but I doubt whether many = users will notice or care. That's an interesting notion, but am wary about the incompatibility; = I'll have to think about it. Until then, let's consider 'alt' the = default name. More (informed) opinions on the subject sought! I take it the other changes -- 'anychar', [^z-a], and 'unmatchable' --- = are less debatable; I'll push them in a day or two if nobody objects. Thanks for taking an interest in naming, but the way; it isn't = bikeshedding and deserves care. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157175726623180 (code B ref 37659); Tue, 22 Oct 2019 15:15:02 +0000 Received: (at 37659) by debbugs.gnu.org; 22 Oct 2019 15:14:26 +0000 Received: from localhost ([127.0.0.1]:60325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMvre-00061o-HQ for submit@debbugs.gnu.org; Tue, 22 Oct 2019 11:14:26 -0400 Received: from mail158c50.megamailservers.eu ([91.136.10.168]:47612 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMvrc-00061f-04 for 37659@debbugs.gnu.org; Tue, 22 Oct 2019 11:14:25 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1571757251; bh=CzHEMjZd+KZ3iR82Lcro7M3SqnKRFAZ1BfwCN46Oqvs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=qowtTWKfW01Iw71gARP6diLpHLajTmIpMhCr57CK64E1nNQqQBkKUks7VpfmjfUYw 8xWVZKXIZOyDspVdQxS673LOpi18+jLiH5brqhzxBQ6ew8u4TvMF2YtZ4GrDrAHrJB Z+ZIE54Mlqpsh5J3XnORH/7lDIsWUITaiBo40lYE= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9MFE9pf003218; Tue, 22 Oct 2019 15:14:11 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Tue, 22 Oct 2019 17:14:08 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> References: X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020F.5DAF1CC3.0029, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=LO0Yv6e9 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=VFZyZ26j0jTyNYFfgNcA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 'regexp-opt' always generates a regexp preferring long matches. This is = undocumented, but useful enough that I would be surprised if this = property wasn't exploited (perhaps unknowingly) by callers. It's quite = natural: given a set of strings, surely the caller want them all to be = candidates for a match, even if there is no following anchoring pattern. Thus, instead of 'unordered-or', define the operator in terms of long = matches: 'or-max' (working name) would work like 'or' but guarantee a = longest match, and only permit strings and 'or-max' forms as arguments. = Thus, the rx user gets all the benefits from 'regexp-opt' in a = composable way, without a need to sort the strings or otherwise prepare = them. (The old 'or' behaviour always used 'regexp-opt' when possible, which = was very fragile: (or "a" "ab") would match "ab", but (or "a" "ab" = digit) would just match "a". 'or-max' is robust, without surprises.) Of course, we should also guarantee the maximum-matching property of = regexp-opt. This is just a matter of documentation (and test); it does = not restrict optimisations as far as I can tell. Again, I'm open to suggestions about a better name than 'or-max'. The other patches (anychar, unmatchable, and [^z-a]) have been pushed to = master. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157175807824460 (code B ref 37659); Tue, 22 Oct 2019 15:28:01 +0000 Received: (at 37659) by debbugs.gnu.org; 22 Oct 2019 15:27:58 +0000 Received: from localhost ([127.0.0.1]:60343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMw4j-0006MS-W4 for submit@debbugs.gnu.org; Tue, 22 Oct 2019 11:27:58 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:33697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMw4i-0006MG-FV for 37659@debbugs.gnu.org; Tue, 22 Oct 2019 11:27:56 -0400 Received: by mail-wr1-f52.google.com with SMTP id s1so9816424wro.0 for <37659@debbugs.gnu.org>; Tue, 22 Oct 2019 08:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=nusCylp/AoPgrk8o5JyhJgcDKmXcqY0Kqh9PEeRR3k8=; b=TOjioK98QzzG4Kd4xXlHiObG5YO3z966/8+jvsIRUIb0dBqDh3G+kqOSAwFbe1OSto 3MHE0P+6EVV0bY3j2vjX23p6D94biPjTvm56ynG8n2X5WyCkLD33cvMKI11/FrzZhbZv n//2Xlinrc6wTCMNV86vswaP/etLl76tOrPfyQjLRvfSE3e2jzdLBQGCFOZYAS1TcYnr Cjsl0LGMx8LWnfoXCM+1zUFcZeet9VvevAjG+yQ8p6w3CHxpr1AcdH5VbIhDYtCfNouq ap6dyedT99EZcKODJAbXuDR++f/bvwilB+INBf/Lvw6fSqiuRPepXLvDQCk7wJxhnDu9 OtnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=nusCylp/AoPgrk8o5JyhJgcDKmXcqY0Kqh9PEeRR3k8=; b=AaPRahEp+lztV320md5Fn1aZO5OJX54Ytz9dJQBthUR7zg7Vh5atl8OAFftat+AQf7 d6IERv9vp37dpQb/K/zJAHnSEGaiBmEkDsmPqi704tY7IdprlFkbuWsCZ+0DcgHPLo8D 0jnVgViAPPI+sCOl7YuXo88vJSLnxTBlAB7Xsp9S6M9i0cxddDTOza724LVB1J1w80qF V2kQ9HtEYuP1GO7uXIvYob4IWstIrwuCA0CokwE/iKJB6ZNq546xABnU3+KQeKPXBoes Ol9OZnxadaMiRSKhZIXGJAoC5AcLoqkzmrPDCBKjINfCh1SXoVClypQVRdouoBo7LsFe 9yDw== X-Gm-Message-State: APjAAAXraZZZ0LUhwKETEOqt9LKp+s2XVqMo+YYU0k+QimEmGFLgD//2 RxhEfWNe3/UvmX5Q6EIEwOQvapEkTZU= X-Google-Smtp-Source: APXvYqzx+Z8B+Hu5oETHeGuPV1l6fKtrSa6EakMF6QgiBye5w8q8tfr++E05i8hKN5ulfMQBBxYPjw== X-Received: by 2002:a05:6000:118f:: with SMTP id g15mr793319wrx.242.1571758070049; Tue, 22 Oct 2019 08:27:50 -0700 (PDT) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id 200sm11294251wme.32.2019.10.22.08.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 08:27:49 -0700 (PDT) From: Robert Pluim References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Tue, 22 Oct 2019 17:27:48 +0200 In-Reply-To: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Tue, 22 Oct 2019 17:14:08 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Tue, 22 Oct 2019 17:14:08 +0200, Mattias Engdeg=C3=A5rd said: Mattias> 'regexp-opt' always generates a regexp preferring long matches= . This Mattias> is undocumented, but useful enough that I would be surprised i= f this Mattias> property wasn't exploited (perhaps unknowingly) by callers. It= 's quite Mattias> natural: given a set of strings, surely the caller want them a= ll to be Mattias> candidates for a match, even if there is no following anchoring Mattias> pattern. Mattias> Thus, instead of 'unordered-or', define the operator in terms = of long Mattias> matches: 'or-max' (working name) would work like 'or' but guar= antee a Mattias> longest match, and only permit strings and 'or-max' forms as Mattias> arguments. Thus, the rx user gets all the benefits from 'regex= p-opt' Mattias> in a composable way, without a need to sort the strings or oth= erwise Mattias> prepare them. Mattias> (The old 'or' behaviour always used 'regexp-opt' when possible= , which Mattias> was very fragile: (or "a" "ab") would match "ab", but (or "a" = "ab" Mattias> digit) would just match "a". 'or-max' is robust, without surpr= ises.) Mattias> Of course, we should also guarantee the maximum-matching prope= rty of Mattias> regexp-opt. This is just a matter of documentation (and test);= it does Mattias> not restrict optimisations as far as I can tell. Mattias> Again, I'm open to suggestions about a better name than 'or-ma= x'. or-greedy? From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15717656353888 (code B ref 37659); Tue, 22 Oct 2019 17:34:02 +0000 Received: (at 37659) by debbugs.gnu.org; 22 Oct 2019 17:33:55 +0000 Received: from localhost ([127.0.0.1]:60428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMy2c-00010e-NC for submit@debbugs.gnu.org; Tue, 22 Oct 2019 13:33:54 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMy2Z-00010N-TC for 37659@debbugs.gnu.org; Tue, 22 Oct 2019 13:33:53 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78161160646; Tue, 22 Oct 2019 10:33:45 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id CoRMK9L4p5xz; Tue, 22 Oct 2019 10:33:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 86888160650; Tue, 22 Oct 2019 10:33:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id iIQ8lehdGmDe; Tue, 22 Oct 2019 10:33:44 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6C545160646; Tue, 22 Oct 2019 10:33:44 -0700 (PDT) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Tue, 22 Oct 2019 10:33:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 10/22/19 8:14 AM, Mattias Engdeg=C3=A5rd wrote: > 'regexp-opt' always generates a regexp preferring long matches. This is= undocumented, but useful enough that I would be surprised if this proper= ty wasn't exploited (perhaps unknowingly) by callers. It's quite natural:= given a set of strings, surely the caller want them all to be candidates= for a match, even if there is no following anchoring pattern. Yes, the longstanding tradition is that regular expressions are greedy. > Thus, instead of 'unordered-or', define the operator in terms of long m= atches: 'or-max' (working name) would work like 'or' but guarantee a long= est match, and only permit strings and 'or-max' forms as arguments. That's an odd restriction. I'm not sure it's a good idea to add an=20 operator with such a restriction. That is, I know why the restriction is=20 there (it's because of limitations in the Emacs regexp matcher), but=20 it's not clear that users should have to know and understand these detail= s. Moreover, if greed is the longstanding tradition for regexp-opt,=20 shouldn't plain "or" be greedy, to be consistent with other operators?=20 That is true for POSIX regular expressions involving "|". For example,=20 the shell command: echo abbc | awk '{n=3Dsplit($0, a, /b|bb/); for (i=3D1;i<=3Dn;i++) print a[i]}' outputs the two lines "a" and "c" (not the three lines "a", "", and "c")=20 because the "b|bb" matches greedily. If it's too much trouble to make plain "or" greedy, I suggest just=20 documenting it as possibly being greedy and possibly not (that is,=20 document it as being unordered, even if it happens to be ordered now).=20 This will give us more opportunity for optimization later. More generally, surely it would be better to improve the underlying=20 Emacs regular expression matcher to have a greedy "or", or a stingy=20 "or", or whatever. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Oct 2019 09:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157182217110989 (code B ref 37659); Wed, 23 Oct 2019 09:17:02 +0000 Received: (at 37659) by debbugs.gnu.org; 23 Oct 2019 09:16:11 +0000 Received: from localhost ([127.0.0.1]:60845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNCkU-0002qZ-SD for submit@debbugs.gnu.org; Wed, 23 Oct 2019 05:16:11 -0400 Received: from mail212c50.megamailservers.eu ([91.136.10.222]:48510 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNCkQ-0002hP-Rg for 37659@debbugs.gnu.org; Wed, 23 Oct 2019 05:16:09 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1571822149; bh=PAxkF6XGK3BAsAbxc1IK+jjqt3YjlzHSBLhNfxf4wSw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ENnnNrc9X7jo5v1P7kU4ff4z11onRXkcbBlOga6zyfSCDK5v56lH+1Gk+HJcKt7Ow 9F7COKJAnsvUmcMY2j/KzvVIOCUnzfJw4K9EmwyxbxNYgUPij5PQuj/TDPCHUzA+W4 jy49I3KxyPCR+Ui9bIDBBC529NsJRJePtpG8YbMM= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9N9Fl56019790; Wed, 23 Oct 2019 09:15:49 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 23 Oct 2019 11:15:47 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0205.5DB01A45.0054, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=TbLoSiYh c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=_a7OQLmI6xoJ9uaYqNcA:9 a=9kUatgwqPKuF6Lr3:21 a=A-WMwPS5_FwBuQNe:21 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 22 okt. 2019 kl. 19.33 skrev Paul Eggert : >> Thus, instead of 'unordered-or', define the operator in terms of long = matches: 'or-max' (working name) would work like 'or' but guarantee a = longest match, and only permit strings and 'or-max' forms as arguments. >=20 > That's an odd restriction. I'm not sure it's a good idea to add an = operator with such a restriction. That is, I know why the restriction is = there (it's because of limitations in the Emacs regexp matcher), but = it's not clear that users should have to know and understand these = details. The restriction is simple and easy to document. It is not necessary to = know the underlying reason for it in order to use the construct = effectively. > Moreover, if greed is the longstanding tradition for regexp-opt, = shouldn't plain "or" be greedy, to be consistent with other operators? Yes, I very much favour switching to a DFA engine; is there another way? = Even then a backtracking engine would be needed for backrefs and other = messy cases. However, that's a completely different amount of work. = (Meanwhile, we have 'posix-string-match' etc for those who want greed at = any cost.) The problem that I'm trying to solve here is: how do we make it easy to = match one of multiple strings --- keywords, say --- in rx? Currently, = the answer is something like (regexp (regexp-opt my-keywords)), which = doesn't integrate well with rx user definitions. In addition, the output = of one regexp-opt cannot be used as input to another. 'or-max' would allow a user to say (rx-define veggies (or-max "carrot" "tomato" "cucumber")) (rx-define meats (or-max "beef" "chicken" "pork")) ... (rx (or-max veggies meats)) ... and get a regexp that is guaranteed to be greedy, well-optimised as if = all strings were passed to 'regexp-opt' at once, and robust: a small = change won't change the behaviour radically, and the user won't have to = game or second-guess the engine in order to produce the desired result. If, in the future, 'or' becomes greedy, then 'or-max' will just be a = synonym. > If it's too much trouble to make plain "or" greedy, I suggest just = documenting it as possibly being greedy and possibly not (that is, = document it as being unordered, even if it happens to be ordered now). = This will give us more opportunity for optimization later. That would make rx strictly less useful than string regexps. That is why = 'unordered-or' was a mistake: the unpredictability made it useless in = many cases, and everyone would just have used regexp-opt (or skipped rx = altogether). It is desirable to have the semantics for 'or' in rx and \| in string = regexps; otherwise, translating and understanding become unnecessarily = difficult. We could say that 'or' and \| either match greedily or in left-to-right = order. However, I'm not sure this solves any problem right now. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Oct 2019 23:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15718724965562 (code B ref 37659); Wed, 23 Oct 2019 23:15:01 +0000 Received: (at 37659) by debbugs.gnu.org; 23 Oct 2019 23:14:56 +0000 Received: from localhost ([127.0.0.1]:35168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNPqC-0001Re-Cl for submit@debbugs.gnu.org; Wed, 23 Oct 2019 19:14:56 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNPq9-0001RP-5N for 37659@debbugs.gnu.org; Wed, 23 Oct 2019 19:14:54 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A005E1606CB; Wed, 23 Oct 2019 16:14:46 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FoRcQZ0Hz4bT; Wed, 23 Oct 2019 16:14:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EA4F31606CD; Wed, 23 Oct 2019 16:14:45 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id m_Cs7E8ZB-_e; Wed, 23 Oct 2019 16:14:45 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D18671606CB; Wed, 23 Oct 2019 16:14:45 -0700 (PDT) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> Date: Wed, 23 Oct 2019 16:14:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 10/23/19 2:15 AM, Mattias Engdeg=C3=A5rd wrote: > how do we make it easy to match one of multiple strings --- keywords, s= ay --- in rx? If that's the real problem, perhaps the name should be "or-tokens" or=20 something like that, to help remind the reader of the limitations of the=20 proposed operator: it's meant only for greedy tokenization and it isn't=20 suited for regular expressions in general. A problem with the name=20 "or-max" is that it implies a more-general functionality than the=20 implementation really has. What happens if you apply or-tokens to arguments that aren't strings or=20 other or-tokens? Does rx diagnose this? I hope it does. > We could say that 'or' and \| either match greedily or in left-to-right= order. However, I'm not sure this solves any problem right now. I was thinking of something more-compatible: we could say that \| is=20 left-to-right (for users who need compatibility with regexp "|"), and=20 that 'or' is not necessarily left-to-right (to make room for future=20 extensions that make 'or' greedy, or more efficient, or both). From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 01:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157188220727846 (code B ref 37659); Thu, 24 Oct 2019 01:57:01 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 01:56:47 +0000 Received: from localhost ([127.0.0.1]:35208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNSMm-0007Ey-Iv for submit@debbugs.gnu.org; Wed, 23 Oct 2019 21:56:44 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:46316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNSMk-0007Em-RF for 37659@debbugs.gnu.org; Wed, 23 Oct 2019 21:56:43 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O1sHci190091; Thu, 24 Oct 2019 01:56:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=E1OpozgUZAsK7YRz0bjD3XWyaXSISoLkMgR0sIfyOK4=; b=eUujfZDwaTt1cwMr+1gZeGqj5pVfo8sD0KIiIdtZAkSyoQPP5LypYefz4f/+VkGijv0l xzrLaMBNRDY4L0aRonzE0Xm55VcnBU0hHqvL5fmuvUn3pPBOLAFvnR0A6NuHmPkGA7Z/ nMnU0sB+D5sMAo4dq+ajWiVCK+el999HlYsGfRq2sM2reYrXmcHymlOzODC5OsQZwIgo nXiq2utUoTNNSFg4auItGgje28Akp2JgUggFlAgeamnnod3lBDwqMXOWMExADa3kXKiG u7WwpgBPXJtnBHuQGkTpcBkSH60Q+UvESV7oeJ0Ao3BlDzAXvPZ3+elm8JOZZ74rzGYQ ww== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2vqswtrtvm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 01:56:29 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O1s7n3026451; Thu, 24 Oct 2019 01:56:28 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2vtsk3b4sx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 01:56:28 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x9O1uRDt005330; Thu, 24 Oct 2019 01:56:27 GMT MIME-Version: 1.0 Message-ID: <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> Date: Wed, 23 Oct 2019 18:56:26 -0700 (PDT) From: Drew Adams References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> In-Reply-To: <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240013 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240013 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Without wanting to butt in here, and knowing nothing about what rx offers... Is there an identifiable subset of rx features (operators, functions, thingies, or whatever its composable pieces are called) that map (even if not one-to-one) to regexp syntax components? If so, are the things in that subset identified as such in the doc? Just wondering. Wondering, in part, whether use of rx might indirectly help someone learn about Emacs regexp syntax and behavior. Not saying that's important. Just thought it might be of some use, or at least interesting. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 08:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15719075413694 (code B ref 37659); Thu, 24 Oct 2019 08:59:02 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 08:59:01 +0000 Received: from localhost ([127.0.0.1]:35327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNYxR-0000xV-6K for submit@debbugs.gnu.org; Thu, 24 Oct 2019 04:59:01 -0400 Received: from mail230c50.megamailservers.eu ([91.136.10.240]:45814 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNYxN-0000xK-8j for 37659@debbugs.gnu.org; Thu, 24 Oct 2019 04:58:58 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1571907525; bh=mtqaKeAGwJalH1GYaTbPJcmVn9C7k3Pr9HQOsLXz1I8=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=VN8L1wxFMODommZsjd+BcV70xVLSo3Wx9KEi4UiB/qCJ/NFUOOQlr4vJK+gEoyi9k KH9s5O3tsFpEwNFu5Ir1CFXiV2ju3w58MlAKNIMGLpbS/1V4kMUyaL1hjtkJEe1g0e fAnDUXyfag7b2obgX7yZ8KeqGuHicxrkkJNZisb4= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9O8whgH024571; Thu, 24 Oct 2019 08:58:45 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <6B3E322E-6058-4D8B-A73C-07847411AE1D@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_A495D9D4-7179-4C9B-A2F0-18A2279CAF78" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Thu, 24 Oct 2019 10:58:43 +0200 In-Reply-To: <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0204.5DB167C5.008D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eN1tc0h1 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=OxGMLzmZiu-U-OjVW_kA:9 a=CjuIK1q_8ugA:10 a=kG-5aEGYk6W-mD7-phYA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_A495D9D4-7179-4C9B-A2F0-18A2279CAF78 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 24 okt. 2019 kl. 01.14 skrev Paul Eggert : >=20 >> how do we make it easy to match one of multiple strings --- keywords, = say --- in rx? >=20 > If that's the real problem, perhaps the name should be "or-tokens" or = something like that, to help remind the reader of the limitations of the = proposed operator: it's meant only for greedy tokenization and it isn't = suited for regular expressions in general. A problem with the name = "or-max" is that it implies a more-general functionality than the = implementation really has. 'or-strings' then perhaps, since there is nothing really restricting it = to 'tokens' (which is a bit hazardous terminology given that regexps are = commonly used for tokenising). In particular, there is no delimiting; = (or-max "IN" "OUT") will match the first part of "INSPECT", which may be = unexpected of something ostensibly matching tokens. On the other hand, 'or-strings' sort of precludes a future relaxation of = the argument restriction. > What happens if you apply or-tokens to arguments that aren't strings = or other or-tokens? Does rx diagnose this? I hope it does. Yes, of course. Working patch attached (it still uses the name = 'or-max'). 'or-max' isn't a vital addition; it just seemed to fill a gap, after = experience with traditional regexp usage. It clearly shouldn't be added = it on a whim. I wanted to get it in place for 27.1, but such a version = rush has rarely resulted in good design. > I was thinking of something more-compatible: we could say that \| is = left-to-right (for users who need compatibility with regexp "|"), and = that 'or' is not necessarily left-to-right (to make room for future = extensions that make 'or' greedy, or more efficient, or both). Sorry, by '\|' I meant the string regexp operator; I take it you propose = separate semantics for the rx '|' and 'or' operators? Maybe we should = worry about that if we ever get near the point of replacing the engine. = There are other concerns, such as how capture groups are set (even if = two branches match equally long texts). I honestly don't think much would break if '\|' (in string regexps) = became greedy overnight, but there is plenty of room to confuse the user = if we introduce subtle distinctions between what has hitherto been = perceived as synonyms. --Apple-Mail=_A495D9D4-7179-4C9B-A2F0-18A2279CAF78 Content-Disposition: attachment; filename=0003-Add-the-rx-or-max-operator.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-Add-the-rx-or-max-operator.patch" Content-Transfer-Encoding: quoted-printable =46rom=20b6e1900e64803dc28e915f38febd9a9389acb697=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=2023=20Oct=202019=2012:47:53=20+0200=0A= Subject:=20[PATCH=203/3]=20Add=20the=20rx=20'or-max'=20operator=0A=0A*=20= doc/lispref/searching.texi=20(Rx=20Constructs):=0A*=20= lisp/emacs-lisp/rx.el=20(rx--or-max-strings,=20rx--translate-or-max)=0A= (rx--translate-form,=20rx--builtin-forms,=20rx):=0A*=20= test/lisp/emacs-lisp/rx-tests.el=20(rx-or-max-def):=0AAdd=20'or-max'.=0A= ---=0A=20doc/lispref/searching.texi=20=20=20=20=20=20=20|=20=207=20= +++++++=0A=20lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=20= 22=20+++++++++++++++++++++-=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=20= 13=20+++++++++++++=0A=203=20files=20changed,=2041=20insertions(+),=201=20= deletion(-)=0A=0Adiff=20--git=20a/doc/lispref/searching.texi=20= b/doc/lispref/searching.texi=0Aindex=205178575a3b..3feaebc16d=20100644=0A= ---=20a/doc/lispref/searching.texi=0A+++=20b/doc/lispref/searching.texi=0A= @@=20-1084,6=20+1084,13=20@@=20Rx=20Constructs=0A=20Without=20arguments,=20= the=20expression=20will=20not=20match=20anything=20at=20all.@*=0A=20= Corresponding=20string=20regexp:=20@samp{@var{A}\|@var{B}\|@dots{}}.=0A=20= =0A+@item=20@code{(or-max=20@var{rx}@dots{})}=0A+@cindex=20@code{or-max}=20= in=20rx=0A+Like=20@code{or},=20but=20always=20favours=20the=20longest=20= possible=20match.=20=20The=0A+@var{rx}s=20must=20be=20strings=20or=20= @code{or-max}=20forms.=20=20The=20resulting=0A+expression=20may=20be=20= more=20efficient=20in=20matching=20than=20the=20corresponding=0A= +@code{or}=20form.=0A+=0A=20@item=20@code{unmatchable}=0A=20@cindex=20= @code{unmatchable}=20in=20rx=0A=20Refuse=20any=20match.=20=20Equivalent=20= to=20@code{(or)}.=0Adiff=20--git=20a/lisp/emacs-lisp/rx.el=20= b/lisp/emacs-lisp/rx.el=0Aindex=20d7677f1444..9afa17c617=20100644=0A---=20= a/lisp/emacs-lisp/rx.el=0A+++=20b/lisp/emacs-lisp/rx.el=0A@@=20-293,6=20= +293,24=20@@=20rx--translate-or=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(cdr=20body)))=0A=20=20=20=20=20= =20=20=20=20=20=20nil))))=0A=20=0A+(defun=20rx--or-max-strings=20(args)=0A= +=20=20"List=20of=20string=20arguments=20in=20an=20'or-max'=20= construct."=0A+=20=20(mapcan=20(lambda=20(item)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20(cond=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20FIXME:=20= Allow=20single=20characters=20as=20well?=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20((stringp=20item)=20(list=20item))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20((and=20(consp=20item)=20(eq=20(car=20item)=20'or-max))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(rx--or-max-strings=20(cdr=20= item)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20((let=20((expanded=20= (rx--expand-def=20item)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(and=20expanded=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(rx--or-max-strings=20(list=20expanded)))))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20(t=20(error=20"Illegal=20`or-max'=20argument:=20= %S"=20item))))=0A+=20=20=20=20=20=20=20=20=20=20args))=0A+=0A+(defun=20= rx--translate-or-max=20(body)=0A+=20=20"Translate=20(or-max=20BODY...).=20= =20Return=20(REGEXP=20.=20PRECEDENCE)."=0A+=20=20(cons=20(list=20= (regexp-opt=20(rx--or-max-strings=20body)))=20t))=0A+=0A=20(defun=20= rx--string-to-intervals=20(str)=0A=20=20=20"Decode=20STR=20as=20= intervals:=20A-Z=20becomes=20(?A=20.=20?Z),=20and=20the=20single=0A=20= character=20X=20becomes=20(?X=20.=20?X).=20=20Return=20the=20intervals=20= in=20a=20list."=0A@@=20-854,6=20+872,7=20@@=20rx--translate-form=0A=20=20= =20=20=20(pcase=20(car=20form)=0A=20=20=20=20=20=20=20((or=20'seq=20:=20= 'and=20'sequence)=20(rx--translate-seq=20body))=0A=20=20=20=20=20=20=20= ((or=20'or=20'|)=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (rx--translate-or=20body))=0A+=20=20=20=20=20=20('or-max=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(rx--translate-or-max=20body))=0A=20=20= =20=20=20=20=20((or=20'any=20'in=20'char)=20=20=20=20=20=20= (rx--translate-any=20nil=20body))=0A=20=20=20=20=20=20=20('not-char=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(rx--translate-any=20t=20= body))=0A=20=20=20=20=20=20=20('not=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(rx--translate-not=20nil=20body))=0A@@=20-915,7=20= +934,7=20@@=20rx--translate-form=0A=20=20=20=20=20=20=20=20=20(t=20= (error=20"Unknown=20rx=20form=20`%s'"=20op)))))))=0A=20=0A=20(defconst=20= rx--builtin-forms=0A-=20=20'(seq=20sequence=20:=20and=20or=20|=20any=20= in=20char=20not-char=20not=0A+=20=20'(seq=20sequence=20:=20and=20or=20|=20= or-max=20any=20in=20char=20not-char=20not=0A=20=20=20=20=20repeat=20=3D=20= >=3D=20**=0A=20=20=20=20=20zero-or-more=200+=20*=0A=20=20=20=20=20= one-or-more=201+=20+=0A@@=20-1006,6=20+1025,7=20@@=20rx=0A=20=0A=20(seq=20= RX...)=20=20=20=20Match=20the=20RXs=20in=20sequence.=20=20Alias:=20:,=20= sequence,=20and.=0A=20(or=20RX...)=20=20=20=20=20Match=20one=20of=20the=20= RXs.=20=20Alias:=20|.=0A+(or-max=20RX...)=20Match=20one=20of=20the=20RXs=20= (strings=20and=20or-max=20only),=20longest=20match.=0A=20=0A=20= (zero-or-more=20RX...)=20Match=20RXs=20zero=20or=20more=20times.=20=20= Alias:=200+.=0A=20(one-or-more=20RX...)=20=20Match=20RXs=20one=20or=20= more=20times.=20=20Alias:=201+.=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=20ef2541d83a..f60932e670=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-49,6=20+49,19=20@@=20rx-or=0A=20= =20=20(should=20(equal=20(rx=20(|))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"\\`a\\`")))=0A=20=0A+(ert-deftest=20rx-or-max=20()=0A= +=20=20(should=20(equal=20(rx=20(or-max=20"ab"=20"abc"))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"\\(?:abc?\\)"))=0A+=20=20(should=20= (equal=20(rx=20(or-max=20(or-max=20"a"=20"xy")=20(or-max=20"ab"=20= "abcd")))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\(?:a\\(?:b\\(?:cd\\)?\\)?\\|xy\\)")))=0A+=0A+(ert-deftest=20= rx-or-max-def=20()=0A+=20=20(rx-let=20((a=20(or-max=20"a"=20"xy"))=0A+=20= =20=20=20=20=20=20=20=20=20=20(b=20a)=0A+=20=20=20=20=20=20=20=20=20=20=20= (c=20(or-max=20"ab"=20"abcd")))=0A+=20=20=20=20(should=20(equal=20(rx=20= (or-max=20c=20b))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20"\\(?:a\\(?:b\\(?:cd\\)?\\)?\\|xy\\)"))))=0A+=0A=20(ert-deftest=20= rx-char-any=20()=0A=20=20=20"Test=20character=20alternatives=20with=20= `]'=20and=20`-'=20(Bug#25123)."=0A=20=20=20(should=20(equal=0A--=20=0A= 2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_A495D9D4-7179-4C9B-A2F0-18A2279CAF78-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Drew Adams Cc: Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15719081994738 (code B ref 37659); Thu, 24 Oct 2019 09:10:02 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 09:09:59 +0000 Received: from localhost ([127.0.0.1]:35331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZ83-0001EL-5t for submit@debbugs.gnu.org; Thu, 24 Oct 2019 05:09:59 -0400 Received: from mail1421c50.megamailservers.eu ([91.136.14.21]:56502 helo=mail102c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZ80-0001E1-CZ for 37659@debbugs.gnu.org; Thu, 24 Oct 2019 05:09:57 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1571908180; bh=wPkPLGrt7rlcD8WES3UG+Ys4/o2/dWIoO8DcmfdN3wY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=RwhDk4IWK5V7sypEQN1p+WNE15iFDgHTKoD1j4oH7NJzDHop/CbsTfX1CwQ/Q4KaX RGgocwuydR2wIjU9SOIEVG8MLSzesshZwET5kLTstlxpnFDlj/ml9igL3udDBdfMU/ al/1yWNah4QHo5Nj1LfMS56btbbmEY6LufXoIi1o= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail102c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9O99bQM022605; Thu, 24 Oct 2019 09:09:39 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= X-Priority: 3 In-Reply-To: <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> Date: Thu, 24 Oct 2019 11:09:36 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <015233FF-2F66-4150-A6B3-A21AB2147CC8@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0211.5DB16A54.001D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=R8J95uZX c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=yPCof4ZbAAAA:8 a=xg_X2wpL1sc-Wf8Wpl4A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 24 okt. 2019 kl. 03.56 skrev Drew Adams : >=20 > Is there an identifiable subset of rx features > (operators, functions, thingies, or whatever > its composable pieces are called) that map > (even if not one-to-one) to regexp syntax > components? Almost all of rx maps one-to-one to the string regexp syntax. The rx = docs mention the corresponding string regexps for most forms. In addition, rx is self-explaining in the sense that a user curious = about what a particular expression means needs only to evaluate (rx = SOMETHING) to get the translation. (There are external packages for = going in the other direction.) From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Drew Adams Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15719086785483 (code B ref 37659); Thu, 24 Oct 2019 09:18:02 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 09:17:58 +0000 Received: from localhost ([127.0.0.1]:35336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZFm-0001QN-1f for submit@debbugs.gnu.org; Thu, 24 Oct 2019 05:17:58 -0400 Received: from smtp-1.orcon.net.nz ([60.234.4.34]:59469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZFj-0001QE-Pm for 37659@debbugs.gnu.org; Thu, 24 Oct 2019 05:17:56 -0400 Received: from [116.251.203.173] (port=14485 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1iNZFg-0005ue-E4; Thu, 24 Oct 2019 22:17:52 +1300 References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> From: Phil Sainty Message-ID: <39b1e949-5d0f-9851-2c52-167d1f86e2bf@orcon.net.nz> Date: Thu, 24 Oct 2019 22:17:52 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 24/10/19 2:56 PM, Drew Adams wrote: > Is there an identifiable subset of rx features ... that map > (even if not one-to-one) to regexp syntax components? C-h f rx (syntax SYNTAX) Match a character with syntax SYNTAX, being one of: whitespace, punctuation, word, symbol, open-parenthesis, close-parenthesis, expression-prefix, string-quote, paired-delimiter, escape, character-quote, comment-start, comment-end, string-delimiter, comment-delimiter From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 14:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157192706326515 (code B ref 37659); Thu, 24 Oct 2019 14:25:01 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 14:24:23 +0000 Received: from localhost ([127.0.0.1]:36725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNe2I-0006tb-VG for submit@debbugs.gnu.org; Thu, 24 Oct 2019 10:24:23 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:55894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNe2G-0006tN-S9 for 37659@debbugs.gnu.org; Thu, 24 Oct 2019 10:24:21 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9OENgtS192891; Thu, 24 Oct 2019 14:24:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=Ql8dNSo7+w/3CrveLT/y89xIPFgaLy2i+7fv2dORPJc=; b=niJSDWECWZgCvqELsDmsZHu4VOl99dGaxbCKzumWbZphey6n0xoJA3mtI274RnKK6HjZ xRvuIWFQMNMd7Y0AvOFwKKSHNvrqy8LLTLRZGKbI3jBXakMVjTuBkud0qVQ9iuD16lie MN+V2VHALZQATIm4YtjMx4YomHsWiYtxpeA5WxDvmPiaNmLiPTgzoNWkgyBUohqvT1GX dV9H6YFEJ1wvJdy5VrmYmGR0wuz8DDRvuaoZgR9yoTD9TY7/nDxE7WlDJkku9Ewbycou wuoARjlthMQu7QShbZJBtnaj4/iJA+64ehrCmA/NDsnfUHFGx4zvEmv6UQB5+jxY17Tq fQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2vqswtv4cm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 14:24:12 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9OEO6Hc043998; Thu, 24 Oct 2019 14:24:11 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2vu0fpctbv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 14:24:09 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x9OEO23N005167; Thu, 24 Oct 2019 14:24:03 GMT MIME-Version: 1.0 Message-ID: <21a930b7-dd91-4c8a-b282-2e7675061344@default> Date: Thu, 24 Oct 2019 07:24:01 -0700 (PDT) From: Drew Adams References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> <015233FF-2F66-4150-A6B3-A21AB2147CC8@acm.org> In-Reply-To: <015233FF-2F66-4150-A6B3-A21AB2147CC8@acm.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240135 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240135 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Is there an identifiable subset of rx features > > (operators, functions, thingies, or whatever > > its composable pieces are called) that map > > (even if not one-to-one) to regexp syntax > > components? >=20 > Almost all of rx maps one-to-one to the string regexp syntax. The rx > docs mention the corresponding string regexps for most forms. >=20 > In addition, rx is self-explaining in the sense that a user curious > about what a particular expression means needs only to evaluate (rx > SOMETHING) to get the translation. (There are external packages for > going in the other direction.) Yes, I knew the last part - rx returns a regexp (which you can examine). My suggestion was really about documenting the correspondence between individual rx components and regexp components. If that's already done, great. Thx. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 14:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Phil Sainty Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157192760927369 (code B ref 37659); Thu, 24 Oct 2019 14:34:01 +0000 Received: (at 37659) by debbugs.gnu.org; 24 Oct 2019 14:33:29 +0000 Received: from localhost ([127.0.0.1]:36732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNeB6-00077M-Va for submit@debbugs.gnu.org; Thu, 24 Oct 2019 10:33:29 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:46404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNeB4-000779-St for 37659@debbugs.gnu.org; Thu, 24 Oct 2019 10:33:27 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9OENfAt174563; Thu, 24 Oct 2019 14:33:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=JBNdwl5K+4dy7sfDhqnSTfM1lUd/eXQm9volgcDPevs=; b=TFdgf0A2WYN1DroZM0QswbKNXltqMzuw47OLka0Z3T8V6Y2WwZGSSaL5lTCf4SxarThB q0KsMaxPvQnQUmqI0Lzx2Xs8eaky055QKBZiC2WQl8bqe36fzwn2jBedDJ4LKNvWNSy1 LrhDRr0ePbD5xZ928FmRdxnx6c5Xur967fGNvIelO03aHpQfCMX0t1AH/nA4zv5+wUgW AlDpdIz12Dvq4dbsyRcVFvUVHV6Uif1zhRE7/InPoQwQkzetDrfZUFKKuLfdpx6VFzHR GnX+fGdPKmrKc/4HgaLnwJwtABHAPERFJBgFQMe2GkjaZHgCbpGLcjDRa4SgZL0iSi/9 Ag== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2vqteq428f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 14:33:02 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9OENdjR096898; Thu, 24 Oct 2019 14:33:02 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2vtm24n0r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 14:33:02 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x9OEX0hk008207; Thu, 24 Oct 2019 14:33:00 GMT MIME-Version: 1.0 Message-ID: <4688fc1e-2b9a-429f-8549-7b7335fcc99c@default> Date: Thu, 24 Oct 2019 07:32:59 -0700 (PDT) From: Drew Adams References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> <235cea28-99cc-44d6-bc20-ccd8c9e31f44@default> <39b1e949-5d0f-9851-2c52-167d1f86e2bf@orcon.net.nz> In-Reply-To: <39b1e949-5d0f-9851-2c52-167d1f86e2bf@orcon.net.nz> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240135 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240135 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Is there an identifiable subset of rx features ... that map > > (even if not one-to-one) to regexp syntax components? >=20 > C-h f rx >=20 > (syntax SYNTAX) Match a character with syntax SYNTAX, being one of: > whitespace, punctuation, word, symbol, open-parenthesis, > close-parenthesis, expression-prefix, string-quote, > paired-delimiter, escape, character-quote, comment-start, > comment-end, string-delimiter, comment-delimiter Yes, that's fine for char syntax classes. It's good that their correspondences are listed. But for, say, `line-start' (aka `bol') there is a verbal description but no mention of the Elisp regexp syntax that corresponds: =E2=80=98line-start=E2=80=99, =E2=80=98bol=E2=80=99 matches the empty string, but only at the beginning of a line in the text being matched That's the kind of thing I was suggesting. It would be helpful, I think, to mention (somewhere) that the regexp syntax for this is "^". Same thing for the other constructs (`string-start' and all the rest). I'm using Emacs 26.3. I didn't find anything beyond the doc string - nothing in the Emacs or Elisp manual (which is OK). From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 11:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.157217720320354 (code B ref 37659); Sun, 27 Oct 2019 11:54:01 +0000 Received: (at 37659) by debbugs.gnu.org; 27 Oct 2019 11:53:23 +0000 Received: from localhost ([127.0.0.1]:41753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOh6o-0005IE-Q6 for submit@debbugs.gnu.org; Sun, 27 Oct 2019 07:53:23 -0400 Received: from mail211c50.megamailservers.eu ([91.136.10.221]:38368 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOh6m-0005I4-DB for 37659@debbugs.gnu.org; Sun, 27 Oct 2019 07:53:21 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1572177188; bh=tQsqiJ71bXWPTB4eRK30t3Spij9v8n9F2j8uGMr0Gz4=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=loa69Zt+5f8938C4UP565IfD1GUqFcYnDQesrdJwuIU1xLGI/aReiocJlL/6Bc9T/ zsDcIfYmu6+57r5bK2J/dmnuXEgyA73grCJg94Y1G/2lnXt15bli55BUhut4x0lLS5 qpvqYvPv+kqH1i8b2LukqcwdYImqIhWOzjH7FBNc= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9RBr5Ov006861; Sun, 27 Oct 2019 11:53:07 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <4406A98D-708A-4B04-881A-AD90F7EFF36C@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_5744ECC2-8B96-4382-A0BF-1BF65F99EE87" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Sun, 27 Oct 2019 12:53:05 +0100 In-Reply-To: <6B3E322E-6058-4D8B-A73C-07847411AE1D@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <1A5B8E3D-B147-4B89-BFAE-50DCB0A64D3B@acm.org> <9016eb3d-7d58-5950-862a-13db4c7ff32b@cs.ucla.edu> <6B3E322E-6058-4D8B-A73C-07847411AE1D@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0203.5DB58524.0009, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=TbLoSiYh c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=qFqvdvABBfdTmC8CgSsA:9 a=CjuIK1q_8ugA:10 a=Fo7r8Ynid4JQh3uN0QgA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_5744ECC2-8B96-4382-A0BF-1BF65F99EE87 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii An observation is that 'or-max' cannot currently be defined by the user, = because there is no way to expand rx forms explicitly. One way to fill = that hole is to add the function (rx-expand-definitions RX-FORM) which would expand RX-FORM until it no longer is a user-defined form. This would permit or-max to be defined as (rx-define or-max (&rest forms) (eval `(regexp ,(regexp-opt (or-max-strings (list forms)))))) (defun or-max-strings (args) (mapcan (lambda (item) (pcase item ((pred stringp) (list item)) (`(or-max . ,rest) (or-max-strings rest)) (_ (error "Illegal `or-max' argument: %S" item)))) (mapcar #'rx-expand-definitions args))) Of course, if the 'or-max' operator is generally useful, it would = probably still make sense to define it as a primitive. --Apple-Mail=_5744ECC2-8B96-4382-A0BF-1BF65F99EE87 Content-Disposition: attachment; filename=0001-Add-rx-expand-definitions.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-rx-expand-definitions.patch" Content-Transfer-Encoding: quoted-printable =46rom=2052df813cac0ecb38f62d6740082ee6741ca0e167=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sun,=2027=20Oct=202019=2012:50:15=20+0100=0A= Subject:=20[PATCH]=20Add=20`rx-expand-definitions'=0A=0A*=20= lisp/emacs-lisp/rx.el=20(rx-expand-definitions):=20New=20function.=0A*=20= test/lisp/emacs-lisp/rx-tests.el=20(rx-expand-definitions):=20Test.=0A=0A= Add=20`rx-expand-definitions',=20allowing=20explicit=20expansion=20of=20= rx=20forms=0Ainside=20(eval=20...).=20(Bug#37659)=0A---=0A=20= lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=20=208=20= ++++++++=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=2017=20= +++++++++++++++++=0A=202=20files=20changed,=2025=20insertions(+)=0A=0A= diff=20--git=20a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= 52a35ffa2a..660b336efd=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-143,6=20+143,14=20@@=20rx--expand-def=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20op=20(cdr=20= form)=20(nth=200=20def)=20(nth=201=20def))=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(error=20"Not=20an=20`rx'=20form=20= definition:=20%s"=20op)))))))=0A=20=0A+(defun=20rx-expand-definitions=20= (form)=0A+=20=20"Expand=20FORM=20until=20it=20is=20no=20longer=20a=20= user-defined=20rx=20construct.=0A+Then=20return=20the=20result."=0A+=20=20= (let=20((expanded=20(rx--expand-def=20form)))=0A+=20=20=20=20(if=20= expanded=0A+=20=20=20=20=20=20=20=20(rx-expand-definitions=20expanded)=0A= +=20=20=20=20=20=20form)))=0A+=0A=20;;=20TODO:=20Additions=20to=20= consider:=0A=20;;=20-=20A=20construct=20like=20`or'=20but=20without=20= the=20match=20order=20guarantee,=0A=20;;=20=20=20maybe=20`unordered-or'.=20= =20Useful=20for=20composition=20or=20generation=20of=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=204ecc805aea..369dab83f6=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-419,6=20+419,23=20@@=20= rx-def-in-not=0A=20=20=20=20=20(should=20(equal=20(rx=20(not=20(d=20?m))=20= (not=20(e=20symbol)))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"[^amz]\\S_"))))=0A=20=0A+(ert-deftest=20rx-expand-definitions=20= ()=0A+=20=20(rx-let=20((a=20b)=0A+=20=20=20=20=20=20=20=20=20=20=20(b=20= (*=20nonl)))=0A+=20=20=20=20(should=20(equal=20(rx=20(eval=20= (rx-expand-definitions=20'space)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20"[[:space:]]"))=0A+=20=20=20=20(should=20(equal=20= (rx=20(eval=20(rx-expand-definitions=20'a)))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20".*")))=0A+=20=20(rx-let-eval=20'((f=20(x)=20= (seq=20?a=20x=20?b))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (g=20(y)=20(f=20(+=20y))))=0A+=20=20=20=20(should=20(equal=20= (rx-to-string=20'(eval=20(rx-expand-definitions=20'digit))=20t)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"[[:digit:]]"))=0A+=20= =20=20=20(should=20(equal=20(rx-to-string=20'(eval=20= (rx-expand-definitions=20'(g=20?c)))=20t)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20"ac+b")))=0A+=20=20(rx-define=20rx--g=20"z")=0A= +=20=20(should=20(equal=20(rx=20(eval=20(rx-expand-definitions=20= 'rx--g)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"z")))=0A= +=0A=20(ert-deftest=20rx-constituents=20()=0A=20=20=20(let=20= ((rx-constituents=0A=20=20=20=20=20=20=20=20=20=20(append=20'((beta=20.=20= gamma)=0A--=20=0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_5744ECC2-8B96-4382-A0BF-1BF65F99EE87-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2020 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert , Phil Sainty , Eli Zaretskii Cc: 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158142587229137 (code B ref 37659); Tue, 11 Feb 2020 12:58:01 +0000 Received: (at 37659) by debbugs.gnu.org; 11 Feb 2020 12:57:52 +0000 Received: from localhost ([127.0.0.1]:56032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1V6t-0007Zt-LB for submit@debbugs.gnu.org; Tue, 11 Feb 2020 07:57:51 -0500 Received: from mail1455c50.megamailservers.eu ([91.136.14.55]:36766 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1V6r-0007Zf-5H for 37659@debbugs.gnu.org; Tue, 11 Feb 2020 07:57:50 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581425851; bh=IEPl5gQP8VkI9FlC00LmQofIE/y3X4K2Ldkgxa1g2mI=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=XESaz+3xQxZEOV+Zu8KaYKdx3N5EzyOfGgierDNnYV6DYYON4gr9x99GV9fPf8Zqo jU0vahlEygv1gJBZOQ3mo86KWRXXCvERnMD8e6GqckUwqoElhkyuKdR8i07RLfF/iV VAF5tMNRjkfPPVtSYALZH5WI7kr9lnaHd6i+7UQE= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01BCvRRs001024; Tue, 11 Feb 2020 12:57:30 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_852F7524-6B33-46E1-8607-3F3982206465" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Tue, 11 Feb 2020 13:57:27 +0100 In-Reply-To: References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0212.5E42A4BB.006A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PNJxBsiC c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=qlOD2N-g_92EnhTNWWIA:9 a=CjuIK1q_8ugA:10 a=qU6-CtAJggarldYP3nEA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 22 okt. 2019 kl. 19.33 skrev Paul Eggert : > Moreover, if greed is the longstanding tradition for regexp-opt, shouldn't plain "or" be greedy, to be consistent with other operators? Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ucla.edu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_852F7524-6B33-46E1-8607-3F3982206465 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 22 okt. 2019 kl. 19.33 skrev Paul Eggert : > Moreover, if greed is the longstanding tradition for regexp-opt, = shouldn't plain "or" be greedy, to be consistent with other operators? Having second thoughts, I've come to believe that Paul may have been = right after all. We might just as well let plain 'or' (alias '|') match = as much as possible when it is able to do so. In particular, we should = guarantee that this will happen when all arguments are strings, as used = to be the case. Initially I thought it was a bug that (or "a" "ab") was optimised into = "ab?" on the grounds that this made the behaviour unpredictable: when = matching the string "abc", (or "a" "ab") matched "ab", whereas (or "a" = "ab" space) would match "a". However, the current 'fixed' code isn't = necessarily more useful. Since the change was introduced in Emacs 27 which has not yet been = released, I suggest the attached patch for emacs-27. It reverts the use = of regexp-opt with KEEP-ORDER =3D t. What do you think? It would solve = the problem without introducing new constructs, and without running the = risk of introducing subtle errors in existing rx expressions. (In fact, if we do not do this in Emacs 27, we'd have to add a NEWS = entry to warn users about the change.) A further improvement would be to ensure that nested all-string 'or' = forms would have the same property, and that expansion of user-defined = forms would be transparent. In other words, that (rx-let ((x (or "abc" "de"))) (rx (or "a" x (or "ab" "def")))) would be equivalent to (rx "abc" "ab" "a" "def" "de") I'll prepare a patch for this QoI improvement, but the attached patch = should be required no matter what. --Apple-Mail=_852F7524-6B33-46E1-8607-3F3982206465 Content-Disposition: attachment; filename=0001-rx-Use-longest-match-for-all-string-or-forms-bug-376.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-rx-Use-longest-match-for-all-string-or-forms-bug-376.patch" Content-Transfer-Encoding: quoted-printable =46rom=20b05c5ace634986f3c32310a4f62bd619e6ac5db9=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Tue,=2011=20Feb=202020=2013:23:10=20+0100=0A= Subject:=20[PATCH]=20rx:=20Use=20longest=20match=20for=20all-string=20= 'or'=20forms=20(bug#37659)=0A=0ARevert=20to=20the=20Emacs=2026=20= semantics=20that=20always=20gave=20the=20longest=20match=0Afor=20rx=20= 'or'=20forms=20with=20only=20string=20arguments.=20=20This=20guarantee=20= was=0Anever=20well=20documented,=20but=20it=20is=20useful=20and=20people=20= likely=20have=20come=20to=0Arely=20on=20it.=20=20For=20example,=20prior=20= to=20this=20change,=0A=0A=20(rx=20(or=20">"=20">=3D"))=0A=0Amatched=20= ">"=20even=20if=20the=20text=20contained=20">=3D".=0A=0A*=20= lisp/emacs-lisp/rx.el=20(rx--translate-or):=20Don't=20tell=20regexp-opt=20= to=0Apreserve=20the=20matching=20order.=0A*=20doc/lispref/searching.texi=20= (Rx=20Constructs):=20Document=20the=0Alongest-match=20guarantee=20for=20= all-string=20'or'=20forms.=0A---=0A=20doc/lispref/searching.texi=20|=205=20= ++++-=0A=20lisp/emacs-lisp/rx.el=20=20=20=20=20=20|=202=20+-=0A=202=20= files=20changed,=205=20insertions(+),=202=20deletions(-)=0A=0Adiff=20= --git=20a/doc/lispref/searching.texi=20b/doc/lispref/searching.texi=0A= index=203d7ea93286..5f4509a8b4=20100644=0A---=20= a/doc/lispref/searching.texi=0A+++=20b/doc/lispref/searching.texi=0A@@=20= -1080,7=20+1080,10=20@@=20Rx=20Constructs=0A=20@cindex=20@code{or}=20in=20= rx=0A=20@itemx=20@code{(|=20@var{rx}@dots{})}=0A=20@cindex=20@code{|}=20= in=20rx=0A-Match=20exactly=20one=20of=20the=20@var{rx}s,=20trying=20from=20= left=20to=20right.=0A+Match=20exactly=20one=20of=20the=20@var{rx}s.=0A= +If=20all=20arguments=20are=20string=20literals,=20the=20longest=20= possible=20match=0A+will=20always=20be=20used.=20=20Otherwise,=20either=20= the=20longest=20match=20or=20the=0A+first=20(in=20left-to-right=20order)=20= will=20be=20used.=0A=20Without=20arguments,=20the=20expression=20will=20= not=20match=20anything=20at=20all.@*=0A=20Corresponding=20string=20= regexp:=20@samp{@var{A}\|@var{B}\|@dots{}}.=0A=20=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= 03af053c91..b4cab5715d=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-290,7=20+290,7=20@@=20rx--translate-or=0A= =20=20=20=20((null=20(cdr=20body))=20=20=20=20=20=20=20=20=20=20=20=20=20= =20;=20Single=20item.=0A=20=20=20=20=20(rx--translate=20(car=20body)))=0A= =20=20=20=20((rx--every=20#'stringp=20body)=20=20=20=20=20;=20All=20= strings.=0A-=20=20=20=20(cons=20(list=20(regexp-opt=20body=20nil=20t))=0A= +=20=20=20=20(cons=20(list=20(regexp-opt=20body=20nil))=0A=20=20=20=20=20= =20=20=20=20=20=20t))=0A=20=20=20=20((rx--every=20#'rx--charset-p=20= body)=20=20;=20All=20charsets.=0A=20=20=20=20=20(rx--translate-union=20= nil=20body))=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_852F7524-6B33-46E1-8607-3F3982206465-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2020 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: psainty@orcon.net.nz, eggert@cs.ucla.edu, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158143583413000 (code B ref 37659); Tue, 11 Feb 2020 15:44:01 +0000 Received: (at 37659) by debbugs.gnu.org; 11 Feb 2020 15:43:54 +0000 Received: from localhost ([127.0.0.1]:57384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1XhZ-0003Nc-Qu for submit@debbugs.gnu.org; Tue, 11 Feb 2020 10:43:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1XhY-0003NQ-7G for 37659@debbugs.gnu.org; Tue, 11 Feb 2020 10:43:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j1XhS-0000F9-5u; Tue, 11 Feb 2020 10:43:46 -0500 Received: from [176.228.60.248] (port=2543 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j1XhR-0005Tx-Iq; Tue, 11 Feb 2020 10:43:45 -0500 Date: Tue, 11 Feb 2020 17:43:41 +0200 Message-Id: <838sl9ruxe.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Tue, 11 Feb 2020 13:57:27 +0100) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Mattias EngdegÄrd > Date: Tue, 11 Feb 2020 13:57:27 +0100 > Cc: 37659@debbugs.gnu.org > > Since the change was introduced in Emacs 27 which has not yet been released, I suggest the attached patch for emacs-27. It reverts the use of regexp-opt with KEEP-ORDER = t. What do you think? It would solve the problem without introducing new constructs, and without running the risk of introducing subtle errors in existing rx expressions. Can't say I'm happy with these last-minute experiments, but okay. Thanks. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2020 19:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: psainty@orcon.net.nz, Paul Eggert , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15814486938192 (code B ref 37659); Tue, 11 Feb 2020 19:19:02 +0000 Received: (at 37659) by debbugs.gnu.org; 11 Feb 2020 19:18:13 +0000 Received: from localhost ([127.0.0.1]:57562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1b2z-000284-7i for submit@debbugs.gnu.org; Tue, 11 Feb 2020 14:18:13 -0500 Received: from mail1460c50.megamailservers.eu ([91.136.14.60]:42364 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1b2x-00027p-3Z for 37659@debbugs.gnu.org; Tue, 11 Feb 2020 14:18:12 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581448675; bh=fAIo6LGxWhNiwz9YIGFlq24iMmfYCogcywuvURa7qHc=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=fTid0jh5K3FVzlEm7/7N3B4sSPqUCjSqs8nS+d0qJrTGAPOgI/ieNPrIDhT6fRlUx MqBmq4+D1FcjEfBoMoRKfgLLL0W4hg209blOk6WCQkK5f4dLBv9MPR6/2ivCvmND9Z JTRnsqZa8XkDProihGKoz3o2z7dfq0piP3AVSM9A= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01BJHpmG006792; Tue, 11 Feb 2020 19:17:53 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_1859A414-62A6-4E9B-BBF2-E05A74BBEEA4" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Tue, 11 Feb 2020 20:17:50 +0100 In-Reply-To: <838sl9ruxe.fsf@gnu.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5E42FDE3.0010, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OY7m8SbY c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=ZqXousmFQ0sRKU_ZFBwA:9 a=CjuIK1q_8ugA:10 a=ugqdcGqvHB9wOvkMhVYA:9 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 11 feb. 2020 kl. 16.43 skrev Eli Zaretskii : > Can't say I'm happy with these last-minute experiments, but okay. Thanks, and I think it's actually a lesser experiment than status quo ante. I'm allowing for more comments before pushing it; meanwhile, here is the follow-up patch mentioned earlier. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_1859A414-62A6-4E9B-BBF2-E05A74BBEEA4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 11 feb. 2020 kl. 16.43 skrev Eli Zaretskii : > Can't say I'm happy with these last-minute experiments, but okay. Thanks, and I think it's actually a lesser experiment than status quo = ante. I'm allowing for more comments before pushing it; meanwhile, here is the = follow-up patch mentioned earlier. --Apple-Mail=_1859A414-62A6-4E9B-BBF2-E05A74BBEEA4 Content-Disposition: attachment; filename=0001-rx-Improve-or-compositionality.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-rx-Improve-or-compositionality.patch" Content-Transfer-Encoding: quoted-printable =46rom=20dc4aadfdacc2466420833281c5374279eee03aca=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Tue,=2011=20Feb=202020=2020:04:42=20+0100=0A= Subject:=20[PATCH]=20rx:=20Improve=20'or'=20compositionality=0A=0A= Perform=20'regexp-opt'=20on=20nested=20'or'=20forms,=20and=20after=20= expansion=20of=0Auser-defined=20and=20'eval'=20forms.=20=20Characters=20= are=20now=20turned=20into=0Astrings=20for=20wider=20'regexp-opt'=20= scope.=0A=0A*=20doc/lispref/searching.texi=20(Rx=20Constructs):=20= Document.=0A*=20lisp/emacs-lisp/rx.el=20(rx--normalise-or-arg)=0A= rx--all-string-or-args):=20New.=0A(rx--translate-or):=20Normalise=20= arguments=20first,=20and=20check=20for=20strings=0Ain=20subforms.=0A= (rx--expand-eval):=20Extracted=20from=20rx--translate-eval.=0A= (rx--translate-eval):=20Call=20rx--expand-eval.=0A---=0A=20= doc/lispref/searching.texi=20=20=20=20=20=20=20|=20=205=20++-=0A=20= lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=2076=20= ++++++++++++++++++++------------=0A=20test/lisp/emacs-lisp/rx-tests.el=20= |=2013=20+++++-=0A=203=20files=20changed,=2063=20insertions(+),=2031=20= deletions(-)=0A=0Adiff=20--git=20a/doc/lispref/searching.texi=20= b/doc/lispref/searching.texi=0Aindex=205f4509a8b4..526ee77d40=20100644=0A= ---=20a/doc/lispref/searching.texi=0A+++=20b/doc/lispref/searching.texi=0A= @@=20-1081,8=20+1081,9=20@@=20Rx=20Constructs=0A=20@itemx=20@code{(|=20= @var{rx}@dots{})}=0A=20@cindex=20@code{|}=20in=20rx=0A=20Match=20exactly=20= one=20of=20the=20@var{rx}s.=0A-If=20all=20arguments=20are=20string=20= literals,=20the=20longest=20possible=20match=0A-will=20always=20be=20= used.=20=20Otherwise,=20either=20the=20longest=20match=20or=20the=0A+If=20= all=20arguments=20are=20strings,=20characters,=20or=20@code{or}=20forms=0A= +so=20constrained,=20the=20longest=20possible=20match=20will=20always=20= be=20used.=0A+Otherwise,=20either=20the=20longest=20match=20or=20the=0A=20= first=20(in=20left-to-right=20order)=20will=20be=20used.=0A=20Without=20= arguments,=20the=20expression=20will=20not=20match=20anything=20at=20= all.@*=0A=20Corresponding=20string=20regexp:=20= @samp{@var{A}\|@var{B}\|@dots{}}.=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= b4cab5715d..7a7d09f10b=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-254,22=20+254,39=20@@=20rx--foldl=0A=20=20= =20=20=20(setq=20l=20(cdr=20l)))=0A=20=20=20x)=0A=20=0A+(defun=20= rx--normalise-or-arg=20(form)=0A+=20=20"Normalise=20the=20`or'=20= argument=20FORM.=0A+Characters=20become=20strings,=20user-definitions=20= and=20`eval'=20forms=20are=20expanded,=0A+and=20`or'=20forms=20are=20= normalised=20recursively."=0A+=20=20(cond=20((characterp=20form)=0A+=20=20= =20=20=20=20=20=20=20(char-to-string=20form))=0A+=20=20=20=20=20=20=20=20= ((and=20(consp=20form)=20(memq=20(car=20form)=20'(or=20|)))=0A+=20=20=20=20= =20=20=20=20=20(cons=20(car=20form)=20(mapcar=20#'rx--normalise-or-arg=20= (cdr=20form))))=0A+=20=20=20=20=20=20=20=20((and=20(consp=20form)=20(eq=20= (car=20form)=20'eval))=0A+=20=20=20=20=20=20=20=20=20= (rx--normalise-or-arg=20(rx--expand-eval=20(cdr=20form))))=0A+=20=20=20=20= =20=20=20=20(t=0A+=20=20=20=20=20=20=20=20=20(let=20((expanded=20= (rx--expand-def=20form)))=0A+=20=20=20=20=20=20=20=20=20=20=20(if=20= expanded=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (rx--normalise-or-arg=20expanded)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20form)))))=0A+=0A+(defun=20rx--all-string-or-args=20(body)=0A+=20=20= "If=20BODY=20only=20consists=20of=20strings=20or=20such=20`or'=20forms,=20= return=20all=20the=20strings.=0A+Otherwise=20throw=20`rx--nonstring'."=0A= +=20=20(mapcan=20(lambda=20(form)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (cond=20((stringp=20form)=20(list=20form))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20((and=20(consp=20form)=20(memq=20(car=20form)=20= '(or=20|)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (rx--all-string-or-args=20(cdr=20form)))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(t=20(throw=20'rx--nonstring=20nil))))=0A+=20=20=20= =20=20=20=20=20=20=20body))=0A+=0A=20(defun=20rx--translate-or=20(body)=0A= =20=20=20"Translate=20an=20or-pattern=20of=20zero=20or=20more=20rx=20= items.=0A=20Return=20(REGEXP=20.=20PRECEDENCE)."=0A=20=20=20;;=20FIXME:=20= Possible=20improvements:=0A=20=20=20;;=0A-=20=20;;=20-=20Turn=20single=20= characters=20to=20strings:=20(or=20?a=20?b)=20->=20(or=20"a"=20"b"),=0A-=20= =20;;=20=20=20so=20that=20they=20can=20be=20candidates=20for=20= regexp-opt.=0A-=20=20;;=0A-=20=20;;=20-=20Translate=20compile-time=20= strings=20(`eval'=20forms),=20again=20for=20regexp-opt.=0A-=20=20;;=0A=20= =20=20;;=20-=20Flatten=20sub-patterns=20first:=20(or=20(or=20A=20B)=20= (or=20C=20D))=20->=20(or=20A=20B=20C=20D)=0A-=20=20;;=20=20=20in=20order=20= to=20improve=20effectiveness=20of=20regexp-opt.=0A-=20=20;;=20=20=20This=20= would=20also=20help=20composability.=0A-=20=20;;=0A-=20=20;;=20-=20Use=20= associativity=20to=20run=20regexp-opt=20on=20contiguous=20subsets=20of=20= arguments=0A-=20=20;;=20=20=20if=20not=20all=20of=20them=20are=20= strings.=20=20Example:=0A+=20=20;;=20=20=20Then=20call=20regexp-opt=20on=20= runs=20of=20string=20arguments.=20Example:=0A=20=20=20;;=20=20=20(or=20= (+=20digit)=20"CHARLIE"=20"CHAN"=20(+=20blank))=0A=20=20=20;;=20=20=20->=20= (or=20(+=20digit)=20(or=20"CHARLIE"=20"CHAN")=20(+=20blank))=0A=20=20=20= ;;=0A@@=20-279,27=20+296,26=20@@=20rx--translate-or=0A=20=20=20;;=20=20=20= so=20that=20(or=20"@"=20"%"=20digit=20(any=20"A-Z"=20space)=20(syntax=20= word))=0A=20=20=20;;=20=20=20=20=20=20=20=20->=20(any=20"@"=20"%"=20= digit=20"A-Z"=20space=20word)=0A=20=20=20;;=20=20=20=20=20=20=20=20->=20= "[A-Z@%[:digit:][:space:][:word:]]"=0A-=20=20;;=0A-=20=20;;=20Problem:=20= If=20a=20subpattern=20is=20carefully=20written=20to=20be=0A-=20=20;;=20= optimizable=20by=20regexp-opt,=20how=20do=20we=20prevent=20the=20= transforms=0A-=20=20;;=20above=20from=20destroying=20that=20property?=0A= -=20=20;;=20Example:=20(or=20"a"=20(or=20"abc"=20"abd"=20"abe"))=0A=20=20= =20(cond=0A=20=20=20=20((null=20body)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20;=20No=20items:=20a=20never-matching=20regexp.=0A= =20=20=20=20=20(rx--empty))=0A=20=20=20=20((null=20(cdr=20body))=20=20=20= =20=20=20=20=20=20=20=20=20=20=20;=20Single=20item.=0A=20=20=20=20=20= (rx--translate=20(car=20body)))=0A-=20=20=20((rx--every=20#'stringp=20= body)=20=20=20=20=20;=20All=20strings.=0A-=20=20=20=20(cons=20(list=20= (regexp-opt=20body=20nil))=0A-=20=20=20=20=20=20=20=20=20=20t))=0A-=20=20= =20((rx--every=20#'rx--charset-p=20body)=20=20;=20All=20charsets.=0A-=20=20= =20=20(rx--translate-union=20nil=20body))=0A=20=20=20=20(t=0A-=20=20=20=20= (cons=20(append=20(car=20(rx--translate=20(car=20body)))=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(mapcan=20(lambda=20(item)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(cons=20"\\|"=20(car=20(rx--translate=20item))))=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cdr=20= body)))=0A-=20=20=20=20=20=20=20=20=20=20nil))))=0A+=20=20=20=20(let*=20= ((args=20(mapcar=20#'rx--normalise-or-arg=20body))=0A+=20=20=20=20=20=20=20= =20=20=20=20(all-strings=20(catch=20'rx--nonstring=20= (rx--all-string-or-args=20args))))=0A+=20=20=20=20=20=20(cond=0A+=20=20=20= =20=20=20=20(all-strings=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20;=20Only=20strings.=0A+=20=20=20=20=20=20=20=20(cons=20= (list=20(regexp-opt=20all-strings=20nil))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20t))=0A+=20=20=20=20=20=20=20((rx--every=20#'rx--charset-p=20= args)=20=20;=20All=20charsets.=0A+=20=20=20=20=20=20=20=20= (rx--translate-union=20nil=20args))=0A+=20=20=20=20=20=20=20(t=0A+=20=20=20= =20=20=20=20=20(cons=20(append=20(car=20(rx--translate=20(car=20args)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (mapcan=20(lambda=20(item)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20"\\|"=20(car=20= (rx--translate=20item))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cdr=20args)))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20nil)))))))=0A=20=0A=20(defun=20= rx--charset-p=20(form)=0A=20=20=20"Whether=20FORM=20looks=20like=20a=20= charset,=20only=20consisting=20of=20character=20intervals=0A@@=20-836,11=20= +852,15=20@@=20rx--translate-literal=0A=20=20=20=20=20=20=20=20=20=20=20=20= (cons=20(list=20(list=20'regexp-quote=20arg))=20'seq))=0A=20=20=20=20=20=20= =20=20=20=20=20(t=20(error=20"rx=20`literal'=20form=20with=20non-string=20= argument")))))=0A=20=0A-(defun=20rx--translate-eval=20(body)=0A-=20=20= "Translate=20the=20`eval'=20form.=20=20Return=20(REGEXP=20.=20= PRECEDENCE)."=0A+(defun=20rx--expand-eval=20(body)=0A+=20=20"Expand=20= `eval'=20arguments.=20=20Return=20a=20new=20rx=20form."=0A=20=20=20= (unless=20(and=20body=20(null=20(cdr=20body)))=0A=20=20=20=20=20(error=20= "rx=20`eval'=20form=20takes=20exactly=20one=20argument"))=0A-=20=20= (rx--translate=20(eval=20(car=20body))))=0A+=20=20(eval=20(car=20body)))=0A= +=0A+(defun=20rx--translate-eval=20(body)=0A+=20=20"Translate=20the=20= `eval'=20form.=20=20Return=20(REGEXP=20.=20PRECEDENCE)."=0A+=20=20= (rx--translate=20(rx--expand-eval=20body)))=0A=20=0A=20(defvar=20= rx--regexp-atomic-regexp=20nil)=0A=20=0Adiff=20--git=20= a/test/lisp/emacs-lisp/rx-tests.el=20b/test/lisp/emacs-lisp/rx-tests.el=0A= index=20a6c172adfe..4db6eb8c9c=20100644=0A---=20= a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-42,13=20+42,24=20@@=20rx-seq=0A= =20(ert-deftest=20rx-or=20()=0A=20=20=20(should=20(equal=20(rx=20(or=20= "ab"=20(|=20"c"=20nonl)=20"de"))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20"ab\\|c\\|.\\|de"))=0A-=20=20(should=20(equal=20(rx=20(or=20= "ab"=20"abc"=20"a"))=0A+=20=20(should=20(equal=20(rx=20(or=20"ab"=20= "abc"=20?a))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\(?:a\\(?:bc?\\)?\\)"))=0A+=20=20(should=20(equal=20(rx=20(or=20"ab"=20= (|=20(or=20"abcd"=20"abcde"))=20(or=20"a"=20"abc")))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20= "\\(?:a\\(?:b\\(?:c\\(?:de?\\)?\\)?\\)?\\)"))=0A+=20=20(should=20(equal=20= (rx=20(or=20"a"=20(eval=20(string=20?a=20?b))))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20"\\(?:ab?\\)"))=0A=20=20=20(should=20(equal=20= (rx=20(|=20nonl=20"a")=20(|=20"b"=20blank))=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20"\\(?:.\\|a\\)\\(?:b\\|[[:blank:]]\\)"))=0A=20= =20=20(should=20(equal=20(rx=20(|))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"\\`a\\`")))=0A=20=0A+(ert-deftest=20rx-def-in-or=20()=0A= +=20=20(rx-let=20((a=20b)=0A+=20=20=20=20=20=20=20=20=20=20=20(b=20(or=20= "abc"=20c))=0A+=20=20=20=20=20=20=20=20=20=20=20(c=20?a))=0A+=20=20=20=20= (should=20(equal=20(rx=20(or=20a=20(|=20"ab"=20"abcde")=20"abcd"))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\(?:a\\(?:b\\(?:c\\(?:de?\\)?\\)?\\)?\\)"))))=0A+=0A=20(ert-deftest=20= rx-char-any=20()=0A=20=20=20"Test=20character=20alternatives=20with=20= `]'=20and=20`-'=20(Bug#25123)."=0A=20=20=20(should=20(equal=0A--=20=0A= 2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_1859A414-62A6-4E9B-BBF2-E05A74BBEEA4-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Feb 2020 00:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii Cc: psainty@orcon.net.nz, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158146876721593 (code B ref 37659); Wed, 12 Feb 2020 00:53:01 +0000 Received: (at 37659) by debbugs.gnu.org; 12 Feb 2020 00:52:47 +0000 Received: from localhost ([127.0.0.1]:57738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1gGk-0005cC-MZ for submit@debbugs.gnu.org; Tue, 11 Feb 2020 19:52:47 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1gGi-0005bw-IA for 37659@debbugs.gnu.org; Tue, 11 Feb 2020 19:52:45 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E4425160061; Tue, 11 Feb 2020 16:52:38 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id R3_yD3ckC9kQ; Tue, 11 Feb 2020 16:52:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 46C4116006B; Tue, 11 Feb 2020 16:52:38 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5_aLFvma6DoE; Tue, 11 Feb 2020 16:52:38 -0800 (PST) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2A5E7160061; Tue, 11 Feb 2020 16:52:38 -0800 (PST) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> Date: Tue, 11 Feb 2020 16:52:37 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 2/11/20 11:17 AM, Mattias Engdeg=C3=A5rd wrote: >> Can't say I'm happy with these last-minute experiments, but okay. > Thanks, and I think it's actually a lesser experiment than status quo a= nte. I agree with both of you. I assume the followon patch "rx: Improve 'or' compositionality" is for=20 the master branch. I didn't look at it carefully but the basic idea is=20 sound. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Feb 2020 11:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: Phil Sainty , Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158150654813534 (code B ref 37659); Wed, 12 Feb 2020 11:23:01 +0000 Received: (at 37659) by debbugs.gnu.org; 12 Feb 2020 11:22:28 +0000 Received: from localhost ([127.0.0.1]:57902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1q68-0003WE-6R for submit@debbugs.gnu.org; Wed, 12 Feb 2020 06:22:28 -0500 Received: from mail1460c50.megamailservers.eu ([91.136.14.60]:43600 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1q66-0003Vy-FK for 37659@debbugs.gnu.org; Wed, 12 Feb 2020 06:22:27 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581506530; bh=58Tf43ywpJ6/snxD3N14hfIf5Mmvcham6sZoMMtN75U=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KXy1H7LEJFV+wh4kDATzUhIOS22TymHQEzFx7KVZIrNRCOLyB+z8YT+YcqQDLq5Df L6MtFJ28l+SUnP/z4993kORqs7W3E+bnd0s98/M0D5eW2GMqgt/wmuqK/ugEWIx3Mo W7dyhp7whSRiKPGjFxSfLUWUlM9jCLdWO2OYFu5c= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01CBM7f3020420; Wed, 12 Feb 2020 11:22:09 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> Date: Wed, 12 Feb 2020 12:22:06 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020D.5E43DFE2.0025, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OY7m8SbY c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=gW2g2mh_uxlCSyPkli8A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 12 feb. 2020 kl. 01.52 skrev Paul Eggert : > I assume the followon patch "rx: Improve 'or' compositionality" is for the master branch. Right -- while it would make sense for emacs-27, as user-defined forms were introduced in that version, it is not strictly necessary and could well be done on master. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ucla.edu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 12 feb. 2020 kl. 01.52 skrev Paul Eggert : > I assume the followon patch "rx: Improve 'or' compositionality" is for = the master branch. Right -- while it would make sense for emacs-27, as user-defined forms = were introduced in that version, it is not strictly necessary and could = well be done on master. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 18:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: Phil Sainty , Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158161913924389 (code B ref 37659); Thu, 13 Feb 2020 18:39:01 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 18:38:59 +0000 Received: from localhost ([127.0.0.1]:60437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JO6-0006LJ-Nr for submit@debbugs.gnu.org; Thu, 13 Feb 2020 13:38:58 -0500 Received: from mail211c50.megamailservers.eu ([91.136.10.221]:56100 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JO4-0006L9-OY for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 13:38:57 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581619126; bh=1fjGl670RSdcBqTVqUSpR8NPDEvQEeiKb3uLOk7nCOE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=r7ha0sKgu9MlAc0IvAr0ndnxhkXGiz2dV5RXDZdRUkxENUG9DwpQizhNCVi+9MXE/ m6hRGvFIJ/+6xRmbLiQ6YVOBWpWdJ8cF0WpEMkBCmaPgmGvGkjepFFCQklCyeRkZo1 I4u8E+wExywpDk3LOf8olslLlqecWSwZKVA4RKEg= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01DIcg65006156; Thu, 13 Feb 2020 18:38:44 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 13 Feb 2020 19:38:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0211.5E4597B6.0001, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A9kSwJeG c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OsFDD2vA0YTtV22M56cA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Now the regexp-opt KEEP-ORDER argument no longer serves any purpose; it = was added for use by rx, and has no obvious use elsewhere. It could = safely be removed to save some weight, unless you prefer it be kept as = scar tissue. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 18:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Phil Sainty , Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158161985125435 (code B ref 37659); Thu, 13 Feb 2020 18:51:02 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 18:50:51 +0000 Received: from localhost ([127.0.0.1]:60441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JZa-0006cB-RA for submit@debbugs.gnu.org; Thu, 13 Feb 2020 13:50:51 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2JZZ-0006bx-4n for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 13:50:49 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 17EB1160058; Thu, 13 Feb 2020 10:50:43 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jO3-4fKplsYb; Thu, 13 Feb 2020 10:50:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 264081600B8; Thu, 13 Feb 2020 10:50:42 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BZVwWW6A0j8b; Thu, 13 Feb 2020 10:50:42 -0800 (PST) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0BE25160058; Thu, 13 Feb 2020 10:50:42 -0800 (PST) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> Date: Thu, 13 Feb 2020 10:50:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 2/13/20 10:38 AM, Mattias Engdeg=C3=A5rd wrote: > Now the regexp-opt KEEP-ORDER argument no longer serves any purpose; it= was added for use by rx, and has no obvious use elsewhere. It could safe= ly be removed to save some weight, unless you prefer it be kept as scar t= issue. Simplest would be to remove it in Emacs 27, and merge that change into=20 master. If that's too drastic, we can mark it as deprecated in Emacs 27 (though=20 it is odd for a release to add a feature that is immediately=20 deprecated), and remove it in the master branch. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: Phil Sainty , Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158162140627872 (code B ref 37659); Thu, 13 Feb 2020 19:17:02 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 19:16:46 +0000 Received: from localhost ([127.0.0.1]:60471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Jyg-0007FU-73 for submit@debbugs.gnu.org; Thu, 13 Feb 2020 14:16:46 -0500 Received: from mail156c50.megamailservers.eu ([91.136.10.166]:44672 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Jyd-0007FK-T8 for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 14:16:44 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581621392; bh=WbCzUnjBvmdoPiyDQYs47gqk+CJeFmj8ORg4zu89rzs=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Nh1HfLVBcDVldG5LeOnusAgPzwRiK+loIOypibaC6afZXN3KsMviX75QmfLdSpjDe knC0M24KqMsQSOleuXKLaBTtfuc4y3C9KPN8Yr6XSEaHdie8dAP8b8waYZKkdW5Fx9 MJcg4tREZvD80GiM+xF732pw7j8UhuwFX/vQEW7s= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01DJGSvU005597; Thu, 13 Feb 2020 19:16:31 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Thu, 13 Feb 2020 20:16:28 +0100 In-Reply-To: <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0205.5E45A090.0016, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=LO0Yv6e9 c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=PY8D7hP_wHavmTO7WfsA:9 a=CjuIK1q_8ugA:10 a=tYfFjs-VskjSegQuIcEA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 13 feb. 2020 kl. 19.50 skrev Paul Eggert : > Simplest would be to remove it in Emacs 27, and merge that change into = master. Right, introducing it already deprecated doesn't make sense at all. I'll = do it in emacs-27 if Eli doesn't mind too much (patch attached). --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051 Content-Disposition: attachment; filename=0001-Remove-the-optional-KEEP-ORDER-argument-to-regexp-op.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Remove-the-optional-KEEP-ORDER-argument-to-regexp-op.patch" Content-Transfer-Encoding: quoted-printable =46rom=2079ecef631e667650418b187143c4059d7e6eebe6=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2013=20Feb=202020=2020:06:48=20+0100=0A= Subject:=20[PATCH]=20Remove=20the=20optional=20KEEP-ORDER=20argument=20= to=20regexp-opt=0A=0AThis=20argument=20was=20added=20for=20the=20'or'=20= clause=20in=20rx,=20but=20it=20turned=20out=0Ato=20be=20a=20bad=20idea=20= (bug#37659),=20and=20there=20seems=20to=20be=20little=20other=20use=0A= for=20it.=0A=0A*=20lisp/emacs-lisp/regexp-opt.el=20(regexp-opt):=20= Remove=20KEEP-ORDER.=0A*=20doc/lispref/searching.texi=20(Regexp=20= Functions):=0A*=20etc/NEWS:=20Remove=20it=20from=20the=20documentation.=0A= *=20test/lisp/emacs-lisp/regexp-opt-tests.el=20= (regexp-opt-test--match-all)=0A(regexp-opt-test--check-perm,=20= regexp-opt-test--explain-perm)=0A(regexp-opt-keep-order,=20= regexp-opt-longest-match):=20Simplify=20test.=0A---=0A=20= doc/lispref/searching.texi=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20= =209=20++---=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=207=20----=0A=20= lisp/emacs-lisp/regexp-opt.el=20=20=20=20=20=20=20=20=20=20=20=20|=2043=20= +++++------------------=0A=20test/lisp/emacs-lisp/regexp-opt-tests.el=20= |=2044=20++++--------------------=0A=204=20files=20changed,=2019=20= insertions(+),=2084=20deletions(-)=0A=0Adiff=20--git=20= a/doc/lispref/searching.texi=20b/doc/lispref/searching.texi=0Aindex=20= 5f4509a8b4..1f6db0643e=20100644=0A---=20a/doc/lispref/searching.texi=0A= +++=20b/doc/lispref/searching.texi=0A@@=20-1745,7=20+1745,7=20@@=20= Regexp=20Functions=0A=20@end=20defun=0A=20=0A=20@cindex=20optimize=20= regexp=0A-@defun=20regexp-opt=20strings=20&optional=20paren=20keep-order=0A= +@defun=20regexp-opt=20strings=20&optional=20paren=0A=20This=20function=20= returns=20an=20efficient=20regular=20expression=20that=20will=20match=0A=20= any=20of=20the=20strings=20in=20the=20list=20@var{strings}.=20=20This=20= is=20useful=20when=20you=0A=20need=20to=20make=20matching=20or=20= searching=20as=20fast=20as=20possible---for=20example,=0A@@=20-1783,11=20= +1783,8=20@@=20Regexp=20Functions=0A=20it=20will=20apply=20to=20the=20= whole=20expression.=0A=20@end=20table=0A=20=0A-The=20optional=20argument=20= @var{keep-order},=20if=20non-@code{nil},=20forces=20the=0A-match=20to=20= be=20performed=20in=20the=20order=20given,=20as=20if=20the=20strings=20= were=20made=0A-into=20a=20regexp=20by=20joining=20them=20with=20the=20= @samp{\|}=20operator.=20=20If=20nil=20or=0A-omitted,=20the=20returned=20= regexp=20will=20always=20match=20the=20longest=20string=0A-possible.=0A= +The=20returned=20regexp=20is=20ordered=20in=20such=20a=20way=20that=20= it=20will=20always=20match=0A+the=20longest=20string=20possible.=0A=20=0A= =20Up=20to=20reordering,=20the=20resulting=20regexp=20of=20= @code{regexp-opt}=20is=0A=20equivalent=20to=20but=20usually=20more=20= efficient=20than=20that=20of=20a=20simplified=0Adiff=20--git=20= a/etc/NEWS=20b/etc/NEWS=0Aindex=20312869fe57..380ac71260=20100644=0A---=20= a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-3526,13=20+3526,6=20@@=20the=20= process.=20=20That=20way=20'make-process'=20can=20start=20remote=20= processes.=0A=20This=20is=20currently=20supported=20on=20GNUish=20hosts=20= and=20on=20modern=20versions=20of=0A=20MS-Windows.=0A=20=0A-+++=0A-**=20= The=20function=20'regexp-opt'=20accepts=20an=20additional=20optional=20= argument.=0A-By=20default,=20the=20regexp=20returned=20by=20'regexp-opt'=20= may=20match=20the=20strings=0A-in=20any=20order.=20=20If=20the=20new=20= third=20argument=20is=20non-nil,=20the=20match=20is=0A-guaranteed=20to=20= be=20performed=20in=20the=20order=20given,=20as=20if=20the=20strings=20= were=0A-made=20into=20a=20regexp=20by=20joining=20them=20with=20'\|'.=0A= -=0A=20+++=0A=20**=20The=20function=20'regexp-opt',=20when=20given=20an=20= empty=20list=20of=20strings,=20now=0A=20returns=20a=20regexp=20that=20= never=20matches=20anything,=20which=20is=20an=20identity=20for=0Adiff=20= --git=20a/lisp/emacs-lisp/regexp-opt.el=20= b/lisp/emacs-lisp/regexp-opt.el=0Aindex=202cce4e6353..35a5fda184=20= 100644=0A---=20a/lisp/emacs-lisp/regexp-opt.el=0A+++=20= b/lisp/emacs-lisp/regexp-opt.el=0A@@=20-84,7=20+84,7=20@@=0A=20;;;=20= Code:=0A=20=0A=20;;;###autoload=0A-(defun=20regexp-opt=20(strings=20= &optional=20paren=20keep-order)=0A+(defun=20regexp-opt=20(strings=20= &optional=20paren)=0A=20=20=20"Return=20a=20regexp=20to=20match=20a=20= string=20in=20the=20list=20STRINGS.=0A=20Each=20member=20of=20STRINGS=20= is=20treated=20as=20a=20fixed=20string,=20not=20as=20a=20regexp.=0A=20= Optional=20PAREN=20specifies=20how=20the=20returned=20regexp=20is=20= surrounded=20by=0A@@=20-114,11=20+114,8=20@@=20regexp-opt=0A=20=20=20=20=20= necessary=20to=20ensure=20that=20a=20postfix=20operator=20appended=20to=20= it=20will=0A=20=20=20=20=20apply=20to=20the=20whole=20expression.=0A=20=0A= -The=20optional=20argument=20KEEP-ORDER,=20if=20non-nil,=20forces=20the=20= match=20to=0A-be=20performed=20in=20the=20order=20given,=20as=20if=20the=20= strings=20were=20made=20into=0A-a=20regexp=20by=20joining=20them=20with=20= the=20`\\|'=20operator.=20=20If=20nil=20or=0A-omitted,=20the=20returned=20= regexp=20is=20will=20always=20match=20the=20longest=0A-string=20= possible.=0A+The=20returned=20regexp=20is=20ordered=20in=20such=20a=20= way=20that=20it=20will=20always=0A+match=20the=20longest=20string=20= possible.=0A=20=0A=20Up=20to=20reordering,=20the=20resulting=20regexp=20= is=20equivalent=20to=20but=0A=20usually=20more=20efficient=20than=20that=20= of=20a=20simplified=20version:=0A@@=20-140,34=20+137,12=20@@=20= regexp-opt=0A=20=09=20=20=20(completion-ignore-case=20nil)=0A=20=09=20=20= =20(completion-regexp-list=20nil)=0A=20=09=20=20=20(open=20(cond=20= ((stringp=20paren)=20paren)=20(paren=20"\\(")))=0A-=09=20=20=20(re=0A-=20= =20=20=20=20=20=20=20=20=20=20=20(cond=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20No=20strings:=20return=20an=20unmatchable=20regexp.=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20((null=20strings)=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(concat=20(or=20open=20"\\(?:")=20regexp-unmatchable=20= "\\)"))=0A-=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20The=20= algorithm=20will=20generate=20a=20pattern=20that=20matches=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20;;=20longer=20strings=20in=20the=20list=20= before=20shorter.=20=20If=20the=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20list=20order=20matters,=20then=20no=20string=20must=20come=20after=20= a=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20proper=20prefix=20of=20= that=20string.=20=20To=20check=20this,=20verify=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20that=20a=20straight=20or-pattern=20matches=20each=20= string=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20entirely.=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20((and=20keep-order=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20((case-fold-search=20nil)=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(alts=20(mapconcat=20#'regexp-quote=20strings=20"\\|")))=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(and=20(let=20((s=20= strings))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(while=20(and=20s=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(string-match=20alts=20(car=20s))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(=3D=20(match-end=200)=20(length=20(car=20s))))=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(setq=20s=20(cdr=20s)))=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20If=20we=20= exited=20early,=20we=20found=20evidence=20that=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= regexp-opt-group=20cannot=20be=20used.=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20s)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(concat=20= (or=20open=20"\\(?:")=20alts=20"\\)")))))=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20(t=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (regexp-opt-group=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (delete-dups=20(sort=20(copy-sequence=20strings)=20'string-lessp))=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(or=20open=20t)=20(not=20= open))))))=0A+=09=20=20=20(re=20(if=20strings=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(regexp-opt-group=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(delete-dups=20(sort=20= (copy-sequence=20strings)=20'string-lessp))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(or=20open=20t)=20(not=20open))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20No=20strings:=20return=20= an=20unmatchable=20regexp.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(concat=20(or=20open=20"\\(?:")=20regexp-unmatchable=20"\\)"))))=0A= =20=20=20=20=20=20=20(cond=20((eq=20paren=20'words)=0A=20=09=20=20=20=20=20= (concat=20"\\<"=20re=20"\\>"))=0A=20=09=20=20=20=20((eq=20paren=20= 'symbols)=0Adiff=20--git=20a/test/lisp/emacs-lisp/regexp-opt-tests.el=20= b/test/lisp/emacs-lisp/regexp-opt-tests.el=0Aindex=20= 9b4567c72c..0179ac4f1f=20100644=0A---=20= a/test/lisp/emacs-lisp/regexp-opt-tests.el=0A+++=20= b/test/lisp/emacs-lisp/regexp-opt-tests.el=0A@@=20-47,43=20+47,13=20@@=20= regexp-opt-test--permutations=0A=20=20=20(mapcar=20(lambda=20(i)=20= (regexp-opt-test--permutation=20i=20list))=0A=20=20=20=20=20=20=20=20=20=20= =20(number-sequence=200=20(1-=20(regexp-opt-test--factorial=20(length=20= list))))))=0A=20=0A-(defun=20regexp-opt-test--match-all=20(words=20re)=0A= -=20=20(mapcar=20(lambda=20(w)=20(and=20(string-match=20re=20w)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-string=200=20w)))=0A-=20=20=20=20=20=20=20=20=20=20words))=0A-=0A= -(defun=20regexp-opt-test--check-perm=20(perm)=0A-=20=20(let*=20((ref-re=20= (mapconcat=20#'regexp-quote=20perm=20"\\|"))=0A-=20=20=20=20=20=20=20=20=20= (opt-re=20(regexp-opt=20perm=20nil=20t))=0A-=20=20=20=20=20=20=20=20=20= (ref=20(regexp-opt-test--match-all=20perm=20ref-re))=0A-=20=20=20=20=20=20= =20=20=20(opt=20(regexp-opt-test--match-all=20perm=20opt-re)))=0A-=20=20=20= =20(equal=20opt=20ref)))=0A-=0A-(defun=20regexp-opt-test--explain-perm=20= (perm)=0A-=20=20(let*=20((ref-re=20(mapconcat=20#'regexp-quote=20perm=20= "\\|"))=0A-=20=20=20=20=20=20=20=20=20(opt-re=20(regexp-opt=20perm=20nil=20= t))=0A-=20=20=20=20=20=20=20=20=20(ref=20(regexp-opt-test--match-all=20= perm=20ref-re))=0A-=20=20=20=20=20=20=20=20=20(opt=20= (regexp-opt-test--match-all=20perm=20opt-re)))=0A-=20=20=20=20(concat=20= "\n"=0A-=20=20=20=20=20=20=20=20=20=20=20=20(format=20"Na=C3=AFve=20= regexp:=20=20=20=20=20%s\n"=20ref-re)=0A-=20=20=20=20=20=20=20=20=20=20=20= =20(format=20"Optimized=20regexp:=20%s\n"=20opt-re)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20(format=20"Got:=20=20=20=20=20=20%s\n"=20opt)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20(format=20"Expected:=20%s\n"=20ref))))=0A-=0A= -(put=20'regexp-opt-test--check-perm=20'ert-explainer=20= 'regexp-opt-test--explain-perm)=0A-=0A-(ert-deftest=20= regexp-opt-keep-order=20()=0A-=20=20"Check=20that=20KEEP-ORDER=20works."=0A= -=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20'("abc"=20= "bca"=20"cab")))=0A-=20=20=20=20(should=20(regexp-opt-test--check-perm=20= perm)))=0A-=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("abc"=20"ab"=20"bca"=20"bc")))=0A-=20=20=20=20(should=20= (regexp-opt-test--check-perm=20perm)))=0A-=20=20(dolist=20(perm=20= (regexp-opt-test--permutations=20'("abxy"=20"cdxy")))=0A-=20=20=20=20= (should=20(regexp-opt-test--check-perm=20perm)))=0A-=20=20(dolist=20= (perm=20(regexp-opt-test--permutations=20'("afgx"=20"bfgx"=20"afgy"=20= "bfgy")))=0A-=20=20=20=20(should=20(regexp-opt-test--check-perm=20= perm)))=0A-=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("a"=20"ab"=20"ac"=20"abc")))=0A-=20=20=20=20(should=20= (regexp-opt-test--check-perm=20perm))))=0A+(ert-deftest=20= regexp-opt-longest-match=20()=0A+=20=20"Check=20that=20the=20regexp=20= always=20matches=20as=20much=20as=20possible."=0A+=20=20(let=20((s=20= "abcd"))=0A+=20=20=20=20(dolist=20(perm=20(regexp-opt-test--permutations=20= '("a"=20"ab"=20"ac"=20"abc")))=0A+=20=20=20=20=20=20(should=20(equal=20= (and=20(string-match=20(regexp-opt=20perm)=20s)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(match-string=200=20= s))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "abc")))))=0A=20=0A=20(ert-deftest=20regexp-opt-charset=20()=0A=20=20=20= (should=20(equal=20(regexp-opt-charset=20'(?a=20?b=20?a))=20"[ab]"))=0A= --=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_1B8D64C6-2886-4D47-8027-152A60198051-- From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 19:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: psainty@orcon.net.nz, eggert@cs.ucla.edu, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158162225429288 (code B ref 37659); Thu, 13 Feb 2020 19:31:01 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 19:30:54 +0000 Received: from localhost ([127.0.0.1]:60485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2KCM-0007cI-4G for submit@debbugs.gnu.org; Thu, 13 Feb 2020 14:30:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2KCK-0007c5-Hs for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 14:30:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2KCC-0007lQ-LE; Thu, 13 Feb 2020 14:30:45 -0500 Received: from [176.228.60.248] (port=4942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2KC5-0007km-GG; Thu, 13 Feb 2020 14:30:43 -0500 Date: Thu, 13 Feb 2020 21:30:39 +0200 Message-Id: <8336beqo80.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Thu, 13 Feb 2020 20:16:28 +0100) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Mattias EngdegÄrd > Date: Thu, 13 Feb 2020 20:16:28 +0100 > Cc: Eli Zaretskii , Phil Sainty , > 37659@debbugs.gnu.org > > > Simplest would be to remove it in Emacs 27, and merge that change into master. > > Right, introducing it already deprecated doesn't make sense at all. I'll do it in emacs-27 if Eli doesn't mind too much (patch attached). Fine with me, thanks. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 22:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: psainty@orcon.net.nz, eggert@cs.ucla.edu, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158163260520136 (code B ref 37659); Thu, 13 Feb 2020 22:24:02 +0000 Received: (at 37659) by debbugs.gnu.org; 13 Feb 2020 22:23:25 +0000 Received: from localhost ([127.0.0.1]:60567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2MtI-0005Eh-QE for submit@debbugs.gnu.org; Thu, 13 Feb 2020 17:23:25 -0500 Received: from mail1466c50.megamailservers.eu ([91.136.14.66]:56306 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2MtF-0005EL-Ns for 37659@debbugs.gnu.org; Thu, 13 Feb 2020 17:23:22 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581632586; bh=Fas4B8CFW2cDJ1pOkhxz7NPHu999xTydwL+Z58uxfys=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ZDQGMsTyKsQ5tvwemmV7l30tJbJMAAp9I3AW9shG1i1ARrlMoxMKhzWyTsQdqizjV tczNDJSWFuF5zCb6cl66i2af+fSOhSR7vpYMrThaW9oqvYbt9CB7uMKF4gQkxAzBNe BkQ2S3cbeQC5R6l97MWEE+JQLOEPohMifzDJ8C88= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01DMN2kY006218; Thu, 13 Feb 2020 22:23:04 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <8336beqo80.fsf@gnu.org> Date: Thu, 13 Feb 2020 23:23:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> <8336beqo80.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0209.5E45CC4A.0001, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=J53UEzvS c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=gWrKUTQy3hy08uU2OeEA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 13 feb. 2020 kl. 20.30 skrev Eli Zaretskii : > Fine with me, thanks. Thank you, pushed. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 13 feb. 2020 kl. 20.30 skrev Eli Zaretskii : > Fine with me, thanks. Thank you, pushed. Now only the 'compositionality' patch remains. As noted it could be done = on master, but since it is motivated by user-defined forms which were = introduced in Emacs 27, I'd rather like it to be done in that branch. It simply seems a bit incomplete otherwise. Users read about the = longest-match guarantee of 'or', and of user-definitions, and look for a = way of combining the two. Perhaps they try (rx-let ((arith-op (or "+" "-" "*" "/")) (assign-op (or "=3D" "+=3D" "-=3D" "*=3D" "/=3D")) (op (or arith-op assign-op))) ...) which doesn't quite work for matching "+=3D", say. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: psainty@orcon.net.nz, eggert@cs.ucla.edu, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158166634423145 (code B ref 37659); Fri, 14 Feb 2020 07:46:02 +0000 Received: (at 37659) by debbugs.gnu.org; 14 Feb 2020 07:45:44 +0000 Received: from localhost ([127.0.0.1]:60796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2VfT-00061F-NO for submit@debbugs.gnu.org; Fri, 14 Feb 2020 02:45:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2VfR-00060z-0j for 37659@debbugs.gnu.org; Fri, 14 Feb 2020 02:45:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2VfL-0007P2-8J; Fri, 14 Feb 2020 02:45:35 -0500 Received: from [176.228.60.248] (port=1864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2VfH-0007p4-DM; Fri, 14 Feb 2020 02:45:34 -0500 Date: Fri, 14 Feb 2020 09:45:34 +0200 Message-Id: <83y2t5pq75.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Thu, 13 Feb 2020 23:23:01 +0100) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> <8336beqo80.fsf@gnu.org> <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Mattias EngdegÄrd > Date: Thu, 13 Feb 2020 23:23:01 +0100 > Cc: eggert@cs.ucla.edu, psainty@orcon.net.nz, 37659@debbugs.gnu.org > > Now only the 'compositionality' patch remains. As noted it could be done on master, but since it is motivated by user-defined forms which were introduced in Emacs 27, I'd rather like it to be done in that branch. > > It simply seems a bit incomplete otherwise. The important question is: is "incomplete" really so bad here. We have a few features that need to be completed in future releases, so this one isn't alone. I don't have a strong opinion either way. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: psainty@orcon.net.nz, 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158169695414992 (code B ref 37659); Fri, 14 Feb 2020 16:16:02 +0000 Received: (at 37659) by debbugs.gnu.org; 14 Feb 2020 16:15:54 +0000 Received: from localhost ([127.0.0.1]:34560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2ddB-0003tk-T9 for submit@debbugs.gnu.org; Fri, 14 Feb 2020 11:15:54 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2dd8-0003tT-W4 for 37659@debbugs.gnu.org; Fri, 14 Feb 2020 11:15:52 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7C44F16009E; Fri, 14 Feb 2020 08:15:45 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hiGR7d26Wo9W; Fri, 14 Feb 2020 08:15:44 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B5AB21600BA; Fri, 14 Feb 2020 08:15:44 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M9i5Ybiak-ZH; Fri, 14 Feb 2020 08:15:44 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2A45916009E; Fri, 14 Feb 2020 08:15:44 -0800 (PST) References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> <8336beqo80.fsf@gnu.org> <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> <83y2t5pq75.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <6cd2fba8-bc54-6784-cf35-acae470b86a0@cs.ucla.edu> Date: Fri, 14 Feb 2020 08:15:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <83y2t5pq75.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 2/13/20 11:45 PM, Eli Zaretskii wrote: > I don't have a strong opinion either way. How about this idea: if the compositionality patch affects only forms introduced in Emacs 27, then it's OK to put it into Emacs 27. If it affects forms that have been around since Emacs 26, it might be safer to put the patch into the master branch. (I haven't looked at the patch in detail.) From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: psainty@orcon.net.nz, Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.158171336023972 (code B ref 37659); Fri, 14 Feb 2020 20:50:01 +0000 Received: (at 37659) by debbugs.gnu.org; 14 Feb 2020 20:49:20 +0000 Received: from localhost ([127.0.0.1]:34772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2hto-0006Ea-BY for submit@debbugs.gnu.org; Fri, 14 Feb 2020 15:49:20 -0500 Received: from mail228c50.megamailservers.eu ([91.136.10.238]:49742 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2htl-0006EQ-WF for 37659@debbugs.gnu.org; Fri, 14 Feb 2020 15:49:19 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581713345; bh=LNGUtBOcigaMQOqRwwu3VSUkC9BDAN8/OZn2TMHowSg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=tI0uzQL9JLM+Ihb6NYJDI9YyRSYgIMPWxYZv6k305VdZiyu6Rn6xGqOh/gDPUijdG 0hWZYPVo69x/OBvaLGY7mJ3Z4D2OTsaEa8BimErJ/d/9Ig1lnY1d3A5e3XOk8j+7qB E1A45VYp4Uug/7nKVTBnG3aX8HJ9zS27Kjxmmerc= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01EKn1ZS013998; Fri, 14 Feb 2020 20:49:03 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <6cd2fba8-bc54-6784-cf35-acae470b86a0@cs.ucla.edu> Date: Fri, 14 Feb 2020 21:49:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <8CA2BCC5-7558-4523-9880-EA397A95B958@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> <8336beqo80.fsf@gnu.org> <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> <83y2t5pq75.fsf@gnu.org> <6cd2fba8-bc54-6784-cf35-acae470b86a0@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0205.5E4707C1.0003, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=bd8Vr9HB c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=j-H0ebYbrs4BSkZOu2wA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 14 feb. 2020 kl. 17.15 skrev Paul Eggert : > How about this idea: if the compositionality patch affects only forms introduced in Emacs 27, then it's OK to put it into Emacs 27. If it affects forms that have been around since Emacs 26, it might [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ucla.edu] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 14 feb. 2020 kl. 17.15 skrev Paul Eggert : > How about this idea: if the compositionality patch affects only forms = introduced in Emacs 27, then it's OK to put it into Emacs 27. If it = affects forms that have been around since Emacs 26, it might be safer to = put the patch into the master branch. It is a reasonable criterion. In theory the patch might affect existing = code, since it enables maximal matching for nested 'or' trees of string = literals. The expression (rx (or (or "a" "abc") (or "ab" "abcd"))) will currently not match the whole string "abcd", but with the patch, it = would, as if flattened. The reasoning is that this is more useful, = composable, and always what the user wants. Whether this makes a difference for actually existing code is anyone's = guess. From unknown Sun Jun 22 07:59:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37659: rx additions: anychar, unmatchable, unordered-or Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Mar 2020 10:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: psainty@orcon.net.nz, Eli Zaretskii , 37659@debbugs.gnu.org Received: via spool by 37659-submit@debbugs.gnu.org id=B37659.15830573965764 (code B ref 37659); Sun, 01 Mar 2020 10:10:02 +0000 Received: (at 37659) by debbugs.gnu.org; 1 Mar 2020 10:09:56 +0000 Received: from localhost ([127.0.0.1]:35798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8LXo-0001Uu-6V for submit@debbugs.gnu.org; Sun, 01 Mar 2020 05:09:56 -0500 Received: from mail224c50.megamailservers.eu ([91.136.10.234]:55022 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8LXl-0001Uk-8W for 37659@debbugs.gnu.org; Sun, 01 Mar 2020 05:09:54 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1583057381; bh=chS5cGOVcJD97qDrVB1tV11ooyA+s/7HS3LmMKnfa1E=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=GNGcPWsAs/s/rqOLybta8h/Eu5NLiZzmxv30Jgy90zXuhkcI+yEX2lGU/fTOzdtCJ oLspgXQr9lVJCRpBTsmTflHYDmGsGXn3opk+qzcVrVz2rwW0QJhWDQK7Skm6WN4nD6 sfXx85ZdVWFBIRuVFmfC4CU+Cduk/8Nue2uSVfXY= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 021A9bVX026371; Sun, 1 Mar 2020 10:09:40 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <6cd2fba8-bc54-6784-cf35-acae470b86a0@cs.ucla.edu> Date: Sun, 1 Mar 2020 11:09:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0AE9F3E1-0A88-4090-8687-3721849EA99E@acm.org> References: <88571301-3F15-428F-82F9-60A23D817EF8@acm.org> <2F3A70C9-969B-4E86-998E-BF3CC990B769@acm.org> <838sl9ruxe.fsf@gnu.org> <1040da3e-670e-385c-0365-bd91c9d0839f@cs.ucla.edu> <4223FF58-0F5C-4DE8-8BE0-7DF40CBF64C9@acm.org> <6aa5c232-e3df-751a-a7dc-30d430924385@cs.ucla.edu> <4942C948-4FF4-4E47-B713-F8D6D60F8A84@acm.org> <8336beqo80.fsf@gnu.org> <12A58AE7-C821-4F65-89F1-65A818D350BE@acm.org> <83y2t5pq75.fsf@gnu.org> <6cd2fba8-bc54-6784-cf35-acae470b86a0@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A782F1F.5E5B89E1.0062, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=ccisUULM c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=g_1oPT0bWKPZTxT5s3oA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) I've belatedly made up my mind about this and now firmly believe that = the compositioning xr patch belongs in emacs-27 and have therefore = pushed it to that branch. Sorry about the long deliberation. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 04 12:43:00 2020 Received: (at control) by debbugs.gnu.org; 4 Mar 2020 17:43:00 +0000 Received: from localhost ([127.0.0.1]:41805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9Y2t-0001II-S0 for submit@debbugs.gnu.org; Wed, 04 Mar 2020 12:43:00 -0500 Received: from mail1466c50.megamailservers.eu ([91.136.14.66]:49878 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9Y2s-0001I2-HV for control@debbugs.gnu.org; Wed, 04 Mar 2020 12:42:59 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1583343771; bh=c1Yrd/jLrAdSxXZUKjlIX9ROu18fDy6a9iqZLuhyGhE=; h=From:Subject:Date:To:From; b=TC3oJ75U77xECb/Kza8ZusyPfWxJpuRhbG0xITZlWZ7u4RQYRQxbJGOCG9N8Z4jtA f8mPYKe+wPLVdQwEAzxWe6YZvs3oMVjt4TpUSJEZQeXX9/TizV7yysVWXCD1h8MMsA 4LvdZSbex3CzhoHMGsqo49x+6Ist5usPQ7DkVtC8= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 024HgnrB014991 for ; Wed, 4 Mar 2020 17:42:51 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: control Message-Id: Date: Wed, 4 Mar 2020 18:42:49 +0100 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A782F27.5E5FE897.004A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=J53UEzvS c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=Awq3lD4I0pKWNZcZRxAA:9 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 37659 fixed close 37659 27.1 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.7 LOCALPART_IN_SUBJECT Local part of To: address appears in Subject 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 37659 fixed close 37659 27.1