all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System)
To: Eli Zaretskii <eliz@gnu.org>
Subject: bug#2397: marked as done (23.0.90; grep no longer highlights the  match)
Date: Sat, 28 Feb 2009 17:50:03 +0000	[thread overview]
Message-ID: <handler.2397.D2397.12358430282300.ackdone@emacsbugs.donarmstrong.com> (raw)
In-Reply-To: 011f01c992e9$854a3cc0$c2b22382@us.oracle.com

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]


Your message dated Sat, 28 Feb 2009 19:42:33 +0200
with message-id <utz6eo3ue.fsf@gnu.org>
and subject line Re: bug#2397: 23.0.90; grep no longer highlights the match
has caused the Emacs bug report #2397,
regarding 23.0.90; grep no longer highlights the match
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
2397: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2397
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3197 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 23.0.90; grep no longer highlights the match
Date: Thu, 19 Feb 2009 15:26:41 -0800
Message-ID: <011f01c992e9$854a3cc0$c2b22382@us.oracle.com>

emacs -Q
 
load library cygwin-mount.el, then setup-cygwin.el:
 
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
 
M-x grep -nH -e pattern *.el
 
The text matching "pattern" is not highlighted. In Emacs 22 it is
highlighted using face `match' (yellow background).
 

In GNU Emacs 23.0.90.1 (i386-mingw-nt5.1.2600)
 of 2009-02-01 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 




[-- Attachment #3: Type: message/rfc822, Size: 4614 bytes --]

From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>, 2397-done@emacsbugs.donarmstrong.com
Cc: juri@jurta.org
Subject: Re: bug#2397: 23.0.90; grep no longer highlights the match
Date: Sat, 28 Feb 2009 19:42:33 +0200
Message-ID: <utz6eo3ue.fsf@gnu.org>

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Mon, 23 Feb 2009 16:56:14 -0800
> Cc: 2397@emacsbugs.donarmstrong.com
> 
> > >> Could you also try running grep from Bash (not from Emacs)
> > >> with options "--color=always" and "--color=auto" and see whether
> > >> it outputs highlighting sequences for both cases in a standalone
> > >> shell?
> > >
> > > Yes, both produce the highlighting.
> > > It is apparently only in Emacs that --color=auto does not work.
> > 
> > Weird.  Maybe a Windows guru could explain the difference.
> 
> I think it's an Emacs guru that's needed (perhaps with some Windows, Cygwin, or
> GNU bash knowledge).

I think this has nothing to do with either Cygwin or Bash.  Drew,
could you please verify that the same problem happens for you in
"emacs -Q" without loading cygwin-mount.el and setup-cygwin.el?

AFAICT, this problem happens because Emacs on Windows invokes
subsidiary programs through a pipe, and that pipe fails the `isatty'
test in Grep.  So "--color=auto" can never work on MS-Windows when
Grep is invoked by Emacs.

I ``fixed'' this by going back, on DOS/Windows only, to the
"--color=always" way we used before Juri installed his 2007-11-23
changes.  It's true that this will reinstate the original problem with
multiple grep invocations in a pipe (on Windows and DOS only), but I
don't see how can that use-case be solved, and having a single
instance of grep in the command is by far more frequent usage.

Here's the change I installed.  Drew, could you please see if it works
for you as well?

2009-02-28  Eli Zaretskii  <eliz@gnu.org>

	* progmodes/grep.el (grep-process-setup) [windows-nt msdos]: Use
	"--color=always".

Index: lisp/progmodes/grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- lisp/progmodes/grep.el	25 Jan 2009 00:54:53 -0000	1.99
+++ lisp/progmodes/grep.el	28 Feb 2009 17:24:29 -0000	1.100
@@ -407,7 +407,11 @@
     ;; `--color=auto' emits escape sequences on a tty rather than on a pipe,
     ;; thus allowing to use multiple grep filters on the command line
     ;; and to output escape sequences only on the final grep output
-    (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=auto"))
+    (setenv "GREP_OPTIONS"
+	    (concat (getenv "GREP_OPTIONS")
+		    ;; Windows and DOS pipes fail `isatty' detection in Grep.
+		    " --color=" (if (memq system-type '(windows-nt ms-dos))
+				    "always" "auto")))
     ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions
     (setenv "GREP_COLOR" "01;31")
     ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions


  parent reply	other threads:[~2009-02-28 17:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <utz6eo3ue.fsf@gnu.org>
2009-02-19 23:26 ` bug#2397: 23.0.90; grep no longer highlights the match Drew Adams
2009-02-22 17:56   ` Drew Adams
2009-02-22 19:01     ` Juri Linkov
2009-02-22 20:04       ` Drew Adams
2009-02-22 22:08         ` Juri Linkov
2009-02-22 22:27           ` Drew Adams
2009-02-22 22:52             ` Juri Linkov
2009-02-22 23:14               ` Drew Adams
2009-02-22 23:48                 ` Juri Linkov
2009-02-24  0:56                   ` Drew Adams
2009-02-28 17:50   ` Emacs bug Tracking System [this message]
     [not found] ` <000701c999ce$aa77cb20$0200a8c0@us.oracle.com>
     [not found]   ` <usklyo063.fsf@gnu.org>
     [not found]     ` <001201c999da$77282650$0200a8c0@us.oracle.com>
2009-02-28 20:10       ` Eli Zaretskii
2009-02-28 21:09         ` Drew Adams
2009-02-28 22:08           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=handler.2397.D2397.12358430282300.ackdone@emacsbugs.donarmstrong.com \
    --to=owner@emacsbugs.donarmstrong.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.