From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Enterprise) Date: Tue, 13 Feb 2024 15:28:24 +0200 Message-ID: <86v86spk7b.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28565"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 14:29:57 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rZsrE-0007BK-B0 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 14:29:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZspz-0008JZ-HB; Tue, 13 Feb 2024 08:28:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZspo-0008G1-Mb for help-gnu-emacs@gnu.org; Tue, 13 Feb 2024 08:28:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZspo-0002KC-Cx for help-gnu-emacs@gnu.org; Tue, 13 Feb 2024 08:28:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dLquCNdxC8HckJ9mLN/132e9lH7KY8MY0OXTtzAumRM=; b=aqv236ve+aRy GNs+FqUF7frQ8i/Nc7EVp3B0Bv4th/7LtSKxqqnd6Me6DteFRZIMCIviPyV98CAfI55XM0GRpynCg QsmY/0msQCl9pci3qtldHA4teLS16zJz7iFGsIW5nEOYRnKwyC/QRErb1AwCTr2TMeGs3jswtWPoP 1bwjPCqv5y1ZRy6Xh8Z1lkG5OG/DTT7h8g2OKHYISUJ8WCNhMY4id968kNdrvUMTR1bdLOlaN8bXP InRr3pEarYkGLCrxa1NtRo9D0R+8fjcP9KYdCm1MCaysEVLqROwC+pvbkZZBGTa1tfLSEiYxxUU5y d1CzrgIOxlS8yc7acXXLgA==; In-Reply-To: (message from Steinar Bang on Tue, 13 Feb 2024 12:20:50 +0100) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145927 Archived-At: > From: Steinar Bang > Date: Tue, 13 Feb 2024 12:20:50 +0100 > > 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. FWIW, rgrep works for me on MS-Windows. > 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)) I don't do that because the directory with ports of GNU software, including 'find' and 'grep', is on my system-wide PATH. Does Emacs find find.exe and grep.exe if you try it with executable-find, like this: M-: (executable-find "find") RET M-: (executable-find "grep") RET > But neither of the above settings have ever given me a working rgrep. Which means what? What do you see if you try invoking rgrep? Please show everything you type at rgrep's prompts and the output and/or error messages you get as result. > 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? Yes. I use them every day on 64-bit Windows 11. > Are they recommended over GnuWin32? Yes. > Then there is GnuWin32 > https://gnuwin32.sourceforge.net/ > > It doesn't look maintained, judging from the dates on the front page...? Yes. > 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 Don't use those, use the ones from ezwinports: they are old, but they do the job. Or install newer ports from the MSYS2 site (but be sure to install MinGW64 ports, not MSYS ports). I don't use those, but many others do. > Does anyone else have a working rgrep in a recent emacs on a recent > windows on amd64, they would like to share? I just tried M-x rgrep RET DOS_NT RET .[ch] RET /path/to/emacs RET (where /path/to/emacs was replaced with the actual top-level directory of the Emacs source tree), and pronto saw the list of 178 matches in the current Emacs tree. So yes, it works here, but I'm not sure what can I share, except what I wrote above.