From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 06 00:08:28 2023 Received: (at submit) by debbugs.gnu.org; 6 Jun 2023 04:08:28 +0000 Received: from localhost ([127.0.0.1]:50640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Nzf-0006H3-Nv for submit@debbugs.gnu.org; Tue, 06 Jun 2023 00:08:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:37684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Cwd-0004EN-W0 for submit@debbugs.gnu.org; Mon, 05 Jun 2023 12:20:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Cwd-00081U-If for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:20:35 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6Cwb-0000X0-1N for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:20:34 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f63006b4e3so404694e87.1 for ; Mon, 05 Jun 2023 09:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685982030; x=1688574030; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=YhBrtk9gpXIZLpDELm0byRNSl5Lhlu4wftpNVbALQUo=; b=f3745FVcBygxy9JzhSIRwdOzJ6dZ4MfzpTrvPlfID6q6EvI0VGVvz6XOBHkTQYMsUG 2SI4mUbjqzzWyEtMScaeuUKgHVzzTUUGZFcTw1XdOpumNvbzBM36EBLzv/8nEznOB8H4 CxTsyUxyA5zAyU/z4w/oJ1e2MeZLjqI5JwaE0c+enjQTrXxmi8H20da8HUv7CRzsOmtf uzhMuVjQlijizhbqY1EetRO72JC7RIdb8C8f0r9EOC6RP37Ygn25DIonZmUX6901FZys rhinPZZAi1LmtVRjjFHWJGnwWp8nYazWvRNdFlj1FV/eZG/OOklQcgSMazyqKWoeM0c7 MIGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685982030; x=1688574030; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YhBrtk9gpXIZLpDELm0byRNSl5Lhlu4wftpNVbALQUo=; b=aiO2GZoeCtPIslqLvZcNke+W76KA3+Nkq/mmZRTtRjfFpFuJLpu6eaUSy9Cxv2bsdw M6uFY9e1UdRgsv/3mDEtNJLaWKne+VJgw2842+Yy2EjhBSqs+jH1UOgJn47k4dSAYb1H m4tvOLxmdEdEJlGIz4WLoNh4nHqn4mRhptJj5LRhyX4OXI0SNf6rys9lk2ZLfVjCMW1z TQ++rIsqanGWl+y6JUClJwHv2oIj9kyhsSpTQkNUUhwWu7e2BILpkN4Ljp5tP0hYa05n 7txB2qaVRac2PdWPkFOAgfBMIIVawu6Qu3zJsqmS94g/36s2e5SY9Bx+C3gRU8Fsnheg DZbA== X-Gm-Message-State: AC+VfDwEMSB5dcecdsMCgyFChldS6hWhCpaAyAY2+mlpvV5IKGcxfUKC QIWoCBvR+hcpWWwvWpuzdROPOvpzizup7tu1QDS/HiC8+3I= X-Google-Smtp-Source: ACHHUZ7El37gNoEY6IcUT5a8Q+gIg0OBiWLwEHWw2lfJv5UCw+h3bFVZDLad/jDrsb7T1bzkLNNVfvxcRkECwTaErr4= X-Received: by 2002:a2e:9810:0:b0:2b1:d210:10c9 with SMTP id a16-20020a2e9810000000b002b1d21010c9mr2549337ljj.43.1685982030121; Mon, 05 Jun 2023 09:20:30 -0700 (PDT) MIME-Version: 1.0 From: Carl Allendorph Date: Mon, 5 Jun 2023 09:20:18 -0700 Message-ID: Subject: 28.2; re-builder rx fails to match To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="00000000000000cf6e05fd64483e" Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=callendorph@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 06 Jun 2023 00:08:24 -0400 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 (--) --00000000000000cf6e05fd64483e Content-Type: text/plain; charset="UTF-8" I'm having trouble using the `re-builder` tool in emacs. I find that if I use `rx` mode - the built regexp does not behave as expected. I'm not an elisp expert - so it is very possible I'm doing something wrong. Steps: 1. Create a buffer and put "ad ac" on line 1. 2. Run `M-x re-builder` 3. Press `C-c TAB` and enter `rx` to enter rx mode. 4. Enter the following: `(rx (and (or "a" "b") "c"))` 5. No Matches are discovered - I expect `ac` to match 6. Switch to back to `string` mode with `C-c TAB` and enter `string` 7. The shown regex string is `"\(?:\[ab]c\)"` I think the problem is the `\[` character escape is invalid. In string mode, if I remove the `\` character and make the regex string "\(?:[ab]c\)" - then it matches on `ac` like I expect. I believe the problem is in `reb-cook-regexp` - specifically in the call to `rx-to-string`: (rx-to-string (rx (and (or "a" "b") "c"))) "\\(?:\\[ab]c\\)" I've checked this in Emacs 26.3 on an Ubuntu 20.04 machine as well and get the same behavior. Can anyone confirm this behavior ? In GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2023-02-22 built on armbob.lan Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.4 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules --with-x-toolkit=no' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: delete-selection-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch help-fns radix-tree cl-print debug backtrace help-mode find-func delsel re-builder rx time-date package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 71017 6463) (symbols 48 8112 1) (strings 32 24554 990) (string-bytes 1 780996) (vectors 16 16939) (vector-slots 8 223944 10903) (floats 8 36 168) (intervals 56 652 133) (buffers 992 18)) --00000000000000cf6e05fd64483e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm having trouble using the = `re-builder` tool in emacs. I find
that if I use `rx` mode - the built r= egexp does not behave as
expected. I'm not an elisp expert - so it i= s very possible I'm
doing something wrong.

Steps:

1.= =C2=A0 Create a buffer and put "ad ac" on line 1.
2.=C2=A0 Run= `M-x re-builder`
3.=C2=A0 Press `C-c TAB` and enter `rx` to enter rx mo= de.
4.=C2=A0 Enter the following: `(rx (and (or "a" "b&qu= ot;) "c"))`
5.=C2=A0 No Matches are discovered - I expect `ac`= to match
6.=C2=A0 Switch to back to `string` mode with `C-c TAB` and en= ter `string`
7.=C2=A0 The shown regex string is `"\(?:\[ab]c\)"= ;`

I think the problem is the `\[` character escape is invalid. In s= tring mode, if I remove the `\` character and make the regex string "\= (?:[ab]c\)" - then it
matches on `ac` like I expect.

I belie= ve the problem is in `reb-cook-regexp` - specifically in
the call to `rx= -to-string`:

(rx-to-string (rx (and (or "a" "b")= "c")))
"\\(?:\\[ab]c\\)"

I've checked th= is in Emacs 26.3 on an Ubuntu 20.04 machine as well and get the same behavi= or.=C2=A0

Can anyone confirm this behavior ?=C2=A0

In GNU Ema= cs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.= 0.1 (Build 21A559))
=C2=A0of 2023-02-22 built on armbob.lan
Windowing= system distributor 'Apple', version 10.3.2113
System Descriptio= n: =C2=A0macOS 12.4

Configured using:
=C2=A0'configure --with= -ns '--enable-locallisppath=3D/Library/Application
=C2=A0Support/Ema= cs/${version}/site-lisp:/Library/Application
=C2=A0Support/Emacs/site-li= sp' --with-modules --with-x-toolkit=3Dno'

Configured feature= s:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS<= br>TOOLKIT_SCROLL_BARS ZLIB

Important settings:
=C2=A0 value of $= LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major m= ode: Text

Minor modes in effect:
=C2=A0 delete-selection-mode: t<= br>=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-par= en-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t<= br>=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-s= hadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: = t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2= =A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 li= ne-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mo= de: t

Load-path shadows:
None found.

Features:
(shadow = sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml= mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loadde= fs text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231= mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-= util mail-prsvr mail-utils misearch multi-isearch
help-fns radix-tree cl= -print debug backtrace help-mode find-func delsel
re-builder rx time-dat= e package browse-url url url-proxy url-privacy
url-expand url-methods ur= l-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse = auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cach= e json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv c= l-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff= -hook vc-hooks
lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-= normalize
mule-util term/common-win tool-bar dnd fontset image regexp-op= t fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode= register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer selec= t
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colorsframe minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnam= ese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew gr= eek romanian slovak czech european ethiopic indian cyrillic
chinese comp= osite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook he= lp simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-= face macroexp files window text-properties overlay
sha1 md5 base64 forma= t env code-pages mule custom widget
hashtable-print-readable backquote t= hreads kqueue cocoa ns multi-tty
make-network-process emacs)

Memo= ry information:
((conses 16 71017 6463)
=C2=A0(symbols 48 8112 1)
= =C2=A0(strings 32 24554 990)
=C2=A0(string-bytes 1 780996)
=C2=A0(vec= tors 16 16939)
=C2=A0(vector-slots 8 223944 10903)
=C2=A0(floats 8 36= 168)
=C2=A0(intervals 56 652 133)
=C2=A0(buffers 992 18))
<= /div>
--00000000000000cf6e05fd64483e-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 06 05:31:13 2023 Received: (at 63918) by debbugs.gnu.org; 6 Jun 2023 09:31:13 +0000 Received: from localhost ([127.0.0.1]:50981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6T20-00073Z-RL for submit@debbugs.gnu.org; Tue, 06 Jun 2023 05:31:13 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:51625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6T1y-00073L-7L for 63918@debbugs.gnu.org; Tue, 06 Jun 2023 05:31:11 -0400 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-4f62b552751so2490236e87.3 for <63918@debbugs.gnu.org>; Tue, 06 Jun 2023 02:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686043863; x=1688635863; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=DTSjiQ4QX/qqLdCLUgbHllDjL+4pq+/zWtwBoN+YN80=; b=GENOdpA9mY/hSnQxplNqydp1tdO94UqfkdjakNiZq8hxJV9W8hRG2b5t38jZvGhhnV T11znj3egzC98WZj1QQe/2eYxeR5Xzg9bTA/ItMC0lXX5CSYUXOHmlk6osXvmHH9rbGn LbyEGlnPNVsrljjr7NDcLvVLfkMPXf85BZ4VDy9wh4wWpng05AKdLIWYdSqh7sWds+zE jUi319ugW2/JWTaJQf8m9hHr2u10sdM+3X5av2yIjgZ26JMddDRYly/bineYzL2X05HX JxtmGFGQ2ZlVug6ZnKJn28Av3hhxw7g12Pub6be2+D3nmho+56/GJOLfmAYAqMuYU5JE UhVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686043863; x=1688635863; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DTSjiQ4QX/qqLdCLUgbHllDjL+4pq+/zWtwBoN+YN80=; b=leYqgP8iRbMLVxrecngog3bFmScxVpnAhXmMPXq08JZ3odDnc9zOliGs95c66BLsEM IqmZLGSaRDdfL4E7q9fbgfyVi1Z4Z4OzJq5en5WpsFSXkVhOxIhQv3Y+8lj0kuqo331R As15F9ixQccYlWx7IpWTRmvsmgytrkbcCi8g6w+FKzGlLAO9hQYZ6aiz4jWx88zeXtzn iPXnU5vitxqZFsX0FF2VAEXBMMWfCCkFVoL8KwJ9PF8bhGozV2CRx3bPs674NKBNeAl/ YAR4aNwBbAabvS02LKnUgLauK8xndZEQfjJpYSn8wDa9uBD9gNBcAqufRRPabbRhH4ue 7EaQ== X-Gm-Message-State: AC+VfDx7ubUIwg64th/GgdcvYFpS6I2orxOcxQzJ7bX3bkkWVKIfn/Q2 IFKGNoAkLgdsmBOpGCcr9us= X-Google-Smtp-Source: ACHHUZ43LzcwCBKqngQSQ5BgK9HW6F9/IDt8L34dskVuFdtj7txGZ4IkatWxenPbi2rdcquBJdxjtw== X-Received: by 2002:ac2:4465:0:b0:4f3:96ac:6dd8 with SMTP id y5-20020ac24465000000b004f396ac6dd8mr754845lfl.4.1686043863233; Tue, 06 Jun 2023 02:31:03 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id a24-20020ac25218000000b004f6337508afsm208338lfl.222.2023.06.06.02.31.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2023 02:31:02 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: bug#63918: 28.2; re-builder rx fails to match Message-Id: Date: Tue, 6 Jun 2023 11:31:02 +0200 To: Carl Allendorph X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63918 Cc: 63918@debbugs.gnu.org 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 (-) The problem is that re-builder's handling of rx is badly designed, and = you are not the first to be annoyed by this. In 'rx' mode, re-builder = expects you to write a Lisp expression that can be used as argument to = `rx-to-string`, something that nobody wants to do. In your case, instead = of (rx (or "a" "b") "c") you would have to write something like '(seq (or "a" "b") "c") Note the quote (because the expression is evaluated) and `seq` (because = `rx-to-string` only takes a single rx expression as input; `rx` forms an = implicit `seq` of its arguments). Previous bugs:=20 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60196 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54107 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 06 09:07:08 2023 Received: (at control) by debbugs.gnu.org; 6 Jun 2023 13:07:08 +0000 Received: from localhost ([127.0.0.1]:51194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6WOy-0006QI-99 for submit@debbugs.gnu.org; Tue, 06 Jun 2023 09:07:08 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:56569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6WOu-0006Pl-62 for control@debbugs.gnu.org; Tue, 06 Jun 2023 09:07:07 -0400 Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2b1b1635661so53789061fa.0 for ; Tue, 06 Jun 2023 06:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686056818; x=1688648818; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=n9F1Twx4D5Hw8T/Aj+75IBeEFIRA2BgPnqGGHl7Appg=; b=oM1dmTNcIGKYN9I9GvWR0J0Ubdp91lIEAO7mMRi9mIpvkzR+hbIMXWhmJk4u1YjJDl WpESzYrjedPoauUbVL1JdZcNGy6gH+LSpgjIadNDdpRqpWHRx6vOo68f2YcS9fUCqPwY nQ4e8B5wTvaZjIRH1CEMF9Y7zxL2P1489NDfpSXx9egj2hAzBexWK3QzFSvtpzplG0/5 J46Q4CGrHdHiPXU1WQWR81EAYR9kAFDBOrzLvEqBhhKsDb7hKYm4/ASNa28YUKBGeyq1 X6SOsdFnCWPysl2ZytP8CUmJPsLt5G4Z7x0769KryRouqp/QCAISkXOV3gj3z7dTHdxi RlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686056818; x=1688648818; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n9F1Twx4D5Hw8T/Aj+75IBeEFIRA2BgPnqGGHl7Appg=; b=AtG1DhfXS6WVXizJZnzrHQCEKoHFlojpqckoKC353TloOyNy1kHGd5LzDJqsRn3opl Pi3Y0CR+FaIVrBrpSfnlDA0Y/3zqJ1WJbvFDlzF3pbjUM3avVzAEnfYqYysJbLHq+Hun xYehkGwZnUy+mMgDYao7AJo43Gl8C1XvVX4yooEaiwEorV+uYHaeF8Fa99GD2pxyrEWo HadbSuAIJg+97JVwqskBaMHJaueTkTx5caUaVKrugA5MGpmETPSrhOrGDcAhn8NnMV4e vx5HwVY4AM2Zai1hmADUO3HXNAwRDj7ZIBq9j0SSaZ3bpq+AAh2f4WRx8r34OV6QMSvN KztQ== X-Gm-Message-State: AC+VfDzMatcUku5xZxQvCsvl6UhGRH+AckqWuJ+CHSTFeRCl5Ueaeq4L 6uZ/Yu3R6p4DSgfZhtmkF0mFqfoIbEQ= X-Google-Smtp-Source: ACHHUZ419AmOU9xskFIhFAVcYRRl2RuCg7ab2G2OpdJVvAItHv+Cgf9V+8uLDTRbjvTnHrMBvr6ngw== X-Received: by 2002:a05:651c:10d:b0:2b1:ad15:fe38 with SMTP id a13-20020a05651c010d00b002b1ad15fe38mr1230223ljb.3.1686056818010; Tue, 06 Jun 2023 06:06:58 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id u5-20020a2e91c5000000b002add1f4a92asm1871085ljg.113.2023.06.06.06.06.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2023 06:06:57 -0700 (PDT) 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 14.0 \(3654.120.0.1.15\)) Subject: Message-Id: Date: Tue, 6 Jun 2023 15:06:57 +0200 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.15) 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: forcemerge 60196 63918 stop Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mattias.engdegard[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.171 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.171 listed in wl.mailspike.net] 2.0 BLANK_SUBJECT Subject is present but empty 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: 1.0 (+) forcemerge 60196 63918 stop From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 10 23:16:59 2023 Received: (at 63918) by debbugs.gnu.org; 11 Jun 2023 03:16:59 +0000 Received: from localhost ([127.0.0.1]:36497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8BZX-0000vF-V1 for submit@debbugs.gnu.org; Sat, 10 Jun 2023 23:16:59 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:60557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8BZS-0000ux-Di for 63918@debbugs.gnu.org; Sat, 10 Jun 2023 23:16:54 -0400 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-9741caaf9d4so467618266b.0 for <63918@debbugs.gnu.org>; Sat, 10 Jun 2023 20:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686453404; x=1689045404; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sVIhug1sZ4OiG3NAMO/kRtomZ1Kkq8mK4i0eJgp1UtY=; b=VqFxwEwIXnWo7dUh5S+bkC+UagzZtNy0ddRIxFMdxrW4g9e6Os2orpks83FeFB0aQc CVvDrfA8LTINQF6BOjhBn/Eyypq/ef+CXj0oym/UVmytUc/Luf4EpdxZZGJPDDbeoItg IjnsLocliOlKEFvSj2w3+EYI2SDlC5rZ89GvMNM+XdjUgE4uSmHA3s0No/TEefQDIarU nnQefsLK6UGpIBkeHLWM/Y9uWJgYxCQd6e0dHnWCTIVvaw+UjzwTas7xcJYoxw0uGv62 w82D4SqtNOClxT7iTBCOVKc1Fqgbl5U0O1nhf5w01wqvZ8H8C2cVGG5VtoirX4mshzf7 Dd5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686453404; x=1689045404; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sVIhug1sZ4OiG3NAMO/kRtomZ1Kkq8mK4i0eJgp1UtY=; b=FrgK9wJQUqXo/P4BBFLxAI2qEuHoLbCOlx2Np6jFzQUCtsQYeSa7bVTmFQg/9VJmZ1 LmTLcjiITR1AO49Gd+06F6zAJDZV0QqT0gET7jzfhin3ukCeqP6G1b+DQp0pXqISTx6u ejG0AJ66IV0quTmCzm7nhU3Po/IZrc/m4i+Fq0tsXIaqru54bbA4zM5Kn3cu4+9qlqlP fAGP0GfhwyC/LS+sGA/+cOLHH0wL7jd4ZEWA2/SyD/qIW1MvKs85pR09+Q8QkErwbkr2 sjYeWsxv/jE9UAbcLHMhEvn1xsoqL9al0T/CajUJSGj3G9ElgKSpqKcYHv4Xc+GQe49I oXLw== X-Gm-Message-State: AC+VfDxGP6uuC5aKfVrUwVQ7hkRAlSsJknHLQjTQIEmUG/mf+DgYTHbJ mPajdlDNtiu55w6pb8ExjAITEDr9ruapxCyHXXM= X-Google-Smtp-Source: ACHHUZ4+qk0KtJbYZEZbq4dbQy7lkkfm5AdTLk2t4yJMdeB7EGkNvjtCg5RUanwxQi9x69TBXVjws7Rdont1pgfXHqs= X-Received: by 2002:a17:907:ea1:b0:973:d85b:9ed9 with SMTP id ho33-20020a1709070ea100b00973d85b9ed9mr6972626ejc.72.1686453404125; Sat, 10 Jun 2023 20:16:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Carl Allendorph Date: Sat, 10 Jun 2023 20:16:32 -0700 Message-ID: Subject: Re: bug#63918: 28.2; re-builder rx fails to match To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/alternative; boundary="000000000000154e9b05fdd20887" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63918 Cc: 63918@debbugs.gnu.org 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 (-) --000000000000154e9b05fdd20887 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for the kind response. I understand what I was doing wrong now. On Tue, Jun 6, 2023 at 2:31=E2=80=AFAM Mattias Engdeg=C3=A5rd < mattias.engdegard@gmail.com> wrote: > The problem is that re-builder's handling of rx is badly designed, and yo= u > are not the first to be annoyed by this. In 'rx' mode, re-builder expects > you to write a Lisp expression that can be used as argument to > `rx-to-string`, something that nobody wants to do. In your case, instead = of > > (rx (or "a" "b") "c") > > you would have to write something like > > '(seq (or "a" "b") "c") > > Note the quote (because the expression is evaluated) and `seq` (because > `rx-to-string` only takes a single rx expression as input; `rx` forms an > implicit `seq` of its arguments). > > Previous bugs: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60196 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54107 > > --000000000000154e9b05fdd20887 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the kind response. I understand=C2=A0what I was d= oing wrong now.=C2=A0

On Tue, Jun 6, 2023 at 2:31=E2=80=AF= AM Mattias Engdeg=C3=A5rd <mattias.engdegard@gmail.com> wrote:
The problem is that re-builder's handling = of rx is badly designed, and you are not the first to be annoyed by this. I= n 'rx' mode, re-builder expects you to write a Lisp expression that= can be used as argument to `rx-to-string`, something that nobody wants to = do. In your case, instead of

=C2=A0 (rx (or "a" "b") "c")

you would have to write something like

=C2=A0 '(seq (or "a" "b") "c")

Note the quote (because the expression is evaluated) and `seq` (because `rx= -to-string` only takes a single rx expression as input; `rx` forms an impli= cit `seq` of its arguments).

Previous bugs:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug= =3D60196
https://debbugs.gnu.org/cgi/bugreport.cgi?bug= =3D54107

--000000000000154e9b05fdd20887--