From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#34492: Acknowledgement (rx: ASCII-raw byte ranges comprise all of Unicode) Date: Sat, 16 Feb 2019 12:05:09 +0100 Message-ID: References: <83a7iwmc6n.fsf@gnu.org> <81D26A8A-9C0B-4868-91F9-B9695999DBBE@acm.org> <831s48m44e.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_4D86E417-EA53-4808-9AC0-6D0D3CDA93AD" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="17362"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34492@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 16 12:06:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guxnO-0004Ir-HV for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 12:06:11 +0100 Original-Received: from localhost ([127.0.0.1]:54633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guxnN-00060w-BT for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 06:06:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guxnH-00060i-AH for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:06:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guxnG-0001oG-Js for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guxnG-0001o5-Fk for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1guxnG-0008BJ-1x for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Feb 2019 11:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34492 X-GNU-PR-Package: emacs Original-Received: via spool by 34492-submit@debbugs.gnu.org id=B34492.155031511531398 (code B ref 34492); Sat, 16 Feb 2019 11:06:01 +0000 Original-Received: (at 34492) by debbugs.gnu.org; 16 Feb 2019 11:05:15 +0000 Original-Received: from localhost ([127.0.0.1]:50022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guxmV-0008AL-Cl for submit@debbugs.gnu.org; Sat, 16 Feb 2019 06:05:15 -0500 Original-Received: from mail222c50.megamailservers.eu ([91.136.10.232]:59540 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guxmT-0008AA-3w for 34492@debbugs.gnu.org; Sat, 16 Feb 2019 06:05:14 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1550315111; bh=uzveUQwYwWJl1lkKzZjpRZbW/zSSq5XG7cZ9DbNSBQo=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=MYC4s2rAIq5Wl3apxlt8Iff/+87C+VtjRmP6/vYSs59pZV8WilLEoWYD5xw4+6BrO u2Jpk1bFEACVxVfYd6ur5K21jSasIsK+uT9wC26VHzyKLOBCdPdr8lg6U67/NZHyG2 /h4v3xW/8Oaz3SCB/SY2swtYpzIewxrma8yYwbYs= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c83-251-8-17.bredband.comhem.se [83.251.8.17]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x1GB59w5002423; Sat, 16 Feb 2019 11:05:11 +0000 In-Reply-To: <831s48m44e.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.102.3) X-CTCH-RefID: str=0001.0A0B0209.5C67EE67.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-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=fZaDNXYF c=1 sm=1 tr=0 a=NAHmi3I8mP0S/Y8gRKeQyA==:117 a=NAHmi3I8mP0S/Y8gRKeQyA==:17 a=mDV3o1hIAAAA:8 a=9wuvkdbEPJmABLsTOpMA:9 a=CjuIK1q_8ugA:10 a=kLlZNtOeHvVIu2fArTsA:9 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155452 Archived-At: --Apple-Mail=_4D86E417-EA53-4808-9AC0-6D0D3CDA93AD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 16 feb. 2019 kl. 11.14 skrev Eli Zaretskii : >=20 > Either make a new section for rx under "Changes in Specialized Modes > and Packages", or put it under "Incompatible Lisp Changes". I picked the former --- thanks for reviewing. Since it's my first change to NEWS, I'm attaching the modified patch = here for a final look. --Apple-Mail=_4D86E417-EA53-4808-9AC0-6D0D3CDA93AD Content-Disposition: attachment; filename=0001-Prevent-over-eager-rx-character-range-condensation.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Prevent-over-eager-rx-character-range-condensation.patch" Content-Transfer-Encoding: quoted-printable =46rom=20b3e549114ab705d3efd866adea6a0cce76febb49=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2015=20Feb=202019=2019:27:48=20+0100=0A= Subject:=20[PATCH]=20Prevent=20over-eager=20rx=20character=20range=20= condensation=0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20= charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0A`rx'=20= incorrectly=20considers=20character=20ranges=20between=20ASCII=20and=20= raw=20bytes=20to=0Acover=20all=20codes=20in-between,=20which=20includes=20= all=20non-ASCII=20Unicode=20chars.=0AThis=20causes=20(any=20"\000-\377"=20= ?=C3=85)=20to=20be=20simplified=20to=20(any=20"\000-\377"),=0Awhich=20is=20= not=20at=20all=20the=20same=20thing:=20[\000-\377]=20really=20means=0A= [\000-\177\200-\377]=20(Bug#34492).=0A=0A*=20lisp/emacs-lisp/rx.el=20= (rx-any-condense-range):=20Split=20ranges=20going=0Afrom=20ASCII=20to=20= raw=20bytes.=0A*=20test/lisp/emacs-lisp/rx-tests.el=20= (rx-char-any-raw-byte):=20Add=20test=20case.=0A*=20etc/NEWS:=20Mention=20= the=20overall=20change=20(Bug#33205).=0A---=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|=208=20= ++++++++=0A=20lisp/emacs-lisp/rx.el=20=20=20=20=20=20=20=20=20=20=20=20|=20= 7=20+++++++=0A=20test/lisp/emacs-lisp/rx-tests.el=20|=206=20+++++-=0A=20= 3=20files=20changed,=2020=20insertions(+),=201=20deletion(-)=0A=0Adiff=20= --git=20a/etc/NEWS=20b/etc/NEWS=0Aindex=2070a50c02c4..987e661044=20= 100644=0A---=20a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-1101,6=20+1101,14=20= @@=20subexpression.=0A=20When=20there=20is=20no=20menu=20for=20a=20mode,=20= display=20the=20mode=20name=20after=20the=0A=20indicator=20instead=20of=20= just=20the=20indicator=20(which=20is=20sometimes=20cryptic).=0A=20=0A+**=20= rx=0A+=0A+---=0A+***=20rx=20now=20handles=20raw=20bytes=20in=20character=20= alternatives=20correctly,=0A+when=20given=20in=20a=20string.=20=20= Previously,=20`(any=20"\x80-\xff")'=20would=20match=0A+characters=20= U+0080...U+00FF.=20=20Now=20the=20expression=20matches=20raw=20bytes=20= in=0A+the=20128...255=20range,=20as=20expected.=0A+=0A=20=0C=0A=20*=20= New=20Modes=20and=20Packages=20in=20Emacs=2027.1=0A=20=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= b2299030a1..715cd608c4=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-429,6=20+429,13=20@@=20Only=20both=20= edges=20of=20each=20range=20is=20checked."=0A=20=20=20=20=20;;=20set=20L=20= list=20of=20all=20ranges=0A=20=20=20=20=20(mapc=20(lambda=20(e)=20(cond=20= ((stringp=20e)=20(push=20e=20str))=0A=20=09=09=09=20=20=20=20((numberp=20= e)=20(push=20(cons=20e=20e)=20l))=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;;=20Ranges=20between=20= ASCII=20and=20raw=20bytes=20are=20split,=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;;=20to=20prevent=20= accidental=20inclusion=20of=20Unicode=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;;=20characters=20= later=20on.=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((and=20(<=3D=20(car=20e)=20#x7f)=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(>=3D=20(cdr=20e)=20#x3fff80))=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(push=20= (cons=20(car=20e)=20#x7f)=20l)=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(push=20(cons=20#x3fff80=20= (cdr=20e))=20l))=0A=20=09=09=09=20=20=20=20(t=20(push=20e=20l))))=0A=20=09= =20=20args)=0A=20=20=20=20=20;;=20condense=20overlapped=20ranges=20in=20= L=0Adiff=20--git=20a/test/lisp/emacs-lisp/rx-tests.el=20= b/test/lisp/emacs-lisp/rx-tests.el=0Aindex=20f15e1016f7..e14feda347=20= 100644=0A---=20a/test/lisp/emacs-lisp/rx-tests.el=0A+++=20= b/test/lisp/emacs-lisp/rx-tests.el=0A@@=20-53,7=20+53,11=20@@=0A=20=20=20= ;;=20Range=20of=20raw=20characters,=20multibyte.=0A=20=20=20(should=20= (equal=20(string-match-p=20(rx=20(any=20"=C3=85\211\326-\377\177"))=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"XY\355\177\327")=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=202)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=202))=0A+=20=20;;=20Split=20range;=20\177-\377=C3=BF=20should=20not=20= be=20optimised=20to=20\177-\377.=0A+=20=20(should=20(equal=20= (string-match-p=20(rx=20(any=20"\177-\377"=20?=C3=BF))=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"=C3=BFA\310B")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=200)))=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=0A2.17.2=20(Apple=20= Git-113)=0A=0A= --Apple-Mail=_4D86E417-EA53-4808-9AC0-6D0D3CDA93AD--