GNU bug report logs - #60196
29.0.60; re-builder should read all forms for the rx syntax

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Kai Ma <justksqsf@HIDDEN>; merged with #63918; dated Mon, 19 Dec 2022 09:03:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 60196 63918. Request was from Mattias EngdegÄrd <mattias.engdegard@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 60196 <at> debbugs.gnu.org:


Received: (at 60196) by debbugs.gnu.org; 30 Dec 2022 13:45:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 30 08:45:44 2022
Received: from localhost ([127.0.0.1]:33751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBFhf-0004yI-PO
	for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 08:45:44 -0500
Received: from mail-pf1-f193.google.com ([209.85.210.193]:45918)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <justksqsf@HIDDEN>) id 1pBFhd-0004y3-9y
 for 60196 <at> debbugs.gnu.org; Fri, 30 Dec 2022 08:45:43 -0500
Received: by mail-pf1-f193.google.com with SMTP id c7so14473661pfc.12
 for <60196 <at> debbugs.gnu.org>; Fri, 30 Dec 2022 05:45:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=9FjiZ7JYeB9LZTRk/aOyHwXuoBWZGFWogvkgOna974c=;
 b=DFfYhppkavkckeYJ/lRmwq664mkQUbSdzdk+ri2dXC/ZA0F0Q3qTOe8AS9mP0RiPpM
 4RmcA9t2XWJAQSkqbTPzRtOzO+IJviwqmbhth3ZK/sEqjH1tnsUstkxnX3THiN8/HInG
 wT0VqcV5jAuQIudmwLzHJx6nQFwsE+291MqzlsM5s+vfT4i/yxmDgnkQDaHi7QohtQ+X
 euKSRRLn0VwFqa3Z1krIJYPWuwOMsZtSwE5MJ+JqrsrAqoYHpZ3RStDWm7QoAcLfsSX4
 kpg8FbewOpzPWvHXWxtsSqgcNckq60FPkywHE+2AtJbaTnTlPhQsDh3A1PlNedpyhamz
 NnwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=9FjiZ7JYeB9LZTRk/aOyHwXuoBWZGFWogvkgOna974c=;
 b=isfkB9Zpniz5Kv0A9dprPsz+cXyddfJKRKImbmMMQcXzh3Ij/Kal3+55k95aCu4dWq
 C49AEKNKQp4wQzCGDhYZ3WqwYariAi7Is25OuHdGgZC6j7CCfJdej8sC8tx1tAfcNk/2
 LWRb4hWQoGlW8SCIoCqEO2j/6QQQtt3QzuAQnehxA35/J6viRSvzrwsjfKfsVFWIQGB9
 05dUKyo2kLeB2EkPs6TqA2PoAc7/784ZGc/ZK21UGUaoLWBZFQ9eyFBSfPvRlELYXXxZ
 Z2pdBhxVPOI+uT2wPuTq5SKeoHRkEe5yfHg1Q/gv1KG+31EvJKyiEiIxa2qzGqeAWshH
 In+g==
X-Gm-Message-State: AFqh2kr1fpbIql6OPYO/GzxHNnl8izh+jkkdpQnHufdxc6j3lnA1sEFM
 FLsrtuRbq5Rky3+tTDC0KqQ=
X-Google-Smtp-Source: AMrXdXsimIXLsK132TdaEwhrM6a6JGVZPPaduMmhjYk0iwFW3v6cSyvBNfBe6enNAHGpa1lfLbvWgQ==
X-Received: by 2002:a05:6a00:be9:b0:580:f5a8:2e2b with SMTP id
 x41-20020a056a000be900b00580f5a82e2bmr22514388pfu.8.1672407935366; 
 Fri, 30 Dec 2022 05:45:35 -0800 (PST)
Received: from smtpclient.apple ([134.209.106.31])
 by smtp.gmail.com with ESMTPSA id
 g130-20020a625288000000b0056c2e497b02sm14195892pfb.173.2022.12.30.05.45.33
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 30 Dec 2022 05:45:35 -0800 (PST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\))
Subject: Re: bug#60196: 29.0.60; re-builder should read all forms for the rx
 syntax
From: Kai Ma <justksqsf@HIDDEN>
In-Reply-To: <64E4056A-0167-4B41-BB44-60A47C7FA6A5@HIDDEN>
Date: Fri, 30 Dec 2022 21:45:21 +0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <82236308-CB69-43CE-BDAA-F405AD98A114@HIDDEN>
References: <64E4056A-0167-4B41-BB44-60A47C7FA6A5@HIDDEN>
To: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
X-Mailer: Apple Mail (2.3731.300.101.1.3)
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 60196
Cc: 60196 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)



