help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Is it possible to run rgrep in emacs on Win32?


From: Ludwig, Mark
Subject: RE: Is it possible to run rgrep in emacs on Win32?
Date: Mon, 16 Apr 2012 13:26:07 +0000

> From: Eli Zaretskii
> Sent: Saturday, April 14, 2012 4:05 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: Is it possible to run rgrep in emacs on Win32?
> 
> > From: Steinar Bang <sb@dod.no>
> > Date: Sat, 14 Apr 2012 10:03:26 +0200
> >
> > >>>>> Eli Zaretskii <eliz@gnu.org>:
> >
> > > You will be much better off, including with other ports of GNU/Unix
> > > software, if you just put them all on PATH.  I see no good reason for
> > > keeping them in a directory that is not on PATH.
> >
> > The cmd.exe on my development box have their own utilities with the
> same
> > names and different argument, and I don't want to confuse other
> > utilities in my development environment (which I don't control myself).
> > Things might stop building because I want rgrep in Gnus.
> 
> There's more than one way of cutting this cake.
> 
> You could create a special batch file that modifies PATH before it
> runs Emacs.  You can then make the desktop shortcut which runs Emacs
> run that batch file instead.  Or you could invoke the batch file
> manually from a command shell before running Emacs from that shell.
> You can even have a separate shortcut for starting a special-purpose
> cmd.exe window, which starts by running that batch file (via the "cmd
> /k foo.bat" feature).
> 
> I think one of these methods could fit your workflow without adversely
> affecting those other utilities.

I suppose my situation is different, but am I the only person who uses the 
Windows-native FINDSTR utility?

(require 'compile)
(setq grep-command "findstr /n ")

The syntax is of course completely different, and there are certainly 
significant RegExp differences, but it ignores the "NUL" that appears at the 
end of the command so basically works and its syntax is similar-enough to 
grep's that I can mostly forget which one I'm using.  (I'm a programmer, so 
generally am searching for a single word such as a function name....)  

I just add the /S option when I want recursive descent behavior....

Cheers,
Mark




reply via email to

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