unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Steinar Bang <sb@dod.no>
To: help-gnu-emacs@gnu.org
Subject: Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Enterprise)
Date: Tue, 13 Feb 2024 12:20:50 +0100	[thread overview]
Message-ID: <yqoonkl34twip9p.fsf@dod.no> (raw)

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	other threads:[~2024-02-13 11:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 11:20 Steinar Bang [this message]
2024-02-13 12:23 ` Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Enterprise) Steinar Bang
2024-02-13 12:32 ` Steinar Bang
2024-02-13 12:55   ` Steinar Bang
2024-02-13 13:47     ` Eli Zaretskii
2024-02-14  7:50       ` Steinar Bang
2024-02-13 13:28 ` Eli Zaretskii
2024-02-14  8:26   ` Steinar Bang
2024-02-14  9:00     ` Steinar Bang
2024-02-14 15:08       ` Eli Zaretskii
2024-02-14 15:09     ` Eli Zaretskii
2024-02-15  9:40   ` Gregor Zattler
2024-02-15 10:22     ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=yqoonkl34twip9p.fsf@dod.no \
    --to=sb@dod.no \
    --cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).