Show/Don't show lines based on pattern...

[email protected] Fri, 6 May 2005 13:32:54 -0400
Newsgroups gmane.emacs.xemacs.general
Message-ID <OF0D2F1653.C1E6E36B-ON85256FF9.005ED7FE-85256FF9.006065AF@iqfinancial.com>
It seems so useful, I have to believe it's out there, but called by some
name I haven't thought of...

I'd like to show only the lines that match (or don't match) a particular
regular expression.

Once I am looking at that subset of the lines, I'd like to either exclude
(or include) more lines,

Or expand one particular `hidden' block.

So, sample file:

1a
1b
2a
2b
2c
3a
3c

Selective display only lines with /a/:
1a
2a
3a

Additionally, suppress lines that contain /2/:
1a
3a

Now, show the whole block suppressed under /3a/:
1a
3a
3c

`list-matching-lines' doesn't quite cover the requirement.

It seems like all the components are there (though I don't know how to use
them, yet):
set-selective-display,
put-text-property,
overlays.
I just can't believe someone hasn't done this already...

Much thanks in advance.
Matthew Miner
(BTW, I am using GNU emacs, if that's relevant. -- is there a separate
group for that?)


This email and any attachments have been scanned for known viruses using
multiple scanners. We believe that this email and any attachments are virus
free, however the recipient must take full responsibility for virus
checking. This email message is intended for the named recipient only. It
may be privileged and/or confidential. If you are not the intended named
recipient of this email then you should not copy it or use it for any
purpose, nor disclose its contents to any other person. You should contact
the Misys Banking and Securities Division as shown below so that we can
take appropriate action at no cost to yourself.  Misys Banking and
Securities Division, 1 St George's Road, Wimbledon, London, SW19 4DR,
England. Email: [email protected]. Tel: +44 (0) 20 8879 1188
Fax: +44 (0) 20 8947 3373