From 3cf4269136a316c10aa018d333d889b7e837fac6 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 14 Jul 2013 22:06:45 -0400 Subject: hide grep header --- init/km-grep.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 init/km-grep.el (limited to 'init') 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)) -- cgit v1.2.3