From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#6384: Teach rx explicitly numbered submatches Date: Thu, 10 Jun 2010 18:51:04 +0300 Organization: JURTA Message-ID: <871vce98br.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276187307 2691 80.91.229.12 (10 Jun 2010 16:28:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Jun 2010 16:28:27 +0000 (UTC) Cc: 6384@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 10 18:28:26 2010 connect(): No such file or directory 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 1OMkcC-00085S-1n for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jun 2010 18:28:24 +0200 Original-Received: from localhost ([127.0.0.1]:46992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMkcB-0004V6-7k for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jun 2010 12:28:23 -0400 Original-Received: from [140.186.70.92] (port=53638 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMkc4-0004UX-K4 for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 12:28:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMkc3-0005hF-9a for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 12:28:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36767) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMkc3-0005hA-2r for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 12:28:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OMkNK-0004Wh-Gt; Thu, 10 Jun 2010 12:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Jun 2010 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 6384-submit@debbugs.gnu.org id=B6384.127618636517393 (code B ref 6384); Thu, 10 Jun 2010 16:13:02 +0000 Original-Received: (at 6384) by debbugs.gnu.org; 10 Jun 2010 16:12:45 +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 1OMkN2-0004WU-Bx for submit@debbugs.gnu.org; Thu, 10 Jun 2010 12:12:44 -0400 Original-Received: from smtp-out2.starman.ee ([85.253.0.4] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMkMz-0004WP-PV for 6384@debbugs.gnu.org; Thu, 10 Jun 2010 12:12:42 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.99.15.cable.starman.ee [82.131.99.15]) by mx2.starman.ee (Postfix) with ESMTP id 5EBF73F40B0; Thu, 10 Jun 2010 19:12:34 +0300 (EEST) In-Reply-To: (Lennart Borgman's message of "Wed, 9 Jun 2010 20:19:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 10 Jun 2010 12:13: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:37662 Archived-At: > (submatch . (rx-submatch 1 nil)) ; SRE > + (submatch-n . (rx-submatch-n 2 nil)) I think better would be to allow the existing subform `submatch' to support numbered groups, i.e. in addition to the current form `(submatch SEXP1 SEXP2 ...)' also support `(submatch N SEXP1 SEXP2 ...)' because the number is a parameter of normal groups. There are already subforms that support different number of integer arguments like `(repeat N SEXP)' and `(repeat N M SEXP)'. So the same could be done for `submatch' too. -- Juri Linkov http://www.jurta.org/emacs/