> On Dec 30, 2022, at 20:28, Mattias Engdeg=C3=A5rd <mattiase@HIDDEN> =
wrote:
>=20
> The handling of rx input in re-builder is indeed unsatisfactory. We =
could adopt your proposed solution:
>=20
>> Ideally, re-builder should allow users to simply write
>>=20
>>    "<i>" (group (*? anychar)) "</i>"
>=20
> which would be a definite improvement. We could also accept a Lisp =
expression that is evaluated, so that you'd write
>=20
>    (rx "<i>" (group (*? anychar)) "</i>")
>=20
> On the surface this looks more verbose, but since re-builder itself =
would provide the `(rx )` boilerplate, there wouldn't actually be any =
more typing.

Good point!  And it is much easier to copy a whole Sexpr.

> The main advantage would be that regexps could be built up from =
smaller pieces:
>=20
>    (rx-let ((spaces (* " "))
>             (identifier (: alpha (* alnum))))
>      (rx identifier spaces "->" spaces identifier))
>=20
> Either would be a definite improvement to the current rather strange =
re-builder behaviour with respect to rx input. Any preference?

I like your proposal better! :-)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60196; Package emacs. Full text available.

Message received at 60196 <at> debbugs.gnu.org:


Received: (at 60196) by debbugs.gnu.org; 30 Dec 2022 12:28:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 30 07:28:21 2022
Received: from localhost ([127.0.0.1]:33681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBEUn-0006Vo-9w
	for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 07:28:21 -0500
Received: from mail70c50.megamailservers.eu ([91.136.10.80]:39420)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1pBEUl-0006VX-97
 for 60196 <at> debbugs.gnu.org; Fri, 30 Dec 2022 07:28:20 -0500
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1672403297;
 bh=pxxGZmUj5DwYGWBy719zaK8DJcBsAH/vubKuvJmdKAM=;
 h=From:Subject:Date:Cc:To:From;
 b=E+f7xGU/oELo8XqXOEFZjWs3NEmxUBSZFjvh9/kceiQytiLHhOyy6T8A0kQr9u6Q6
 Yp9tcS6p4jOtpKZk3RIT43H94FUN/c6K+v1obSybyMd8Zqpekb0REHIKAPmbVYVibp
 i0K/cDEAKiSyjaRk4pSCjr9CpAq9GLosYGEQNPsQ=
Feedback-ID: mattiase@HIDDEN
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se
 [188.150.171.209]) (authenticated bits=0)
 by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 2BUCSFMr085657; 
 Fri, 30 Dec 2022 12:28:16 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
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.13\))
Subject: bug#60196: 29.0.60; re-builder should read all forms for the rx syntax
Message-Id: <64E4056A-0167-4B41-BB44-60A47C7FA6A5@HIDDEN>
Date: Fri, 30 Dec 2022 13:28:14 +0100
To: Kai Ma <justksqsf@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-CTCH-RefID: str=0001.0A782F15.63AED961.001A, 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-Origin-Country: SE
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 60196
Cc: 60196 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

The handling of rx input in re-builder is indeed unsatisfactory. We =
could adopt your proposed solution:

> Ideally, re-builder should allow users to simply write
>=20
>     "<i>" (group (*? anychar)) "</i>"

which would be a definite improvement. We could also accept a Lisp =
expression that is evaluated, so that you'd write

    (rx "<i>" (group (*? anychar)) "</i>")

On the surface this looks more verbose, but since re-builder itself =
would provide the `(rx )` boilerplate, there wouldn't actually be any =
more typing. The main advantage would be that regexps could be built up =
from smaller pieces:

    (rx-let ((spaces (* " "))
             (identifier (: alpha (* alnum))))
      (rx identifier spaces "->" spaces identifier))

Either would be a definite improvement to the current rather strange =
re-builder behaviour with respect to rx input. Any preference?






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60196; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Dec 2022 09:02:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 19 04:02:37 2022
Received: from localhost ([127.0.0.1]:38099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p7C2f-0002a4-Ay
	for submit <at> debbugs.gnu.org; Mon, 19 Dec 2022 04:02:37 -0500
Received: from lists.gnu.org ([209.51.188.17]:37018)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <justksqsf@HIDDEN>) id 1p7C2d-0002Zy-46
 for submit <at> debbugs.gnu.org; Mon, 19 Dec 2022 04:02:35 -0500
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 <justksqsf@HIDDEN>)
 id 1p7C2c-0000Fx-TQ
 for bug-gnu-emacs@HIDDEN; Mon, 19 Dec 2022 04:02:34 -0500
Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <justksqsf@HIDDEN>)
 id 1p7C2b-00029a-EN
 for bug-gnu-emacs@HIDDEN; Mon, 19 Dec 2022 04:02:34 -0500
