From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Harald_J=C3=B6rg?= Newsgroups: gmane.emacs.help Subject: Re: rx of (any SET...) Date: Wed, 17 Aug 2022 20:42:36 +0000 Message-ID: <87y1vmioub.fsf@hajtower> References: <87ilmq3mfk.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 17 22:43:23 2022 Return-path: Envelope-to: geh-help-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 1oOPsp-0003sd-4Z for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 22:43:23 +0200 Original-Received: from localhost ([::1]:48378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOPsn-0006pn-VZ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 16:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOPsA-0006of-Er for help-gnu-emacs@gnu.org; Wed, 17 Aug 2022 16:42:45 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:45495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOPs8-0004IL-GQ for help-gnu-emacs@gnu.org; Wed, 17 Aug 2022 16:42:42 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 61514240027 for ; Wed, 17 Aug 2022 22:42:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1660768957; bh=btwoozTCOEn/nDwhLXiJIoXlzfO5bdjrbdviD4GpxnI=; h=From:To:Cc:Subject:Date:From; b=nrFE9DeI0hY1cMvNJCt1IKCIcJmrD8x9LEJmmq7BRKYoxNdYeGm7ebAXczOTX6BaQ Fmzn07Ktm8gdZL8pQsThSRhcoVnCXCwr4UX/8u8yIvwQAa9bQsXfruuWBTxFTmKZyg EFo0ScSS40/eJgT9A4k2S3lborWG95UFT+VFWkvzZbO1s81EXDXoAdJdPnjpB3vbY4 8ulalEfZqlpY2nHCoqpzBjfpUzYZsBHjNrUfzPP1EM4k/8k5xlTPhPchjYktFp6k7X Y0ssqg4UFJHwhdTvrvnQFb8oJ7M+ljAEwMaLEj7hWCNcYCqdQdF5lYK8WPpjGldkTn Lg7eF9yOqS5IA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4M7KhX548Fz9rxQ; Wed, 17 Aug 2022 22:42:36 +0200 (CEST) In-Reply-To: <87ilmq3mfk.fsf@gmx.de> (Michael Albinus's message of "Wed, 17 Aug 2022 17:43:43 +0200") Received-SPF: pass client-ip=185.67.36.65; envelope-from=haj@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138907 Archived-At: Michael Albinus writes: > Hi, > > I have the regexp > > (concat "[^" (bound-and-true-p mm-7bit-chars) "]") > > I want to write it in rx notation, but I fail. I know how to use xr for > reverse engineering, but I'd like to keep the variable mm-7bit-chars in > the rx notation, and not to replace it by the literal string. > > How would this look like? I found that variables can be included in rx forms with some form of eval, or by using rx-to-string, which is a function and not a macro. With the value of mm-7bit-chars at macro expansion time: (rx (eval `(not (any ,mm-7bit-chars)))) With the value of mm-7bit-chars at runtime: (eval `(rx (not (any ,mm-7bit-chars)))) (rx-to-string `(not (any ,mm-7bit-chars))) -- Cheers, haj