From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.devel Subject: Re: Structural regular expressions Date: Thu, 9 Sep 2010 16:53:10 +0000 (UTC) Message-ID: References: <87sk1lt4uf.fsf@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: 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 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 ) 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 ) 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 ) 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 ; 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 ; 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." 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:129825 Archived-At: Lennart Borgman 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 ... 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.