[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Structural regular expressions

From: Tom
Subject: Re: Structural regular expressions
Date: Thu, 9 Sep 2010 15:51:06 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Schulte <schulte.eric <at> gmail.com> writes:
> >
> > 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?  

The mentioned E feature is sort of like narrowing, but is not the same if
I understand it correctly.

For example, if I want to replace the word "formatted" to "structured" in all
comments then considering the following case (<> indicates comment range 

<.... is the format>
<tedious work is done here>

the word "format" at the end of the first range and the word "tedious" at
the beginning of the next should not be handled as a contiguous text, because
in that case the text "formattedious" would match the word
to be replaced ("formatted") and it's clearly not correct behavior.

So if such "multiple narrowing" is implemented it must maintain the boundaries
between the different ranges and shouldn't simply handle it as contiguous text.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]