[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commands to remove commented lines from grep output
From: |
Drew Adams |
Subject: |
commands to remove commented lines from grep output |
Date: |
Sun, 1 Jul 2007 23:10:49 -0700 |
I sometimes want to see grep matches only for lines of code that are not
commented out. At least for the simple case of single line comment syntax,
such as `;' in Lisp and `//' in C++, this is easy to do with `flush-lines'.
To make this a little more convenient, I bind a more specific command that
does this to `;' in *grep* buffers. Another command, bound to `M-;', toggles
automatic removal of such commented lines.
How about adding such a feature to Emacs? The code I use is in library
grep+.el: http://www.emacswiki.org/cgi-bin/wiki/grep%2b.el. There are
additional features in that library, such as flexible defaulting of the grep
regexp, but I don't necessarily propose them for Emacs.
- commands to remove commented lines from grep output,
Drew Adams <=