emacs-devel
[Top][All Lists]
Advanced

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

Re: add INVERT to re-search-{forward, backward}


From: Lennart Borgman (gmail)
Subject: Re: add INVERT to re-search-{forward, backward}
Date: Mon, 25 Aug 2008 22:07:02 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Juri Linkov wrote:
>>> 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.

Maybe it also would be practical to be able to access that function from
within the occur window too?




reply via email to

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