summaryrefslogtreecommitdiff
path: root/init/km-grep.el
blob: 9eea4495df5be7c0470829424a2cbc8bff8143ce (plain)
1
2
3
4
5
6
7
8
9
10
11
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))