From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom <levelhalom@gmail.com> Newsgroups: gmane.emacs.devel Subject: Re: Structural regular expressions Date: Thu, 9 Sep 2010 16:53:10 +0000 (UTC) Message-ID: <loom.20100909T184729-130@post.gmane.org> References: <loom.20100907T212314-566@post.gmane.org> <AANLkTimYvE0aqrG-OQxuY6BTca7ngzrfQUa62mOxyV=+@mail.gmail.com> <loom.20100907T222143-475@post.gmane.org> <87sk1lt4uf.fsf@gmail.com> <loom.20100909T173620-764@post.gmane.org> <AANLkTikXVHoRKxTjcVkb6XM_A67vyREoq=_8A-AtiK6Y@mail.gmail.com> <loom.20100909T181924-90@post.gmane.org> <AANLkTinz+YUjPs_Ax8mikR5bMGjYxessj2YgWvJX-AUy@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1284051210 3455 80.91.229.12 (9 Sep 2010 16:53:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Sep 2010 16:53:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 09 18:53:29 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 1OtkNM-0005Rg-S6 for ged-emacs-devel@m.gmane.org; Thu, 09 Sep 2010 18:53:29 +0200 Original-Received: from localhost ([127.0.0.1]:36483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtkNM-0006nH-Dp for ged-emacs-devel@m.gmane.org; Thu, 09 Sep 2010 12:53:28 -0400 Original-Received: from [140.186.70.92] (port=50069 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtkNG-0006my-Fc for emacs-devel@gnu.org; Thu, 09 Sep 2010 12:53:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <ged-emacs-devel@m.gmane.org>) id 1OtkNF-0005eL-64 for emacs-devel@gnu.org; Thu, 09 Sep 2010 12:53:22 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:55230) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <ged-emacs-devel@m.gmane.org>) id 1OtkNF-0005de-0i for emacs-devel@gnu.org; Thu, 09 Sep 2010 12:53:21 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from <ged-emacs-devel@m.gmane.org>) id 1OtkNC-0005L2-J0 for emacs-devel@gnu.org; Thu, 09 Sep 2010 18:53:18 +0200 Original-Received: from 94-21-223-187.pool.digikabel.hu ([94.21.223.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <emacs-devel@gnu.org>; Thu, 09 Sep 2010 18:53:18 +0200 Original-Received: from levelhalom by 94-21-223-187.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <emacs-devel@gnu.org>; Thu, 09 Sep 2010 18:53:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 94.21.223.187 (Opera/9.80 (Windows NT 6.1; U; en) Presto/2.6.30 Version/10.61) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:129825 Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/129825> Lennart Borgman <lennart.borgman <at> gmail.com> writes: > > And what happens then if I want to regexp replace "foo\s-*bar"? It would > > still be susceptible to the above mentioned boundary problem, so it's > > not a robust workaround. > > It does not look to me like it would be susceptible to that problem. > Maybe I am misunderstanding you. Can you explain more in detail why > you think it would be a problem with the solution I suggested? (Please > note that I said the parts outside of the multiple narrowing should be > treated as "whitespace", not "invisible" or "non-existent".) Maybe I am misunderstanding you. As I understood your suggestion: <.....foo> ... whitespace ... <bar ... > Since \s- as a regexp matches whitespace the regexp "foo\s-*bar" would match the end of the first range and the beginning of the second range separated by whitespace.