[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master da736c9f02 1/2: Make `M-x grep' work better with "git grep"
From: |
Lars Ingebrigtsen |
Subject: |
master da736c9f02 1/2: Make `M-x grep' work better with "git grep" |
Date: |
Thu, 2 Jun 2022 13:14:17 -0400 (EDT) |
branch: master
commit da736c9f028f4d8fb117f116569fb72f706c9b45
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make `M-x grep' work better with "git grep"
* lisp/progmodes/compile.el (compilation-start): Bind PAGER to ""
to avoid errors in output from "git grep" and similar commands
(bug#4359).
---
lisp/progmodes/compile.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 8b70e8400b..d28fce9dbd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1956,6 +1956,9 @@ Returns the compilation buffer created."
(and (derived-mode-p 'comint-mode)
(comint-term-environment))
(list (format "INSIDE_EMACS=%s,compile" emacs-version))
+ ;; Some external programs (like "git grep") use a pager;
+ ;; defeat that.
+ (list "PAGER=")
(copy-sequence process-environment))))
(setq-local compilation-arguments
(list command mode name-function highlight-regexp))