From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Structural regular expressions Date: Fri, 10 Sep 2010 00:52:01 +0200 Message-ID: References: <87sk1lt4uf.fsf@gmail.com> <46875.130.55.118.19.1284065220.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1284072752 11347 80.91.229.12 (9 Sep 2010 22:52:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Sep 2010 22:52:32 +0000 (UTC) Cc: Lawrence Mitchell , Stefan Monnier , emacs-devel@gnu.org To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 10 00:52:30 2010 Return-path: 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 ) id 1Otpyn-0004L1-IY for ged-emacs-devel@m.gmane.org; Fri, 10 Sep 2010 00:52:29 +0200 Original-Received: from localhost ([127.0.0.1]:35094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Otpym-00029W-UY for ged-emacs-devel@m.gmane.org; Thu, 09 Sep 2010 18:52:28 -0400 Original-Received: from [140.186.70.92] (port=37902 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Otpyh-00029R-Hd for emacs-devel@gnu.org; Thu, 09 Sep 2010 18:52:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Otpyg-0007dN-5V for emacs-devel@gnu.org; Thu, 09 Sep 2010 18:52:23 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:62739) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Otpyg-0007dH-1r for emacs-devel@gnu.org; Thu, 09 Sep 2010 18:52:22 -0400 Original-Received: by qwf7 with SMTP id 7so475665qwf.0 for ; Thu, 09 Sep 2010 15:52:21 -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 :content-transfer-encoding; bh=70WCZtsUdKW7Cp/ArIeQohf3UJOD14yd2q9ieOtP7Jg=; b=O1L8KMpm8o5e9y4LzlF0DX4trHGrVfWREmqK7yaKF9OsWmmrMIDN2aGfvLUPDyZaoF gQvqOP5dGdmkIwiU17CQYRTn4txhsS5GDaKOvruy+i/12tcWC0lhBcs1uvHowEY34IN1 cwxivRPewwbeomnSCHZa6j5ob4uZlUMPLVlus= 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:content-transfer-encoding; b=RMHECrCZqDY0idJ+mK6xq0RskwwHyy6Gp4Y8BVhYFDl0DiXyHzo27GqC7nvWiL2q5o zBre9pf04AR7PoLSaL/g1jNkvvYDbmIuHNg2TmLR//AdFR4nCSJsgBY0HB73fAlMY94H YZJLtri47fUekF/r6bBbP1yVAHzGFmaRdpykA= Original-Received: by 10.224.54.69 with SMTP id p5mr978455qag.264.1284072741300; Thu, 09 Sep 2010 15:52:21 -0700 (PDT) Original-Received: by 10.229.216.74 with HTTP; Thu, 9 Sep 2010 15:52:01 -0700 (PDT) In-Reply-To: <46875.130.55.118.19.1284065220.squirrel@webmail.lanl.gov> 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:129843 Archived-At: On Thu, Sep 9, 2010 at 10:47 PM, Davis Herring wrote: >> Indeed, we could probably go a long way by simply extending our notion >> of region so as to allow it to be non-contiguous. >> >> Patches welcome, > > This is no patch, but I had an idea for the interface for this: > > Definition: simple region > The interval (possibly empty) between point and mark, exactly as it is no= w. > > Variable: region-list > A set of non-empty, disjoint intervals, always local to each buffer. =C2= =A0Each > is a cons of two markers. =C2=A0Typically each is highlighted in a subtle > fashion, even outside Transient Mark Mode. > > Function: multi-region > Returns the union of the region list and the simple region (using > `point-marker' and/or `mark-marker' as needed). =C2=A0(If the simple regi= on is > empty and the region list is not, the simple region is ignored and the > return value equals `region-list'.) =C2=A0This is the user-visible > possibly-disconnected upgrade to the region concept. > > User option: multi-region-separator (default: "\n") > String to insert between separate intervals of the multi-region when > concatenated. > > (defun multi-region-string (&optional sep) > =C2=A0"Return the contents of the multi-region. > Separate intervals with SEP (or `multi-region-separator' if omitted)." ... > > WDOT? I think that kind of interface could be built upon a low level interface, but the important thing to discus at this point is rather the low level interface. Otherwise I think we might soon has multiple ways of doing this.