From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6985: rx patterns don't compose Date: Sun, 05 Sep 2010 09:22:04 +0200 Message-ID: References: <4C82D84D.7040205@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1283684865 27180 80.91.229.12 (5 Sep 2010 11:07:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Sep 2010 11:07:45 +0000 (UTC) Cc: 6985@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 05 13:07:40 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OsD4P-0002Jz-Dz for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Sep 2010 13:07:39 +0200 Original-Received: from localhost ([127.0.0.1]:46948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Os9wd-0003Hr-6Z for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Sep 2010 03:47:19 -0400 Original-Received: from [140.186.70.92] (port=58164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Os9rz-0002Ed-Iy for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2010 03:47:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Os9pX-0003Pv-7T for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2010 03:40:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42386) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Os9pX-0003Pq-5y for bug-gnu-emacs@gnu.org; Sun, 05 Sep 2010 03:39:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Os9XC-00006l-7R; Sun, 05 Sep 2010 03:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Sep 2010 07:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6985-submit@debbugs.gnu.org id=B6985.1283671221406 (code B ref 6985); Sun, 05 Sep 2010 07:21:02 +0000 Original-Received: (at 6985) by debbugs.gnu.org; 5 Sep 2010 07:20:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Os9WX-00006V-5R for submit@debbugs.gnu.org; Sun, 05 Sep 2010 03:20:21 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Os9WV-00006P-EY for 6985@debbugs.gnu.org; Sun, 05 Sep 2010 03:20:20 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm5.telefonica.net with bizsmtp id 2vDA1f00i2h2L9m3RvN8dn; Sun, 05 Sep 2010 09:22:08 +0200 Original-Received: from ceviche.home ([83.61.51.178]) by IMPmailhost3.adm.correo with BIZ IMP id 2vN51f0023qhCuj1jvN57Z; Sun, 05 Sep 2010 09:22:08 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id A671B66115; Sun, 5 Sep 2010 09:22:04 +0200 (CEST) In-Reply-To: <4C82D84D.7040205@gmail.com> (Daniel Colascione's message of "Sat, 04 Sep 2010 16:37:49 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 05 Sep 2010 03:21:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39986 Archived-At: > It's not possible to do this currently: > (defconst foo-re (rx "abc")) > (defconst bar-re (rx (* (what-goes-here? foo-re))) (defconst foo-re (rx "abc")) (defconst bar-re `(rx (* (regexp ,foo-re))) > in any sensible way. This won't work > (defconst bar-re (rx (* (regexp foo-re)))) > because regexp always expects a string. > This won't work, because eval always quotes its argument: > (defconst bar-re (rx (* (eval foo-re)))) > I propose allowing regexp to accept a symbol as well as a string, and > using that symbol's value literally. Alternatively, rx could provide an > eval-unquoted facility. Or both. eval-unquoted sounds OK Stefan