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

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

Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Ente


From: Steinar Bang
Subject: Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Enterprise)
Date: Tue, 13 Feb 2024 12:20:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

I've used emacs for many years on many platforms, including windows.

One thing I use a lot on linux (and MacOS when I had that), is rgrep and
'C-c p s g' in projectile.

And rgrep is something I have never managed to get working on windows.

Now I have a new windows machine so I make a new attempt.

It's not that I haven't tried before:

I've messed with setting the PATH environment variable (from my .emacs)
   (if windows-emacs
        (setenv "PATH" (concat 
"c:\\ProgramFiles\\ezwinports\\bin;C:\\ProgramFiles\\GnuWin32\\bin;" (getenv 
"PATH"))))
and I've tried adding to the exec-path
    (when windows-emacs
        (push "C:/ProgramFiles/GnuWin32/bin" exec-path)
        (push "c:/ProgramFiles/ezwinports/bin" exec-path))

But neither of the above settings have ever given me a working rgrep.

I also have the following grep-related setting:
(setq grep-command "grep -n "
      grep-find-ignored-directories '("SCCS" "RCS" "CVS" "MCVS" ".src" ".svn" 
".git" ".hg" ".bzr" "_MTN" "_darcs" "{arch}" "node_modules" "target"))

What has been at the end of the added paths (not right now, or "not
yet", in my (or "my employer's") new Windows 11 laptop) in the PATH and
exec-path settings above, should be obvious to those that have tried
tinkering with this before.

But in case they aren't known, explanation follows:

Ezwinports is Emacs maintainer Eli Zaretskii's old port of linux/unix
command line tools to windows:
 https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/EZWinPorts.html

Do these still work for 64bit windows?
Are they recommended over GnuWin32?
Are they deprecated for GnuWin32?

Then there is GnuWin32
 https://gnuwin32.sourceforge.net/

It doesn't look maintained, judging from the dates on the front page...?

The grep is from February 2009
 https://gnuwin32.sourceforge.net/packages/grep.htm
The find is fron April 2005
 https://gnuwin32.sourceforge.net/packages/findutils.htm

Granted there probably haven't been much active development going on in
these utils but there have to have been bugfixes and security fixes and
adapting to API changes to the underlying APIs for all of these
years...?

And being this old they probably aren't 64bit (yes they have "win32" in
the name, but that could be misleading).

Does anyone else have a working rgrep in a recent emacs on a recent
windows on amd64, they would like to share?

Thanks!


- Steinar



reply via email to

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