From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: cond* Date: Tue, 02 Jan 2024 23:13:58 -0500 Message-ID: References: <87frzuae9n.fsf@posteo.net> <871qbatqc8.fsf@posteo.net> <87wmsz7lzn.fsf@posteo.net> <87edf1m7lq.fsf@localhost> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27811"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 03 05:14:26 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rKse9-0006yj-FD for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jan 2024 05:14:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKsdk-0005oE-RH; Tue, 02 Jan 2024 23:14:00 -0500 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 1rKsdi-0005nc-Vm for emacs-devel@gnu.org; Tue, 02 Jan 2024 23:13:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKsdi-0004Aw-Lw; Tue, 02 Jan 2024 23:13:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=byg9BIGm/6ZPAcpOojn3NPqC01UOecMOPu1UkdSNbUQ=; b=CqjNjOyrk/LU 12Z8UphjZNDJ/rlblwNNHUb6QxorrwtEp5NxYKarLMfWmmLpvA0JfF6jFSCgY6SnxgkvQJFqT9OfA h73/pGySC41jo0vFdg2PnFLry5yJ/Yjgsc3YUItlubrqgt6xHdJftG1IliRvHbdA+ytQ+Md/k5soY Mj1+623OuTc7ofOtO5LkyiiPW+Fd2ROxWsDcNFbFFmDJJuMYXjO0sgYAFhUc9XFtkG3emn6RutUS9 FFPX262xRIvfmN3ogB9fn+htFtLjEGdV+hldMXt/MpDvsHikifzIfGhpyW3Z3kHeCtVdkVhOC3ZH2 BAyKCNDetm9ZSboyYFD6uA==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rKsdi-0003Kd-3Q; Tue, 02 Jan 2024 23:13:58 -0500 In-Reply-To: <87edf1m7lq.fsf@localhost> (message from Ihor Radchenko on Mon, 01 Jan 2024 14:49:37 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314473 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > ‘(rx RX-EXPR...)’ > Matches strings against the regexp RX-EXPR..., using the ‘rx’ > regexp notation (*note Rx Notation::), as if by ‘string-match’. That seems natural enough, though I don't recall the details of `rx'. (I have never used it myself.) But I need to underdstand this too: > In addition to the usual ‘rx’ syntax, RX-EXPR... can contain the > following constructs: > ‘(let REF RX-EXPR...)’ > Bind the symbol REF to a submatch that matches RX-EXPR.... > REF is bound in BODY-FORMS to the string of the submatch or > ‘nil’, but can also be used in ‘backref’. I don't understand that description. I don't see what this construct would look like inside of an (rx ...) pattern, let alone what it would mean. Can you show me a complete pattern example using (rx...) and this, and explain it? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)