From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: "Eric Schulte" <schulte.eric@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: Structural regular expressions
Date: Tue, 07 Sep 2010 19:13:28 -0600
Message-ID: <87sk1lt4uf.fsf@gmail.com>
References: <loom.20100907T212314-566@post.gmane.org>
	<AANLkTimYvE0aqrG-OQxuY6BTca7ngzrfQUa62mOxyV=+@mail.gmail.com>
	<loom.20100907T222143-475@post.gmane.org>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: dough.gmane.org 1283908428 4504 80.91.229.12 (8 Sep 2010 01:13:48 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 8 Sep 2010 01:13:48 +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 Wed Sep 08 03:13:46 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 1Ot9EM-0005mp-Id
	for ged-emacs-devel@m.gmane.org; Wed, 08 Sep 2010 03:13:42 +0200
Original-Received: from localhost ([127.0.0.1]:46540 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Ot9EL-0007KE-VT
	for ged-emacs-devel@m.gmane.org; Tue, 07 Sep 2010 21:13:41 -0400
Original-Received: from [140.186.70.92] (port=59331 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ot9EE-0007Jz-QD
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 21:13:35 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <schulte.eric@gmail.com>) id 1Ot9ED-0001BN-Q2
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 21:13:34 -0400
Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:57753)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <schulte.eric@gmail.com>) id 1Ot9ED-0001BC-J5
	for emacs-devel@gnu.org; Tue, 07 Sep 2010 21:13:33 -0400
Original-Received: by ywl5 with SMTP id 5so2928017ywl.0
	for <emacs-devel@gnu.org>; Tue, 07 Sep 2010 18:13:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject:references
	:date:in-reply-to:message-id:user-agent:mime-version:content-type;
	bh=iHvuQKvKEFZSZ+QGU0XbupxHnRWp3EHqbE0Oq9777PA=;
	b=uH5tB+0JHFm+3Zf6JwliPAumITU4wpkm7f8rhaoTAg2xtD+gdxNEwQBb+6K+56fAsO
	znn18P+DvOylsqBaDMO7O9O+aSUPhiHRZYBrviD7RrI98NlkGdHmVZyr2IqAmmS9Yf1p
	gLmPfPTn0RpP5X9lvjV9ToBGAuXhUu5pQ0v34=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	b=LuiOyFumryKCX3OLiIijlvKI1X6/gC+ozuSJEiS4HLVrucdUMz8aomG1DT28MvT7wt
	rsLna9+8aO2YkZs1Z2ksFgk+XuUDFOnXME9+du5+pmkTkSz63hghss7xopD3/aRFIYia
	5gTpZBftwbCBSl5vSYGAIF5bagbhza3X1mt1I=
Original-Received: by 10.100.121.6 with SMTP id t6mr221420anc.141.1283908413193;
	Tue, 07 Sep 2010 18:13:33 -0700 (PDT)
Original-Received: from schulte-laptop (c-174-56-1-147.hsd1.nm.comcast.net
	[174.56.1.147])
	by mx.google.com with ESMTPS id k11sm12363260ani.30.2010.09.07.18.13.31
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 07 Sep 2010 18:13:32 -0700 (PDT)
In-Reply-To: <loom.20100907T222143-475@post.gmane.org> (Tom's message of "Tue, 
	7 Sep 2010 20:27:43 +0000 (UTC)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
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:129761
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/129761>

Tom <levelhalom@gmail.com> writes:

> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>> 
>> 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.)
>> 
>
> It can be a good start, but the feature in the E editor is more general
> than search and replace. You can perform any operation on the selected 
> text. It's sort of like working on the narrowed part of a buffer, only 
> the narrowed part in this case consists of several separate ranges of 
> the same buffer (like all comments, etc.).

Would generalizing the narrowing behavior to arbitrarily many ranges in
a buffer instead of a single range have extensive ramifications?  Would
this be an easy or difficult thing to implement?

If it's not too difficult then providing behavior like that mentioned in
the article above should be trivial.

Cheers -- Eric

hmm, it seems that `narrow-to-region' works by changing the bounds (min
and max indices) of the current buffer, not something that naturally
generalizes to multiple regions.