From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#41006: 26.3; regular expressions documentation Date: Sun, 03 May 2020 22:31:20 +0200 Message-ID: <87k11s221z.fsf@stefankangas.se> References: <64E29F93-5A92-4F8D-9BA2-C6F14AEC2F64@acm.org> <824a1116-8e91-409f-95ff-69ef168a359d@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62046"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Richard Stallman , 41006@debbugs.gnu.org, jan To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 03 22:32:24 2020 Return-path: Envelope-to: geb-bug-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 1jVLHk-000G31-6R for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 May 2020 22:32:24 +0200 Original-Received: from localhost ([::1]:33162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVLHj-00020W-9K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 May 2020 16:32:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVLHP-0001mC-11 for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 16:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVLHO-00053a-Oh for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 16:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVLHO-0000x0-M2 for bug-gnu-emacs@gnu.org; Sun, 03 May 2020 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 May 2020 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41006 X-GNU-PR-Package: emacs Original-Received: via spool by 41006-submit@debbugs.gnu.org id=B41006.15885379043614 (code B ref 41006); Sun, 03 May 2020 20:32:02 +0000 Original-Received: (at 41006) by debbugs.gnu.org; 3 May 2020 20:31:44 +0000 Original-Received: from localhost ([127.0.0.1]:58111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVLH6-0000wD-4G for submit@debbugs.gnu.org; Sun, 03 May 2020 16:31:44 -0400 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:41960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVLGq-0000vn-M0 for 41006@debbugs.gnu.org; Sun, 03 May 2020 16:31:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mAedLVjCqQiTWzxRIYtjZBOFy9oeSm0jj3QFtyjtVfc=; b=rOo4dGSm993GnT+xGT+hqZggwY QY++eQsGQynRCoJbQKYpGgiEVMCRL78ct5KRjSXSJVkSuDydFlHwJ8II4x7XQLaY7VVCH+2z5DCQQ 7KfW/49LNzUBpgPPvy2Q3TZuE+HvHbt+4Hp1S0LFHG8r2H5NCBXbc+j1OI+NTxAcKW/ABw7dqob/q 00SZa3XzSu0uoos408Shs6dgF0x+oBLnlmXxbHRATwOEPM1kT/sG/lzP3sXeqtIq5+54INp+cWjU8 OEPXuxaTkDtI3P4NachdpZvflqHWi1gWecnQF7vuteJTSN+Vdktg5iB1L+tDjiQoETrpgF/qmU67s UnRhd//w==; Original-Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:54750 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jVLGk-000mxZ-04; Sun, 03 May 2020 16:31:22 -0400 In-Reply-To: <824a1116-8e91-409f-95ff-69ef168a359d@default> (Drew Adams's message of "Sun, 3 May 2020 13:08:14 -0700 (PDT)") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179617 Archived-At: Drew Adams writes: >> The disposition of the regexp documentation could be improved, yes. >> Currently it's arranged by syntax, which is the implementor's view, >> rather than by function, which is the user's. > > FWIW, I disagree with that characterization. > > Especially when it comes to the doc for regexp > patterns, as a user I want it to be organized > according to syntax. A regexp (regardless of > the particular syntax system used for regexps > in a given language) is very much about syntax. For me, this is different. My background before ELisp was already having using regexps extensively in other languages, having read the "Mastering Regular Expressions" book, and so on. (I expect that this is fairly typical.) So I go to the "Regular Expressions" node, looking mostly for how to use them. But I find nothing on that there. I only find a review of what looks like everything I already knew about regular expressions. In the past, I did this: scratched my head, gave up and searched the web instead. And it left me thinking that it's weird that Emacs documentation on Regular Expression is so poor... I have since learned that the information I have been looking for is actually in a separate node, for some reason not sorting under "Regular Expressions", called "Regexp Search". This section is expertly written and exactly what I would have needed, only too bad I couldn't find it! :-) It definitely seems to me that there is room for improvement here. And I think it's more about the structure than content. --- BTW, while we're on it, it would be very handy to have an overview in the manual of the quirks of regexps in Emacs in comparison to other languages. Mastering Regular Expressions does a very good job here, as far as I recall. That plus a list of which functions to use would get me, when I first started out with ELisp, 99% of where I needed to be, I think. Just my 2 cents here. Best regards, Stefan Kangas