Received: by mail-pf1-x444.google.com with SMTP id c13so5748095pfp.5
 for <bug-gnu-emacs@HIDDEN>; Mon, 19 Dec 2022 01:02:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=pjCmqcr51tJuCEJe/w3oHMlFsbb79DC9U6NJaILN624=;
 b=Dm3hVJrOYOynM7wWgDqj4IwThHkjIAtB+8n75IRfclru9BtVpvt6T6+6+m+99Y4B0u
 bK+PU5UQHVlAW0MafblaUamPA2WQDAAW2O5xZ10ktyhbGIKbFkPlfu388wZe8mb8x9Vv
 7vbKAmsydxun7znh63jd3L6qZBgYQn3/5LodqC7XLRsQT0DlB+vOOrZuV2QGjVQYNUiA
 r5Kam9XwcdK+GtE77UGrFZGoVcE9n7fCwPfn7uPJGhtkpV1mc08pATHOtbtjGRP+6sIt
 CvQnAMiw8sbPVlzv/GOAhxMbx4JRrpP4RBhtbh0yrtxcGar+d1BmE/0beh5nXRDjJyA3
 BitA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=pjCmqcr51tJuCEJe/w3oHMlFsbb79DC9U6NJaILN624=;
 b=geZyMaj1AgV2GPjE9/FLM6l+YpD8mu9PXPr49C4V5YW/0Udc05DysSm7WUU4LbTo7o
 4uEEXgb0NAdx5lrR1JMzllZ9ZHvIOwmIly+fMQbFaDuiMkWIfDaQWlZuWhF5L13DoebO
 EsxjlEokXInFjKCLhZPdcEYf54lcniEpyQK8rStTVrgWfvuhS01RSHpr3iXxdTJFq40O
 nTT71mXSNG5Cq8Zi3AWSUFdtJzdADAStTkAy1AQ2sXqjy+2ikxxCwgAfSqOtFfdVi+Bc
 hRxJoOjL1/LYx5+++vZFE7N6h29v/kDt3mKBnW1OizpdV7HyllnqKdqj1NQcO86KYLHZ
 v+iA==
X-Gm-Message-State: AFqh2krjn9xO/uk5axMmKPeanGwNsuupssigdqwyyyACGiz4OK0kGpPO
 4M29yXCxtnxQCJFCPB2UC2HXMW4WHcQLhzUl
X-Google-Smtp-Source: AMrXdXtqM6IjGmowe6fS9Q3oHXUskpbnh63y+nfK2xNlRIJsQW2cMSRCEG6iA+FPLjnqEBrFLLva/g==
X-Received: by 2002:a62:ae19:0:b0:577:8c7e:7489 with SMTP id
 q25-20020a62ae19000000b005778c7e7489mr8133216pff.10.1671440551625; 
 Mon, 19 Dec 2022 01:02:31 -0800 (PST)
Received: from Kais-MacBook.local ([134.209.106.31])
 by smtp.gmail.com with ESMTPSA id
 w10-20020aa79a0a000000b00575afe3c188sm6016113pfj.150.2022.12.19.01.02.29
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Dec 2022 01:02:30 -0800 (PST)
From: Kai Ma <justksqsf@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.60; re-builder should read all forms for the rx syntax
Date: Mon, 19 Dec 2022 17:02:27 +0800
Message-ID: <m2y1r36a1o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::444;
 envelope-from=justksqsf@HIDDEN; helo=mail-pf1-x444.google.com
X-Spam_score_int: -15
X-Spam_score: -1.6
X-Spam_bar: -
X-Spam_report: (-1.6 / 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,
 FROM_LOCAL_NOVOWEL=0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

Severity: wishlist

re-builder (rx syntax) currently cannot read multiple forms.  This
results in suboptimal user experience.  For example, even though

    (rx "<i>" (group (*? anychar)) "</i>")

is perfectly fine, but in re-builder, one has to write it as follows:

    '(and "<i>" (group (*? anychar)) "</i>")

Ideally, re-builder should allow users to simply write

    "<i>" (group (*? anychar)) "</i>"

(The relevant function seems to be 'reb-cook-regexp'.)

	Kai




Acknowledgement sent to Kai Ma <justksqsf@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#60196; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 6 Jun 2023 13:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.