From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31698: 27.0; `rx' help: Show equivalent regexp constructs Date: Sun, 03 Jun 2018 20:14:02 +0300 Message-ID: <83fu23dc85.fsf@gnu.org> References: <66469700-731c-4a05-a06e-51dba8dd8149@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1528045989 32465 195.159.176.226 (3 Jun 2018 17:13:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 17:13:09 +0000 (UTC) Cc: 31698@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 03 19:13:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPWYx-0008KB-Sg for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 19:13:04 +0200 Original-Received: from localhost ([::1]:36019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPWb4-0005yl-QY for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 13:15:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPWax-0005xo-Gr for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPWas-0003ql-F9 for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:15:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPWas-0003qf-Ap for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPWas-0004mF-2Q for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 13:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jun 2018 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31698 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31698-submit@debbugs.gnu.org id=B31698.152804604818286 (code B ref 31698); Sun, 03 Jun 2018 17:15:02 +0000 Original-Received: (at 31698) by debbugs.gnu.org; 3 Jun 2018 17:14:08 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 In-reply-to: <66469700-731c-4a05-a06e-51dba8dd8149@default> (message from Drew Adams on Sun, 3 Jun 2018 10:01:07 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:146917 Archived-At: > 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.