diff options
author | Kyle Meyer <meyerkya@gmail.com> | 2013-07-14 22:06:45 -0400 |
---|---|---|
committer | Kyle Meyer <meyerkya@gmail.com> | 2013-07-14 22:07:54 -0400 |
commit | 3cf4269136a316c10aa018d333d889b7e837fac6 (patch) | |
tree | 6850adadafe394966b6b6caf0439e25119a3de5f | |
parent | 5c7f406af3ed114c45f8f664ad8a02986581786b (diff) | |
download | emacs.d-3cf4269136a316c10aa018d333d889b7e837fac6.tar.gz |
hide grep header
-rw-r--r-- | init/km-grep.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/init/km-grep.el b/init/km-grep.el new file mode 100644 index 0000000..9eea449 --- /dev/null +++ b/init/km-grep.el @@ -0,0 +1,12 @@ +;; http://stackoverflow.com/questions/16122801/ +;; remove-header-information-from-rgrep-grep-output-in-emacs +(defun hide-grep-header () + (save-excursion + (with-current-buffer grep-last-buffer + (goto-line 5) + (narrow-to-region (point) (point-max))))) + +(defadvice grep (after hide-grep-header activate) (hide-grep-header)) +(defadvice rgrep (after hide-grep-header activate) (hide-grep-header)) +(defadvice lgrep (after hide-grep-header activate) (hide-grep-header)) +(defadvice grep-find (after hide-grep-header activate) (hide-grep-header)) |