[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add INVERT to re-search-{forward, backward}
From: |
Juri Linkov |
Subject: |
Re: add INVERT to re-search-{forward, backward} |
Date: |
Mon, 25 Aug 2008 22:45:43 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
>> Instead of this, I think the change should be done at the occur level,
>> since occur's algorithm is line-based and can skip lines that contain
>> a given regexp. This could be similar to the algorithm used by the
>> command `flush-lines' in the same file. `occur' currently works like the
>> command `keep-lines' that keeps lines containing the specified regexp.
>> But with a new INVERT argument, `occur' could work like `flush-lines' that
>> keep everything except lines containing the specified regexp.
>
> This is also similar to grep etc.
Yes, as a line-oriented tool, grep's -v --invert-match option is what
could be modelled in occur.
Then a negative prefix argument of `occur' could mean inverting the
regexp and displaying non-matching lines.
--
Juri Linkov
http://www.jurta.org/emacs/