[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2397: 23.0.90; grep no longer highlights the match

From: Juri Linkov
Subject: bug#2397: 23.0.90; grep no longer highlights the match
Date: Sun, 22 Feb 2009 21:01:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (x86_64-pc-linux-gnu)

> Even more specifically, it is the change from
> (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always"))
> to
> (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=auto"))
> that introduces the bug. Putting back `always' in place of `auto' restores the
> highlighting.
> Why `auto' doesn't work, I don't know.

This change was the result of the following discussion:


As you can see grep source code emits highlighting sequences
only when TERM is not "dumb".  So we set it to "emacs-grep".

          if(isatty(STDOUT_FILENO) && getenv("TERM") &&
             strcmp(getenv("TERM"), "dumb"))
                  color_option = 1;
            color_option = 0;

Could you please post the value of `process-connection-type'.
Also please eval `M-x grep RET set RET' and show the value of
the environment variable `TERM'.

If it is "emacs-grep" then I'm afraid it is the line
"isatty(STDOUT_FILENO)" in grep source code that fails
in your environment.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]