From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#58727: 29.0.50; rx doc: Semantics of RX... Date: Mon, 24 Oct 2022 14:49:25 +0200 Message-ID: References: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> <87pmeic5lq.fsf@web.de> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22464"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58727@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 24 15:04:56 2022 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 1omx8Q-0005W9-R3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Oct 2022 15:04:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omwu3-0007eV-US; Mon, 24 Oct 2022 08:50:03 -0400 Original-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 ) id 1omwu2-0007cA-3I for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 08:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omwu1-0004fT-Qs for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 08:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omwu1-0005fF-Jg for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 08:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2022 12:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58727 X-GNU-PR-Package: emacs Original-Received: via spool by 58727-submit@debbugs.gnu.org id=B58727.166661577921734 (code B ref 58727); Mon, 24 Oct 2022 12:50:01 +0000 Original-Received: (at 58727) by debbugs.gnu.org; 24 Oct 2022 12:49:39 +0000 Original-Received: from localhost ([127.0.0.1]:47351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omwtf-0005eU-7V for submit@debbugs.gnu.org; Mon, 24 Oct 2022 08:49:39 -0400 Original-Received: from mail-lj1-f180.google.com ([209.85.208.180]:42660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omwta-0005eC-Sf for 58727@debbugs.gnu.org; Mon, 24 Oct 2022 08:49:38 -0400 Original-Received: by mail-lj1-f180.google.com with SMTP id bs14so12626445ljb.9 for <58727@debbugs.gnu.org>; Mon, 24 Oct 2022 05:49:34 -0700 (PDT) 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:sender:from:to:cc:subject :date:message-id:reply-to; bh=J00ltKTZld0qVnMsG2t6G5VjJSQLwQC14T5F+gr99Rc=; b=h7DV8VJZNuTBbPB+ntaEW+INkrnpOGK20dHmbpvZa+DUVBP+kPM7nrsFaTGXj7RnhK 8cjjRb4yxmHDaa1j0C3UEu/6GVidn2iB0MoTkqAg1GYcYgGpLT/pzTVwV2EfJCZNNt7m sHGA46WqgyWhTsfNFIbe22v/rcjf4qw4LbxuwMmR3StWkf99J9YNzH5gNvsv/P6rCpAT PkcyUKiAt3Dv6v3+A4hS0dirO9gED0ZY87ArbyVI14IExKnJ+8/69njeZSPRtXwZGvNP Q6OQk9W8X6V4ljl5fGnNa7CQStChA/zm31ZZsm9U8iezHINWaU0h4QshpnW+2uvTjyQz ARXw== 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:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=J00ltKTZld0qVnMsG2t6G5VjJSQLwQC14T5F+gr99Rc=; b=oCTtfyuNupoIDlfbtmJ+Ix+efiXQIF+IBCJ9F3YAtODFNOhoU3Wa4JXGRkKprtNV7X vb9+sUQvsJx/VBRtClqDk95VqYbwYnntusyLXIBXHZLcOWW2Eoup9pmHBfZg+xEg3neG GQM2OEdBb3SMrUOy3ckxb7FeSnw/GWYoPQKqopDFeGiFF7Q/YKqMEcPCsVgkhFy2yxBB SJKtBSQpmpArnL9JQtaj6ToRfjWYOnTeUAM/7LBCU5CxwAJibdnucBxZqG7G8u6Zks2b MDt8eXEFTlCyskNWT/IT9HtZ7Ei+zs2pUTOArWvQ3EESUhpqc7WFu2HBUoe6VmyAid2t lCMg== X-Gm-Message-State: ACrzQf0ygr/BqzwUnRLIm3IMTVJz+DTStIxJ2aNFa0mInmLI2I0HfZ67 Mmmot7n9F13w9Y/m9oK9vY0= X-Google-Smtp-Source: AMsMyM6C1eEFVbBHisGlLx3PvZNrhS8EaE2XqwYa6Rsel+el2123kt5uMjHHpOdjUpOlzW/LCrWo1A== X-Received: by 2002:a05:651c:d7:b0:26f:e175:cefa with SMTP id 23-20020a05651c00d700b0026fe175cefamr11213598ljr.302.1666615768565; Mon, 24 Oct 2022 05:49:28 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id w3-20020a19c503000000b00492ea54beeasm4517009lfe.306.2022.10.24.05.49.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2022 05:49:28 -0700 (PDT) In-Reply-To: <87pmeic5lq.fsf@web.de> X-Mailer: Apple Mail (2.3654.120.0.1.13) 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246108 Archived-At: 24 okt. 2022 kl. 04.34 skrev Michael Heerdegen = : >> The rule is implicit concatenation unless specified otherwise; maybe >> we could say that in the leading paragraph. (`or` is the only place >> where concatenation isn't done.) >=20 > Yes, that would be good. Now added. > I meant the implicit shy > grouping added in the return value Yes, and this is simply not a problem in rx, nor on the abstract regexp = level -- it's just a feature of the surface syntax of string regexps but = that's not something that the rx docs are or should be preoccupied with. (For that matter, 'shy grouping' is terrible terminology: it's obscure = wording for something that is generally known as bracketing to the = general population.) > (rx (or "ab" "cd")) =3D=3D> "\\(?:ab\\|cd\\)" > ^^^^^ ^^^ This happens to be a cosmetic flaw in rx: in this case the brackets = shouldn't be there at all, but getting rid of them is currently more = trouble than it's worth. It does not affect matching performance. See it = as an excess of packaging material which does not increase the shipping = costs. >> The manual provides corresponding string-notation constructs for >> orientation only. This is important -- rx forms are defined by their >> semantics, not by what strings they translate to. >=20 > Is this trivial however? Is it clear that, even for people that see = rx > more as a translator to stringish regexps, `rx' is that smart? It's not that rx is smart, it's that it's not completely broken. = Mentioning that rx adds brackets now and then is tantamount to saying = that it's not buggy.=20 We don't say that the byte-compiler emits jump instructions as needed, = not just because it's superfluous information but also because such a = statement suggests that it's not. > A sentence like "rx forms are defined by their semantics" would help = to > make that clear I think. Well, I added a phrase to that effect as well. Thank you for your comments and suggestions!