From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Shy groups and * ...eh, what? Date: Sat, 22 Oct 2022 06:49:19 +0000 Message-ID: References: <87edv0mqns.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8395"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs mailing list To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 22 08:56:29 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1om8Ql-0001wR-9n for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 22 Oct 2022 08:56:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1om8KU-0002J2-H2; Sat, 22 Oct 2022 02:49:58 -0400 Original-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 1om8K6-0002Hg-6B for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 02:49:37 -0400 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om8K1-0008C8-QH for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 02:49:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1666421365; x=1666680565; bh=08OKhe9ayx5A8sDFl/0ThlnWbj6U9qxoi07AMr7J3ZY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=cumWWJuamab+yHgAlRifRaMHHers8QTov+ihYQiIB2rZOJ8oBwD4TNoEPzEv+Apjn 4j2yKKuctw1b5Eh4O3/Bc8cQT+Tcdu3dZRJO/6+6z4CH63RV4X0LAv55/cz4TxJF0M OROtw7fd4itjhBfbR79plMcR6bhpsm9/YV+eg/gzQ/pNzAUVU5CIldMZybzQuCuWlD +gzA6BA0fo7SwKlmhAZGhcLIrpWDgrOcRO/chgBxVewEV/z9VisD7e8T4XXfWrtrBB 5g8SqmOLCzQb1aKLH/mIQMcpmwOZ9zFWXZk/ldhXuCvxzv8ADLvOTPv25eynf4fyV+ ClnN5q+GD2h/w== In-Reply-To: <87edv0mqns.fsf@web.de> Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.141; envelope-from=heimeborgia@protonmail.com; helo=mail-40141.protonmail.ch 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140263 Archived-At: Sent with Proton Mail secure email. ------- Original Message ------- On Saturday, October 22nd, 2022 at 4:24 AM, Michael Heerdegen wrote: > Hello, >=20 > I wanted to be sure I correctly understood that if you give multiple RX > arguments to the `rx'` ' operator, they are implicitly interpreted as a > sequence (AFAIU, that's the case. An implicit `or' would also make > sense, that's why I wondered). >=20 > Anyway, here is what I tried: >=20 > (string-match-p > (rx bos ( "a" "b") eos) > "a") > =3D=3D> 0 >=20 >=20 > (string-match-p > (rx bos (* "a" "b") eos) > "b") > =3D=3D> nil =20 I usually do (string-match-p (rx (seq bos (or "aa" "bb" "cc") (zero-or-more any) eos)) "= bboeuoeu") =20 > Eh - what? With evaluated `rx' forms this is (string-match-p "\\\\`\\(?:a= b\\)*\\'" > "a") > =3D=3D> 0 >=20 >=20 > (string-match-p > "\\`\\(?:ab\\)*\\'" > "b") > =3D=3D> nil >=20 >=20 > Makes no sense to me. When I change the wrapping shy groups to normal > groups the result makes more sense to me: >=20 > (string-match-p > "\\`\\(ab\\)*\\'" > "a") > =3D=3D> nil >=20 >=20 > (string-match-p > "\\`\\(ab\\)*\\'" > "b") > =3D=3D> nil >=20 >=20 > Do I miss something or is it just a bug? >=20 >=20 > TIA, >=20 > Michael.