[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: Drew Adams
Subject: bug#2397: 23.0.90; grep no longer highlights the match
Date: Sun, 22 Feb 2009 12:04:02 -0800

> From: Juri Linkov Sent: Sunday, February 22, 2009 11:02 AM
> > 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:
> http://thread.gmane.org/gmane.emacs.bugs/16956
> http://thread.gmane.org/gmane.emacs.devel/83316
> 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;
>           else
>             color_option = 0;
> Could you please post the value of `process-connection-type'.

`process-connection-type' has value t.

> Also please eval `M-x grep RET set RET'

Sorry, I don't understand. That does nothing; it just exits with no matches
found - there are no file arguments specified. And in which directory? With
which `grep' switches? I don't follow.

> and show the value of the environment variable `TERM'.

M-: (getenv "TERM) gives "dumb", both in emacs -Q and in my own environment
(i.e., after loading the cywin libraries I mentioned).
> 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.

It's not. 

And as I mentioned, before your change highlighting works fine.

reply via email to

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