From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#36496: [PATCH] Describe the rx notation in the lisp manual Date: Sun, 7 Jul 2019 00:36:24 +0000 (UTC) Message-ID: <0458803b-c701-4706-9843-174b7373cf23@default> References: <0C783D67-9502-408B-B845-5599BD596361@acm.org> <838stdbw8e.fsf@gnu.org> <83a7draccd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="81419"; mail-complaints-to="usenet@blaine.gmane.org" Cc: mattiase@acm.org, 36496@debbugs.gnu.org To: rms@gnu.org, Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 07 02:37:20 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjvB9-000L2O-KC for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jul 2019 02:37:19 +0200 Original-Received: from localhost ([::1]:33492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjvB7-00008K-VM for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2019 20:37:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51636) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjvAu-000080-Ny for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 20:37:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjvAt-0003xP-Gw for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 20:37:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47202) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjvAs-0003wW-9h for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 20:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjvAs-0001EV-5y for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 20:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 00:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36496 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36496-submit@debbugs.gnu.org id=B36496.15624598144727 (code B ref 36496); Sun, 07 Jul 2019 00:37:02 +0000 Original-Received: (at 36496) by debbugs.gnu.org; 7 Jul 2019 00:36:54 +0000 Original-Received: from localhost ([127.0.0.1]:56023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjvAk-0001EB-FY for submit@debbugs.gnu.org; Sat, 06 Jul 2019 20:36:54 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:60942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjvAi-0001Dv-Nq for 36496@debbugs.gnu.org; Sat, 06 Jul 2019 20:36:53 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x670Z6um113223; Sun, 7 Jul 2019 00:36:33 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-2018-07-02; bh=OclMhPlMm3cDWUFl48DdIv1w6sZxjC3IqaY8/IrE/8Y=; b=dwTa9pjlcWKLLgqsa4pnY/1iH2XPZKY7ISFFiqG8xG+4PIRg0OwGFGL/vIctOtudDeEg 6MqJArlyULPCESOTcm9hnshc+l74OwEAgLi+aE6Xyo9hWeJw1wnuOxnA34Eu6h0RmMOE ygpaHEKbE8MdA2sFC+fh4N7bGdlgMDuVghcPotnyZ1oupdlbGb/pFr6LGGACgxM2WWXn K/hN+s51IWDE68RoN1Huumr596svKoABJxYVamqIbj3T7oG24/lOrRMgfUWgJIrOkEZ0 gCBSD4+Gtn92Hjns6UbZyfc0TxLmhusme7QAgH0oVJhMaHTmQX2FfOcIGI8ZoALK2GRL Xg== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2tjk2t9t7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Jul 2019 00:36:33 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x670YJ2h001897; Sun, 7 Jul 2019 00:36:33 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2tjjyjqyqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Jul 2019 00:36:33 +0000 Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x670aP59028292; Sun, 7 Jul 2019 00:36:27 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9310 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=961 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907070006 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9310 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907070006 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:162265 Archived-At: > > I cannot answer the question without knowing which practical factors > > made rx inconvenient in the past. Where can one find this > > information? >=20 > I don't know. I think people discussed it in the > past -- perhaps on emacs-devel. I don't remember details. >=20 > What's clear is that rx didn't replace regexp syntax in the past. > There had to be reasons. I don't want to sidetrack this thread. But one of the things mentioned in some previous threads about `rx' was that some people (including me) thought it would be great if you could invoke a command on a regexp (e.g. a regexp string in code) and have an equivalent `rx' expression pop up, for inspection and understanding. A regexp string can be very concise (advantage), even if obtuse (disadvantage). Much of the time one doesn't need to dig into the content of the regexp. It would be nice to be able to have only the result of `rx' in the code and be able to get its `rx' expression on demand. In sum, I'd say that one advantage of a regexp is its concision. But when you need or want to grok it it's good to be able to get its `rx' sexp. With such a feature people could use `rx' or its result in code, au choix. And they could see the `rx' equivalent for a regexp on demand. This is orthogonal to having good doc for `rx'. I mention it only because the question came up of disadvantages of `rx' (reasons why it might not replace a regexp). (Another reason, if it's true, would be if there are some regexp constructs that `rx' cannot handle/reproduce.)