From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Lennart Borgman <lennart.borgman@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: Structural regular expressions
Date: Tue, 7 Sep 2010 22:08:48 +0200
Message-ID: <AANLkTimYvE0aqrG-OQxuY6BTca7ngzrfQUa62mOxyV=+@mail.gmail.com>
References: <loom.20100907T212314-566@post.gmane.org>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: dough.gmane.org 1283890580 6098 80.91.229.12 (7 Sep 2010 20:16:20 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Tue, 7 Sep 2010 20:16:20 +0000 (UTC)
Cc: emacs-devel@gnu.org
To: Tom <levelhalom@gmail.com>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 07 22:16:15 2010
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([199.232.76.165])
	by lo.gmane.org with esmtp (Exim 4.69)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1Ot4aT-0008UA-Mk
	for ged-emacs-devel@m.gmane.org; Tue, 07 Sep 2010 22:16:14 +0200
Original-Received: from localhost ([127.0.0.1]:48433 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Ot4aS-0002D9-Sa
	for ged-emacs-devel@m.gmane.org; Tue, 07 Sep 2010 16:16:12 -0400
Original-Received: from [140.186.70.92] (port=53297 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ot4Th-0005Xq-Pg
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 16:09:14 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <lennart.borgman@gmail.com>) id 1Ot4Tg-0006gW-LN
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 16:09:13 -0400
Original-Received: from mail-qy0-f176.google.com ([209.85.216.176]:38703)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@gmail.com>) id 1Ot4Tg-0006gR-H3
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 16:09:12 -0400
Original-Received: by qyk2 with SMTP id 2so6228476qyk.0
	for <emacs-devel@gnu.org>; Tue, 07 Sep 2010 13:09:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:in-reply-to
	:references:from:date:message-id:subject:to:cc:content-type;
	bh=TLnAiOmsYyvnU61AvH3Gmxj8XMasmnSgttGxRGyIOHQ=;
	b=UASDl0G/B18442BGyDmplPaUtsrC2XBUQqHyC5ptN4ldEWPvj1AZ/+VZfI4BtcfxhU
	uFiHb456lbGhIhTV2YnECGB4aidVddYjtezVLshjsJI8ytZDVl+zGTRImvzIOP3cMfN5
	Y2xWDzceGOHVpTFS6MHP0aF/DSPQ/xi1Q6L0s=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	b=hMlAP7DhtQ1H2+7RYn2Zf9HWgokvW8i93fB/QzjbEThNrmxG1Trhh7Mf/V8xNM8FNH
	Et1iaZB1mBqIMudY+1KH/P32QC77zMF6PxdGQ/HKrzk/bK/k8W4ZGVV7gGrkDKW57h6a
	MwjXoeRCQ/ZW4OHDtNHvafhSQiBBbI24JMx7c=
Original-Received: by 10.224.28.209 with SMTP id n17mr299747qac.236.1283890151400; Tue,
	07 Sep 2010 13:09:11 -0700 (PDT)
Original-Received: by 10.229.216.74 with HTTP; Tue, 7 Sep 2010 13:08:48 -0700 (PDT)
In-Reply-To: <loom.20100907T212314-566@post.gmane.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.devel:129756
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/129756>

On Tue, Sep 7, 2010 at 9:25 PM, Tom <levelhalom@gmail.com> wrote:
> This structural regex thing is interesting. You can perform operations
> (e.g. replace text) on all strings in the file, or everywhere except
> in strings and comments, etc. Here's the description of the feature
> on the E editor blog if someone wants to implement something like
> this for emacs:
>
> http://e-texteditor.com/blog/2010/beyond-vi


Looks indeed like a useful idea. I suggest adding a new function
argument PREDICATE to query-replace-regexp etc. (Think of the argument
PREDICATE in completing-read.)