From unknown Sun Jun 22 11:34:39 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#58727 <58727@debbugs.gnu.org> To: bug#58727 <58727@debbugs.gnu.org> Subject: Status: 29.0.50; rx doc: Semantics of RX... Reply-To: bug#58727 <58727@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:34:39 +0000 retitle 58727 29.0.50; rx doc: Semantics of RX... reassign 58727 emacs submitter 58727 Michael Heerdegen severity 58727 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 22 22:32:29 2022 Received: (at submit) by debbugs.gnu.org; 23 Oct 2022 02:32:29 +0000 Received: from localhost ([127.0.0.1]:42692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omQmq-000884-Sq for submit@debbugs.gnu.org; Sat, 22 Oct 2022 22:32:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:38086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omQmm-00087u-EL for submit@debbugs.gnu.org; Sat, 22 Oct 2022 22:32:27 -0400 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 1omQmm-0005IW-65 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2022 22:32:24 -0400 Received: from mout.web.de ([212.227.15.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omQmi-0006zV-1M for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2022 22:32:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1666492337; bh=r6gBLim2dbFhVgOVWdBJmTyHTJzEdDNvx5AtYdbCwkY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=GJxLxI56GROgpN6eJ3sR071XyQ+bCq8+/X5s/4obuPJmfGy08p63bR/DP30LkYbw9 mCMt1jSLftKzAKXbvvpHn6jJPNmYE+PLYPwiuADXBc4FQZBTUbJA/fKsxDaAdFJ0uY HFDN0nZ7ZY80GojLd/bzbK7KRtkEyLGDwQlCkzG6/Fe9jUy4+EvYTM1/tCtk1hsbOr uxHS5RvGs9VKSZECGZ37cxdQPKLlcUfTmbisKBcGV7671vkq4rMB64RSBbJjEnD0Oh f+pumDeWdCJtxhDGorUZWB2KMI9uUhxVuvmSxkxNM4QtsxqDBrck6wBtqj0HcwCiav 5RsM9crm+3RgQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([188.105.185.54]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MQ8Wa-1oQWDB3B56-00MBdg; Sun, 23 Oct 2022 04:32:17 +0200 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 29.0.50; rx doc: Semantics of RX... Date: Sun, 23 Oct 2022 04:32:17 +0200 Message-ID: <87tu3v2rta.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:nXm9M5LUoQ9PAdzi6QbPGXeA6Y8LM5r6gevVtpukdnq5OplJf5L q7+SFbsGr7Pu2eGqaOquW/sEBPi9hxbGiizptwOmRd6NLwvP7R1Sw8sezmCqltD24Re0ZMA H2wFx/NsN9ff2sZId5+G5oH9ZWrxNSujjAGBrlGv+NTXrjyUqsV7gZhPcRSsg3j/zpUqwiD Byt9E7zJdaMR83zy7Rplg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:jbm2G1ni24w=;oVsf5UdDWqWb7OmA1fYIYyN7Dlf 1kWq8RJKrfj6T/3xrZH2lWJLUCmFoDvFFGmwG7amBX9UMMdm0JgE5qV1guRuX7FsehGS6QCNk ozsNI1Ta/GMl3KH394rDzw/xVeVLsKNfUoo8R99IPXZT9Lgqka0JuGihGOUh0kwsrrPcElVd+ VqF9upE3mghJY8h8YC2AggKXs/OODoMR3AA5mXt3qN59eI7VZtiUPZ/Kkbi+9w03WZ4eqZk9e DP019C+A65JqhQaY3JZcMXAP0GqGGuM72ZIwCxsaSLMRb0vVqqCjF/VoZxoFy3mRz2mlQ0OcQ 7Bx4hgQIjInX5xxMBEwsEgIS2n04klZ90+0ThIGmYMlgKPxfowd6w7je/gnIouzmbVgwEgBGP RsQ1wKQspO/IBbGiMw8bvMahirO6jdo60ckGD0fczwwx3jR/reJggCZxZf5b2w4CHnUccugYr fxudDeRzPsDDgChnI+KyCvXL/oPAhP+szxLTWq1IYHrfkUL+T9kmUq8z/G5q18tOBbSdeY1ni sHQyovHvkKV6PI956dG8CDlJGKiDF/Sd2nkSpMaAw0eREEI8KV8Y87MwzyX1+2xbHlw38CmSe G7BGfvi+J/OcluOwE8bqOiJ7jo1EdFddQp7TjF8zKJ5NlhX4MwfydCluhh/Ve/U/gdWZsGV6N /QgxPOSCJ3o9c01i5n7+EuWNGj2AuCgyNrug5E2QmdTC8RF3OlDKNMwcosbg3hSb+wwtwkAoL nMKDkzlkN30LdTTaWVVxS78prNKxYye7DXUv3Gvl0QFKR+iSQ4n2Q4cTdMQ884GHApZVfIz1u jzXNu+bQ2mA7sOV7e82Y/ZeEm3rnWNipC4RDZugF+O6Sca5Lwe7grwUL6rxX3kOFkyO6sFwgr mjs4M3X6j/Z/8xKQvfKewUd85jAGk25u3D9jrJM2MLv+cxhEFO0S3bCZmZZFINxdoFjztPDgf pvuVR4wP6o3FcYU1KX7FXKWJuVY= Received-SPF: pass client-ip=212.227.15.3; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.7 (/) 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: -2.4 (--) Hello, please document the semantics of multiple RXs for the RX repetition operators (and maybe grouping operators, too). The resulting regexps are concatenating like with an implicit `seq'. This is not trivial, though: in stringish regexps the repetition operators are only unary, and different interpretations would make sense for `rx' (implicit `seq', implicit `or'). The docstring of `rx' doesn't tell anything about this. The manual has sentences like | =E2=80=98(zero-or-more RX...)=E2=80=99 | =E2=80=98(0+ RX...)=E2=80=99 | Match the RXs zero or more times. Greedy by default. | Corresponding string regexp: =E2=80=98A*=E2=80=99 (greedy), =E2=80= =98A*?=E2=80=99 (non-greedy) but that suffers from the same problem that the semantics of A are not clear: A =3D=3D (seq RX...) ? Oh, and maybe let's also make more clear that `rx' always cares about implicit grouping when necessary. For example, in (info "(elisp) Rx Constructs") it's not trivial that e.g. in =E2=80=98(seq RX...)=E2=80=99 =E2=80=98(sequence RX...)=E2=80=99 =E2=80=98(: RX...)=E2=80=99 =E2=80=98(and RX...)=E2=80=99 Match the RXs in sequence. Without arguments, the expression matches the empty string. Corresponding string regexp: =E2=80=98AB...=E2=80=99 (subexpressions i= n sequence). `rx' silently adds shy grouping to the result, and the corresponding string regexp in this case is more precisely \(?:AB...\). I think it is enough to mention this implicit grouping feature once, but it is important to spell it out. =20=20 TIA, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 12:14:20 2022 Received: (at 58727) by debbugs.gnu.org; 23 Oct 2022 16:14:20 +0000 Received: from localhost ([127.0.0.1]:46411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omdcC-0005mp-CR for submit@debbugs.gnu.org; Sun, 23 Oct 2022 12:14:20 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:38819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omdcA-0005mc-Vu for 58727@debbugs.gnu.org; Sun, 23 Oct 2022 12:14:19 -0400 Received: by mail-lj1-f171.google.com with SMTP id bn35so1253634ljb.5 for <58727@debbugs.gnu.org>; Sun, 23 Oct 2022 09:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=VsYYfUfC6MSVW/AiHq8jSJ4q7pPYwy7ouQSwG+aBn8E=; b=KD8mhnOAVrA9hyM2x5fe0HuxX/e0IZ/bc1AayD6WuvkxPTQeUVVarVk78ouaw7ZwLH 1FC+k7ac6Ne6JWAeXl/m3z9q40OUUKC6iH6GufJvQ2SHk/kzLQnf4/QY4nP+f+8ramOy eFiTTTNeO6PJhmNYSvghJ/mb7tU6h4nz0cu3yeXJNSBr9wS1RHL1gtdU7JkqpD4gqx5J UCxvd4TEHr25dDMx42A+ZLFscWLZBZZVnmdN0Wm+oyJNRgikzLzvfV6rrHq5BaoRVVzh MsPR6OloTUFtxoMcZikyNeR+tVd4hpg4hKmddHry29YjHuFOPmsTI+UOp7dS6SrM3qxq b9rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VsYYfUfC6MSVW/AiHq8jSJ4q7pPYwy7ouQSwG+aBn8E=; b=6pyWfIE2oDYUtQule9ajcz6WRSGRk8TmmaFLzh6ktm35G82XZTg74NHzcT7U/ikA4Z weWpgHHYbOsSGJC6b56pFuCQ/A+eZJIBCwDFLPpe6X0owK1rMQQgUxziJdRZqATEYITd 1KAEwrSnZ6DEd0YzmQJR1wt0RjcfLcoi3dUpsJuHEqobmHPtoIlQBqx+1BQskRfZPOPc LmhdCAhUKH2LO0+DDkkh1ygD7XESxlDzzoihtgLYE8fiCssvwSXeeyQVRRhISOMnyC0u APWgZVNY0tn7S8EZIh+9KhwEPaUypWs1NAu7s4kmoeUTlir8pm/c9oUjYxNZWxCZ61Jk xdpg== X-Gm-Message-State: ACrzQf3bealr4G1OfbpYBJCnvtizt0HT0hDU+IafXvubO20Ni8lemTFR gNH2BKXO6ZDwQ6mT0c09I7U= X-Google-Smtp-Source: AMsMyM6KPXV1nigFQkL9k8uI4JuApquMod7UClXsE99FHFm2UtR+1YvjGJvZE4/6/vUgcNPmi4cEhQ== X-Received: by 2002:a2e:9c0c:0:b0:26f:c02b:69cf with SMTP id s12-20020a2e9c0c000000b0026fc02b69cfmr9820763lji.309.1666541652850; Sun, 23 Oct 2022 09:14:12 -0700 (PDT) Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id t20-20020a056512069400b004994117b0fdsm4082453lfe.281.2022.10.23.09.14.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Oct 2022 09:14:12 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: 29.0.50; rx doc: Semantics of RX... Message-Id: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> Date: Sun, 23 Oct 2022 18:14:10 +0200 To: Michael Heerdegen X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58727 Cc: 58727@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: -1.0 (-) > The resulting regexps are concatenating like with an implicit `seq'. > This is not trivial, though: in stringish regexps the repetition > operators are only unary, and different interpretations would make = sense > for `rx' (implicit `seq', implicit `or'). 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.) Otherwise I think we should grant our readers some common sense. It's = not a formal specification but meant for humans to understand, and I'm = quite sure they do. > Oh, and maybe let's also make more clear that `rx' always cares about > implicit grouping when necessary. No, there is no such thing in rx. 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 22:34:22 2022 Received: (at 58727) by debbugs.gnu.org; 24 Oct 2022 02:34:22 +0000 Received: from localhost ([127.0.0.1]:46729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omnIE-0006BD-4s for submit@debbugs.gnu.org; Sun, 23 Oct 2022 22:34:22 -0400 Received: from mout.web.de ([217.72.192.78]:47253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omnI9-0006Av-Qi for 58727@debbugs.gnu.org; Sun, 23 Oct 2022 22:34:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1666578850; bh=fjxvmatIze/EkgagLASSmXvT3DN9Rebh8XGhHH+RlV0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=diTFoa0ub70Z4xTTT2llGrTliKao3352xTdNmN6PcGt6+l6TMi2lhwbLuKMsHbpdN rFW0tQXIseWn9A3C4p4+BJD5StN1NGMqP4FepoY3q4QQTyjtHfQuKVZM1j+/rBk8Wi V/YxUOkrTwhLNQR7WjWZrZa3c+XMkeo+m/mFelUtyMHAXmpuSSy5ZtAVbRtWiZN37x YGOZl0kFoyJwqI6a6vp7mknNX2hF3ihk3FWGs8fpfFk8NRXiplmUG4PxB6P5BehxRc 3qeqFQfr4IPFabMJCoQtZp/VDo9U5h8Hl55m/DTQfDzhBA/7ImvnoVfmiCVIYFm3i9 vQguapKAZ5shw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([188.105.185.54]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MxpmW-1p1Pw43AeU-00zXsT; Mon, 24 Oct 2022 04:34:10 +0200 From: Michael Heerdegen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 29.0.50; rx doc: Semantics of RX... In-Reply-To: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sun, 23 Oct 2022 18:14:10 +0200") References: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> Date: Mon, 24 Oct 2022 04:34:09 +0200 Message-ID: <87pmeic5lq.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:OimV/yxgarzypBAoyUOiQ2uvcVYBkDu2PMLMexaTzt4u5YYEbaF Iom6Y1L4jkah30ZUdiXeO6svbv9xIGR0murcORC9zeRSSZeHyy1NfUC1KxlTGAE1q5MPq9N KOKhZ0DEF0D7WRorYD1ean2Twp8XWIIEChX/dUezHdxi7cie2b+k5BMLGb3SXKjVXthYEVV iYiqAQPfmyXmt/fV+XvuA== X-Spam-Flag: NO UI-OutboundReport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To: 58727 Cc: 58727@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: -1.7 (-) Mattias Engdeg=C3=A5rd writes: > > The resulting regexps are concatenating like with an implicit `seq'. > > This is not trivial, though: in stringish regexps the repetition > > operators are only unary, and different interpretations would make sense > > for `rx' (implicit `seq', implicit `or'). > > 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.) Yes, that would be good. > > Oh, and maybe let's also make more clear that `rx' always cares > > about implicit grouping when necessary. > > No, there is no such thing in rx. I think you misunderstood what I meant, I meant the implicit shy grouping added in the return value, as in (rx (or "ab" "cd")) =3D=3D> "\\(?:ab\\|cd\\)" ^^^^^ ^^^ > 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. 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? A sentence like "rx forms are defined by their semantics" would help to make that clear I think. Dunno, I'm just guessing that here is a potential for misunderstanding. Telling about the implicit concatenation of RX... is the more important point for me. Thanks so far, Michael.=20 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 24 08:49:39 2022 Received: (at 58727) by debbugs.gnu.org; 24 Oct 2022 12:49:39 +0000 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 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 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) 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) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: 29.0.50; rx doc: Semantics of RX... From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87pmeic5lq.fsf@web.de> Date: Mon, 24 Oct 2022 14:49:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> <87pmeic5lq.fsf@web.de> To: Michael Heerdegen X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58727 Cc: 58727@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: -1.0 (-) 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! From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 24 22:49:32 2022 Received: (at 58727-done) by debbugs.gnu.org; 25 Oct 2022 02:49:32 +0000 Received: from localhost ([127.0.0.1]:49903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onA0R-00074r-Uk for submit@debbugs.gnu.org; Mon, 24 Oct 2022 22:49:32 -0400 Received: from mout.web.de ([212.227.15.3]:35997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onA0Q-00074d-6j for 58727-done@debbugs.gnu.org; Mon, 24 Oct 2022 22:49:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1666666161; bh=FdLscJUhCFenoNRGIVK3B0P7BDO9ykXo07WbNUzuAB4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=TBZVHpOpF269yRp8KFNYoup/kewfZBpQHde6Nh+9MpQLHQ+xa+Ad1j2P8tKDF5fGe 6fcGK8E/DDDu3NIqwIWw+4FzzJ9gJ6LupFjcdbFY2evFTnCAzX1olnYwtYcY8XAZvJ WUmVEVWgsSns2/9ngAKMF8g5y8KaDtwltgCn7GQ/vTeDU0isKSO0TjC+bYtQkYxsn8 mjQRvvFqA/gNb8Fn4mXHFyHOvOUonf3SumnmATzhTL04ev75SpO3MfZROb5oJYxpJ7 5eIZokgeb08np8eaAnq7B9m5kXLq0DmAz99anYJkWP4wW3NeOYGWw8NCuHtdUhked4 TOt6vUOR3fcgg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([188.104.14.82]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N6bD0-1p9oVz1y4U-018LiM; Tue, 25 Oct 2022 04:49:21 +0200 From: Michael Heerdegen To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 29.0.50; rx doc: Semantics of RX... In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 24 Oct 2022 14:49:25 +0200") References: <3BB74199-7826-41F5-96BA-39CB3EC0E2B7@gmail.com> <87pmeic5lq.fsf@web.de> Date: Tue, 25 Oct 2022 04:49:20 +0200 Message-ID: <87mt9klirz.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4Q7n2+tUpPzKrIV1H5zozImpjCfEpR8qg7iSKWR0w6PzeMFQYSV BKP8R/EzoFvnZtvr/+C4JrdvrtxvyFgLAC1LR2+domV4UjBPQYUxADmRvxyDyHmZ0YR+2fP L2Ob+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PvCtZ7XyftPcq3jBuk0x/2HUae50+rBX/5+C2G0db2zlGi ssTGYg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58727-done Cc: 58727-done@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: -1.7 (-) Mattias Engdeg=C3=A5rd writes: > > 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. Thanks - I hope it was not too much. > Thank you for your comments and suggestions! And thank you for the implementation of these! Regards, Michael. From unknown Sun Jun 22 11:34:39 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, 22 Nov 2022 12:24:04 +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