From unknown Sun Aug 17 09:11:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#31698 <31698@debbugs.gnu.org> To: bug#31698 <31698@debbugs.gnu.org> Subject: Status: 27.0; `rx' help: Show equivalent regexp constructs Reply-To: bug#31698 <31698@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:11:41 +0000 retitle 31698 27.0; `rx' help: Show equivalent regexp constructs reassign 31698 emacs submitter 31698 Drew Adams severity 31698 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 03 13:01:26 2018 Received: (at submit) by debbugs.gnu.org; 3 Jun 2018 17:01:26 +0000 Received: from localhost ([127.0.0.1]:60487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPWNi-0004Tp-E3 for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:01:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPWNg-0004Tc-I4 for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:01:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPWNa-0004ZW-Ge for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:01:19 -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.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPWNa-0004ZN-D5 for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:01:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPWNZ-0003oO-9K for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:01:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPWNV-0004Ry-DP for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:01:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:57742) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPWNV-0004PN-3k for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:01:13 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w53H0U8G116801 for ; Sun, 3 Jun 2018 17:01:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=VMwsV8bGlaV1vkZbkL/yqxHR7cO/yPEyS+aHsR0ftV8=; b=v7ZqcSlaeG5LjykBJL4EB+MtPQCO2//Lwjlj4/F2pn7Cq8d5AcBbJ0tXqW0CBClHNqUV TX41XzWAj3WRgAFjSUgz225+fsCAYMK1ZZdj7JrP1hcfROq29at5yXaMXr54S7bPlBhj 8FCx5Z7OsWSNyB503F5YfQKMvss8UkL5KOuxxV3t0bGlAe731k5Blra92uZgj5lg1sg9 sb+9SD9N5Uj+flI6BWpH5M/c3IPpvzN41W2Nso7i/pXM7eUirBuA1MRhpMdDlknrqLzB NM3LImo2epT8FlrbnQqAP3Z1Af7Bk5LLx5a+eEpxR3pzkpSZLVO0KZk9CEKSVzhwErkN kQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2jbvyp17mk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 03 Jun 2018 17:01:10 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w53H18bC015700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 3 Jun 2018 17:01:09 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w53H18sD024293 for ; Sun, 3 Jun 2018 17:01:08 GMT MIME-Version: 1.0 Message-ID: <66469700-731c-4a05-a06e-51dba8dd8149@default> Date: Sun, 3 Jun 2018 10:01:07 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 27.0; `rx' help: Show equivalent regexp constructs X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8913 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=667 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806030211 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit 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: -5.0 (-----) Help for `rx' could use some improvement. 1. There seems to be no other help for `rx' than `C-h f rx'. Nothing in the Elisp manual, for instance. Perhaps it should have its own manual. Or perhaps it should be documented in the Elisp manual (?). It's hard to imagine someone trying to learn the use of `rx' just by looking at `C-h f rx'. Emacs should try to do better. 2. Please document (in the doc string of `rx', if nowhere else) the correspondences between each of the `rx' constructs and regexp syntax. At least please document the most important ones. For example, `zero-or-more' presumably corresponds to postfix regexp char `*'. 3. Please consider reordering the doc-string text to cover more commonly used and more important constructs before those less likely to be used. E.g., `not', `and', and `or', seem more common and more important than `category'. In GNU Emacs 27.0.50 (build 3, x86_64-w64-mingw32) of 2018-03-21 Repository revision: e70d0c9e66d7a8609450b2889869d16aeb0363b5 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install -C 'CFLAGS=3D-O2 -static -g3'' From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 03 13:14:08 2018 Received: (at 31698) by debbugs.gnu.org; 3 Jun 2018 17:14:08 +0000 Received: from localhost ([127.0.0.1]:60494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPWa0-0004ks-L0 for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:14:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPWZy-0004kR-KM for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 13:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPWZp-0002IL-FG for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 13:14:01 -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.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPWZp-0002I8-Bi; Sun, 03 Jun 2018 13:13:57 -0400 Received: from [176.228.60.248] (port=4486 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fPWZo-0007KV-Qe; Sun, 03 Jun 2018 13:13:57 -0400 Date: Sun, 03 Jun 2018 20:14:02 +0300 Message-Id: <83fu23dc85.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: <66469700-731c-4a05-a06e-51dba8dd8149@default> (message from Drew Adams on Sun, 3 Jun 2018 10:01:07 -0700 (PDT)) Subject: Re: bug#31698: 27.0; `rx' help: Show equivalent regexp constructs References: <66469700-731c-4a05-a06e-51dba8dd8149@default> 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-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31698 Cc: 31698@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Date: Sun, 3 Jun 2018 10:01:07 -0700 (PDT) > From: Drew Adams > > Help for `rx' could use some improvement. FWIW, I disagree. I consider the doc string of 'rx' almost perfect, it's an example that people should learn from. > 1. There seems to be no other help for `rx' than `C-h f rx'. Nothing in > the Elisp manual, for instance. Perhaps it should have its own > manual. Or perhaps it should be documented in the Elisp manual (?). > It's hard to imagine someone trying to learn the use of `rx' just by > looking at `C-h f rx'. Emacs should try to do better. Given it's not-so-widespread use (and even outright critique of its very raison d'ĂȘtre), I see no need to describe this in the manual. If and when its use becomes more widespread, we could consider that. For now, it will just bloat the manual. > 2. Please document (in the doc string of `rx', if nowhere else) the > correspondences between each of the `rx' constructs and regexp > syntax. At least please document the most important ones. For > example, `zero-or-more' presumably corresponds to postfix regexp char > `*'. Really? Doesn't "zero-or-more" define the effect as clearly as possible? I think it does. > 3. Please consider reordering the doc-string text to cover more commonly > used and more important constructs before those less likely to be > used. E.g., `not', `and', and `or', seem more common and more > important than `category'. "Important" is in the eyes of the beholder. I don't see why the current order is wrong. If anything, it starts from "atoms" and moves to "expressions", which is IMO no less important than any other "importance" grade. Having said all that, if someone wants to work on this and thinks they can improve on the current state of affairs, feel free. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 03 13:53:41 2018 Received: (at 31698) by debbugs.gnu.org; 3 Jun 2018 17:53:41 +0000 Received: from localhost ([127.0.0.1]:60505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPXCG-0005gY-Rh for submit@debbugs.gnu.org; Sun, 03 Jun 2018 13:53:41 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:59238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPXCE-0005gI-HS for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 13:53:39 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w53HqL5g166918; Sun, 3 Jun 2018 17:53:32 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-2017-10-26; bh=YZyvPRkykM+DmCyRCcz2/eYESNLodITiBtkrqY5DZ2w=; b=s+zvkNtmpOYL1smXe5KEr+WsSBPvWVsd3KtTy+z2hMFYYt57WyrCIGhIoxPegpfHYe5C RO3HGOzA7goig6i5W5meIKClDas3/2Kmk3H2JKOdwzxadz1qV8DQfSYVotAATm6TJsbr K0J3oA+MerMWI3nDD3mqM/MjTIAwST2fGt2orZsX1RgrAGQALnlYEiE5TB+pMVZ0iE/2 FwjcbiijIsEcXHWXxkQIBTyToHnCT1LdQ6IiCp49ej7rX8DVZdVIuHiXXG2Ve1dQsd7a bXwnTFcAubb2pdteaDZfdANax1S3FBBfatv5RW+6DXC/PukTKJH1XEA0/KPCHgtxr81h Kg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2jbvyp995r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 03 Jun 2018 17:53:32 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w53HrVDJ012535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 3 Jun 2018 17:53:31 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w53HrU6x021936; Sun, 3 Jun 2018 17:53:31 GMT MIME-Version: 1.0 Message-ID: <8e6225c9-73f1-4d5c-b62e-26596d556433@default> Date: Sun, 3 Jun 2018 10:53:29 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#31698: 27.0; `rx' help: Show equivalent regexp constructs References: <66469700-731c-4a05-a06e-51dba8dd8149@default> <83fu23dc85.fsf@gnu.org> In-Reply-To: <83fu23dc85.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8913 signatures=668702 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-1805220000 definitions=main-1806030222 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31698 Cc: 31698@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: -3.3 (---) > > Help for `rx' could use some improvement. >=20 > FWIW, I disagree. I consider the doc string of 'rx' almost perfect, > it's an example that people should learn from. >=20 > > 1. There seems to be no other help for `rx' than `C-h f rx'. Nothing > > in the Elisp manual, for instance. Perhaps it should have its own > > manual. Or perhaps it should be documented in the Elisp manual (?). > > It's hard to imagine someone trying to learn the use of `rx' just by > > looking at `C-h f rx'. Emacs should try to do better. >=20 > Given it's not-so-widespread use (and even outright critique of its > very raison d'=C3=AAtre), I see no need to describe this in the manual. = If > and when its use becomes more widespread, we could consider that. For > now, it will just bloat the manual. Perhaps its not-so-widespread use is _partly_ due to the lack of more helpful doc? I agree about the Elisp manual, FWIW. I don't agree that `rx' is adequately doc'd, at least not in terms of helping people learn it and understand the relation between its constucts and those of regular expressions. To learn to use `rx' in place of regexps (or together with regexps), the doc string is not help enough. It's fine as a doc string, but something more (e.g. an `rx' manual) would be helpful. I'm thinking, in particular, of people who are familiar with regexps (Elisp or other) but not with `rx'. =20 > > 2. Please document (in the doc string of `rx', if nowhere else) the > > correspondences between each of the `rx' constructs and regexp > > syntax. At least please document the most important ones. For > > example, `zero-or-more' presumably corresponds to postfix regexp > > char `*'. >=20 > Really? Doesn't "zero-or-more" define the effect as clearly as > possible? I think it does. Perhaps you're missing the point. Yes, `zero-or-more' describes the effect. No, it does not tell you which `rx' construct corresponds to `*' in a regexp. Again, I'm thinking, in particular, of people who are familiar with regexps (Elisp or other) but not with `rx'. Documenting the correpondence explicitly, especially for the direction regexp-construct-TO-rx-construct, would be a step toward the ability to go back and forth easier. Ideally, we'd have the ability to put your cursor on a regexp in some code and hit a key to: * see a corresponding `rx' sexp and * optionally replace the regexp with the `rx' sexp. > > 3. Please consider reordering the doc-string text to cover more > > commonly used and more important constructs before those less > > likely to be used. E.g., `not', `and', and `or', seem more > > common and more important than `category'. >=20 > "Important" is in the eyes of the beholder. I don't see why the > current order is wrong. If anything, it starts from "atoms" and moves > to "expressions", which is IMO no less important than any other > "importance" grade. OK, forget "important". You chose to ignore "more commonly used". Please consider that. You must scan 212 lines (!) of doc string before you get to `and' (aka `seq', aka `:', aka `sequence'), which tells you how to write a sequence of patterns. Again, it's not so important for a doc string, which is essentially reference doc, not help-you-learn doc. But with nothing except the doc string to go on, it takes some trudging through more rarely used stuff (I mentioned categories) just to get to stuff that is likely to be used often. > Having said all that, if someone wants to work on this and thinks they > can improve on the current state of affairs, feel free. I certainly _hope_ people feel free to help. I guess you say that to make clear that you are leaving the request open. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 03 14:30:27 2018 Received: (at 31698) by debbugs.gnu.org; 3 Jun 2018 18:30:27 +0000 Received: from localhost ([127.0.0.1]:60518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPXlr-0008Vc-5B for submit@debbugs.gnu.org; Sun, 03 Jun 2018 14:30:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPXlp-0008VN-4y for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 14:30:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPXlf-0001GP-DJ for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 14:30:19 -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.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPXlf-0001GE-9J; Sun, 03 Jun 2018 14:30:15 -0400 Received: from [176.228.60.248] (port=4560 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fPXld-0007j0-7N; Sun, 03 Jun 2018 14:30:13 -0400 Date: Sun, 03 Jun 2018 21:30:18 +0300 Message-Id: <83efhnd8p1.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: <8e6225c9-73f1-4d5c-b62e-26596d556433@default> (message from Drew Adams on Sun, 3 Jun 2018 10:53:29 -0700 (PDT)) Subject: Re: bug#31698: 27.0; `rx' help: Show equivalent regexp constructs References: <66469700-731c-4a05-a06e-51dba8dd8149@default> <83fu23dc85.fsf@gnu.org> <8e6225c9-73f1-4d5c-b62e-26596d556433@default> 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-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31698 Cc: 31698@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Date: Sun, 3 Jun 2018 10:53:29 -0700 (PDT) > From: Drew Adams > Cc: 31698@debbugs.gnu.org > > > Given it's not-so-widespread use (and even outright critique of its > > very raison d'ĂȘtre), I see no need to describe this in the manual. If > > and when its use becomes more widespread, we could consider that. For > > now, it will just bloat the manual. > > Perhaps its not-so-widespread use is _partly_ due to the lack > of more helpful doc? I very much doubt that, and the recent discussion seems to concur. > I'm thinking, in particular, of people who are familiar > with regexps (Elisp or other) but not with `rx'. I'm one such person, and yet I see no problem with the current documentation. > > > 2. Please document (in the doc string of `rx', if nowhere else) the > > > correspondences between each of the `rx' constructs and regexp > > > syntax. At least please document the most important ones. For > > > example, `zero-or-more' presumably corresponds to postfix regexp > > > char `*'. > > > > Really? Doesn't "zero-or-more" define the effect as clearly as > > possible? I think it does. > > Perhaps you're missing the point. Yes, `zero-or-more' > describes the effect. No, it does not tell you which > `rx' construct corresponds to `*' in a regexp. Again, > I'm thinking, in particular, of people who are familiar > with regexps (Elisp or other) but not with `rx'. Again, I'm one such person, and it was immediately clear to me what 'zero-or-more' translates to. > You must scan 212 lines (!) of doc string before you get to > `and' (aka `seq', aka `:', aka `sequence'), which tells you > how to write a sequence of patterns. There will always be something for which you will need to scan 212 lines before you get to it. There isn't too much one can say on a single line, so something's gotta give. > > Having said all that, if someone wants to work on this and thinks they > > can improve on the current state of affairs, feel free. > > I certainly _hope_ people feel free to help. I guess > you say that to make clear that you are leaving the > request open. Did you see me close it? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 03 16:03:04 2018 Received: (at 31698) by debbugs.gnu.org; 3 Jun 2018 20:03:04 +0000 Received: from localhost ([127.0.0.1]:60583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPZDT-0002Qo-VG for submit@debbugs.gnu.org; Sun, 03 Jun 2018 16:03:04 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPZDS-0002QH-5z for 31698@debbugs.gnu.org; Sun, 03 Jun 2018 16:03:02 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w53JvL1a036322; Sun, 3 Jun 2018 20:02:56 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-2017-10-26; bh=GCm3fz7sonHjzU9AuwPUS8XgGnZhZiMz4QuvRJMCaaI=; b=JAbDm+q0gOOQLpf7dpu0bbOJZdQ8iUeucELZ4+bVe9slhexowqr9HgtmTlgDMH9gKhxV sQj1f//KfB1fl6rkz/QzMeXg/emx9KnE9daArwTW9WFHEAwIFnhOBWjdeY78joQgbkFq +NOvMhqn6PZ8D12RuUMWuJTYmQypsqfn244iyYFrmn4o0kY7j25JpE7WHLV9bcTdI4Vi ZSojvoXZxE3lpYos4TbybLG0EGstP4T+M2Tltf6k3Ve2VAdGojKEYelRVEzsbpDMqMPN 6NROWdn2msCSqoKjEpNH9IqJkHsaQu58kkCn4+OmrxHjcSlD+sMFvlpAh2Ea1uItJNBk AA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2jbvyp9c2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 03 Jun 2018 20:02:56 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w53K2tMc008245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 3 Jun 2018 20:02:55 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w53K2sVu011050; Sun, 3 Jun 2018 20:02:55 GMT MIME-Version: 1.0 Message-ID: <2c335f8a-d6df-45b1-b1dd-a7f42dbcb584@default> Date: Sun, 3 Jun 2018 13:02:53 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#31698: 27.0; `rx' help: Show equivalent regexp constructs References: <66469700-731c-4a05-a06e-51dba8dd8149@default> <83fu23dc85.fsf@gnu.org> <8e6225c9-73f1-4d5c-b62e-26596d556433@default> <83efhnd8p1.fsf@gnu.org> In-Reply-To: <83efhnd8p1.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8913 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=446 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806030248 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31698 Cc: 31698@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: -3.3 (---) > > Perhaps its not-so-widespread use is _partly_ due to > > the lack of more helpful doc? >=20 > I very much doubt that, and the recent discussion seems to concur. No, I don't think it does. The recent discussion pointed out other reasons why it is not more widely used. And I'm one of those in that discussion who explicitly agreed with those other reasons. And FWIW I think those reasons (verbosity etc.) are more important than the reason given in this report. There is, however, nothing in that discussion that argues that the reason given here is not relevant. > > I'm thinking, in particular, of people who are familiar > > with regexps (Elisp or other) but not with `rx'. >=20 > I'm one such person, and yet I see no problem with the > current documentation. Yes, you've made that clear. But please "feel free" to say it again. I too am one such person, and guess what...=20 > > > > 2. Please document (in the doc string of `rx', if nowhere else) the > > > > correspondences between each of the `rx' constructs and regexp > > > > syntax. At least please document the most important ones. For > > > > example, `zero-or-more' presumably corresponds to postfix regexp > > > > char `*'. > > > > > > Really? Doesn't "zero-or-more" define the effect as=20 > > > clearly as possible? I think it does. > > > > Perhaps you're missing the point. Yes, `zero-or-more' > > describes the effect. No, it does not tell you which > > `rx' construct corresponds to `*' in a regexp. Again, > > I'm thinking, in particular, of people who are familiar > > with regexps (Elisp or other) but not with `rx'. >=20 > Again, I'm one such person, and it was immediately clear > to me what 'zero-or-more' translates to. Again, it's about the other direction. Not finding out what `zero-or-more' means or translates to in a regexp, but finding out what `*' in a regexp translates to in `rx'. Quick, what does a shy regexp group translate to in `rx'? (There is no correspondence, because none is needed.) In general, it's _not obvious_ how a given regexp would be translated to `rx'. It would be helpful to be able to easily translate regexps to `rx' sexps. The doc for `rx' could help with that by providing an explicit mapping between the two. Do you disagree that that would be helpful? The mapping exists in the code, of course, but only in the direction rx-to-regexp. For someone new to `rx' who wants to analyze a regexp into its `rx' constituents, or who wants to replace a regexp by an equivalent `rx' sexp, documenting a regexp-to-rx mapping would help. And (as you've said more than once) "I'm one such person." In addition, it would be good to have a Lisp function that performs a regexp-to-rx translation. > > You must scan 212 lines (!) of doc string before you get to > > `and' (aka `seq', aka `:', aka `sequence'), which tells you > > how to write a sequence of patterns. > > There will always be something for which you will need to scan 212 > lines before you get to it. There isn't too much one can say on a > single line, so something's gotta give. That's an argument that says only that different orders are possible. Unless you are trying to make the even less useful argument that the order chosen makes no difference. Not everything can be stated first, clearly. Such a truism has no relevance for choosing which order to use. Different orders serve different purposes. > > > Having said all that, if someone wants to work on this and thinks > > > they can improve on the current state of affairs, feel free. > > > > I certainly _hope_ people feel free to help. I guess > > you say that to make clear that you are leaving the > > request open. >=20 > Did you see me close it? Did I say you closed it? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 07 06:15:21 2019 Received: (at control) by debbugs.gnu.org; 7 Jul 2019 10:15:21 +0000 Received: from localhost ([127.0.0.1]:56170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hk4CV-0001ea-8V for submit@debbugs.gnu.org; Sun, 07 Jul 2019 06:15:19 -0400 Received: from mail152c50.megamailservers.eu ([91.136.10.162]:38330 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hk4CS-0001eQ-47 for control@debbugs.gnu.org; Sun, 07 Jul 2019 06:15:17 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1562494514; bh=M6aHQSbKcqgQM8Fmftrh1+GIM2S+2UoYvIRD7yNgDVY=; h=From:Subject:Date:To:From; b=OEQBoZOvqER7WNHVdzncp2fDzJ0jDNNZuMm1kLgjBmWg3BmB7Q2uAYOuNRrhIx8FD XKEvq1DkMe0eYWl7JPuNjD5IJEdZ8AgR0vzPd3gx1aRqF+s+kKfIJCtJqSPCqKvnFg BVRpfv/qFrIm+Z7H0CcYjwgDU8hHN3Vjw/wlrGp8= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x67AFCoh004048 for ; Sun, 7 Jul 2019 10:15:14 +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: <31EBCCF4-5D4B-40CE-8363-8D8E1F21494D@acm.org> Date: Sun, 7 Jul 2019 12:15:12 +0200 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0215.5D21C632.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=U/y889ju c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=s5fXwV-Aa2I0pu-rdTkA:9 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-Spam-Score: 1.0 (+) 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.0 (/) merge 31698 36496 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 20:28:13 2019 Received: (at control) by debbugs.gnu.org; 17 Jul 2019 00:28:13 +0000 Received: from localhost ([127.0.0.1]:51367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnXnp-00077Q-K4 for submit@debbugs.gnu.org; Tue, 16 Jul 2019 20:28:13 -0400 Received: from mail-io1-f53.google.com ([209.85.166.53]:45918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnXnn-00077D-Di for control@debbugs.gnu.org; Tue, 16 Jul 2019 20:28:12 -0400 Received: by mail-io1-f53.google.com with SMTP id g20so42952739ioc.12 for ; Tue, 16 Jul 2019 17:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=YAD8cG844pwRhfuWBF0PO7K02/oVN2snsqm//B9CgNU=; b=dwaO6bYPbwIcH3qd+oWQc9ssiZUxZdq1qZlPXdh0N57tj0cT3cXggPosmZeoIshnNR Ua2ul+OR3YHafqQ90U/Z+ipVjfqW9a/YJ23EKH5863fIHEZotxBdf+0AtLlE63y9CAyz FO2IMBPxpouWC50OfvyeLEkWZBZGB1mB6VBrIGpL5pjyR+LK8ngVH7Ca5eyq3nZmFtm5 op7JIIX82wXEvAr3I+JkERCDw1PGJ5+Np2/HhUt3DoAyNQ6kIMsH3UphlyWb5lAs3TRq L3pvddmSVBQY7aCfAC6asBfG7ygjs2pXCdeiNLtkT/CMaaXk9ebfiyvOCB5Km/B4yAJN L6VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=YAD8cG844pwRhfuWBF0PO7K02/oVN2snsqm//B9CgNU=; b=sn4GutXoT4HqHTEskyuPbbXF/MJMvj2wbtoYpo1xEyiB4wOlgubx+IDTCOJ/jp+vEg QT//+JbbhT1RDLT65xsqVAnZQK73yFXpdkGiz4Is6MYjp4W8p+5vcexgR3UX+Ohq3gOi AQEGvGpwTLBmbbPaHSJRYnUhwFbbNyLPKUopkLOAZhvbMwyJb2UgBjQQ6dn6/FOM9N6b wHNy4Jm308otxRMEq9FK0+XSAe5dEntrqmbPPWzf5i5kVyKvcyhLThaAEg4YUWDyO0IP Axm0xvHMON6m85gN7MimVYiHzcq4q1kiB0UZ2Ofj/TJvQh/8CBVl5vZF7TDP7nUOamC/ JRxg== X-Gm-Message-State: APjAAAX+p8Je1e9+X0g5cobEf6rGhSyHVNcBntrrf+W3jQBYjfQxLVWC FVZXuS2QoKHBIp3BfxzJnSvHLf8x X-Google-Smtp-Source: APXvYqxzrEivNXgJCL2vQxhwv93qIgCkE/6olX0dZPq/5Wt4FmnGYosUX1RTzeVGdGeUQZN23O2tAw== X-Received: by 2002:a5e:9747:: with SMTP id h7mr34165227ioq.299.1563323285486; Tue, 16 Jul 2019 17:28:05 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id e22sm17309363iob.66.2019.07.16.17.28.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2019 17:28:04 -0700 (PDT) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #36496 Date: Tue, 16 Jul 2019 20:28:03 -0400 Message-ID: <87h87lzer0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) # the patch was pushed to master, bug left open for possible further improvements tags 36496 - patch quit From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 11:12:51 2022 Received: (at control) by debbugs.gnu.org; 25 Apr 2022 15:12:51 +0000 Received: from localhost ([127.0.0.1]:35838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nj0OQ-0003r4-Uy for submit@debbugs.gnu.org; Mon, 25 Apr 2022 11:12:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nj0OP-0003qg-QA for control@debbugs.gnu.org; Mon, 25 Apr 2022 11:12:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=H/g6rIrjQgDFQm80rh5dYma93UCmQKCyT7Zjo86oN2A=; b=bBqC6Lk3kYDfk0tmHd0pyXq8YN EkzKaUtkTXL0jnzgocLv01nlIolXEk2YEJAVbCv3Z9HmM85TGC63zpM4o+Y7AiVEoNoxsIXeK6Lde 3PVI4IBz/tKrYsEs/mzE9eXSuSpo4d2h0i0xbsRsHxQQQkYnnGzvXGX4owuB2hSsdRLQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nj0OI-0004GF-DY for control@debbugs.gnu.org; Mon, 25 Apr 2022 17:12:44 +0200 Date: Mon, 25 Apr 2022 17:12:41 +0200 Message-Id: <87h76h19jq.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36496 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 36496 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.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: -3.3 (---) close 36496 quit From unknown Sun Aug 17 09:11:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 24 May 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator