 | | From: | Lowell Kirsh | | Subject: | showing only certain lines in a buffer | | Date: | Wed, 19 Jan 2005 20:34:54 -0800 |
|
|
 | Is there a way to hide all lines in a buffer that don't begin with a certain string? ie. only show lines beginning with #define
Lowell
|
|
 | | From: | William Xuuu | | Subject: | Re: showing only certain lines in a buffer | | Date: | Thu, 20 Jan 2005 19:22:18 +0800 |
|
|
 | Lowell Kirsh writes:
> Is there a way to hide all lines in a buffer that don't begin with a > certain string? ie. only show lines beginning with #define
Yes, get hide-lines.el, you may be also interested in hide-region.el.
-- William
|
|
 | | From: | Alan Mackenzie | | Subject: | Re: showing only certain lines in a buffer | | Date: | Thu, 20 Jan 2005 07:41:29 +0000 |
|
|
 | Lowell Kirsh wrote on Wed, 19 Jan 2005 20:34:54 -0800: > Is there a way to hide all lines in a buffer that don't begin with a > certain string? ie. only show lines beginning with #define
Yes, of course!
M-x occur
And when you are prompted to enter a regular expression, type "^#define" (without the doube quote marks) and hit . The "^" means "at the beginning of a line".
Have fun!
> Lowell
-- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").
|
|
 | | From: | Lowell Kirsh | | Subject: | Re: showing only certain lines in a buffer | | Date: | Thu, 20 Jan 2005 15:38:56 -0800 |
|
|
 | just what I was looking for. thanks
Alan Mackenzie wrote: > Lowell Kirsh wrote on Wed, 19 Jan 2005 20:34:54 -0800: > >>Is there a way to hide all lines in a buffer that don't begin with a >>certain string? ie. only show lines beginning with #define > > > Yes, of course! > > M-x occur > > And when you are prompted to enter a regular expression, type "^#define" > (without the doube quote marks) and hit . The "^" means "at the > beginning of a line". > > Have fun! > > >>Lowell > >
|
|