[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Structural regular expressions
From: |
Lennart Borgman |
Subject: |
Re: Structural regular expressions |
Date: |
Fri, 10 Sep 2010 00:52:01 +0200 |
On Thu, Sep 9, 2010 at 10:47 PM, Davis Herring <address@hidden> 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 now.
>
> Variable: region-list
> A set of non-empty, disjoint intervals, always local to each buffer. Each
> is a cons of two markers. Typically 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). (If the simple region is
> empty and the region list is not, the simple region is ignored and the
> return value equals `region-list'.) This 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)
> "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.
- Re: Structural regular expressions, (continued)
- Re: Structural regular expressions, Stefan Monnier, 2010/09/08
- Re: Structural regular expressions, Lawrence Mitchell, 2010/09/08
- Re: Structural regular expressions, Stefan Monnier, 2010/09/08
- Re: Structural regular expressions, David Kastrup, 2010/09/09
- Re: Structural regular expressions, Stefan Monnier, 2010/09/09
- Re: Structural regular expressions, David Kastrup, 2010/09/10
- Re: Structural regular expressions, Stefan Monnier, 2010/09/10
- Re: Structural regular expressions, Davis Herring, 2010/09/09
- Re: Structural regular expressions,
Lennart Borgman <=
- Re: Structural regular expressions, Stefan Monnier, 2010/09/10
- Re: Structural regular expressions, Richard Stallman, 2010/09/10
- Re: Structural regular expressions, David House, 2010/09/10
- Message not available
- Re: Structural regular expressions, Tom, 2010/09/10
- RE: Structural regular expressions, Drew Adams, 2010/09/10
- Re: Structural regular expressions, Miles Bader, 2010/09/10
- Re: Structural regular expressions, Tom, 2010/09/11
- Re: Structural regular expressions, Wojciech Meyer, 2010/09/11
- Re: Structural regular expressions, tomas, 2010/09/11
- RE: Structural regular expressions, Drew Adams, 2010/09/11