From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.help Subject: Working rgrep in windows emacs in 2024? (GNU emacs 29.1, windows 11 Enterprise) Date: Tue, 13 Feb 2024 12:20:50 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6685"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) 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 12:21:44 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 1rZqr9-0001aE-Km for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 12:21:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZqqg-0004uO-R7; Tue, 13 Feb 2024 06:21:14 -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 1rZqqe-0004tX-Fz for help-gnu-emacs@gnu.org; Tue, 13 Feb 2024 06:21:12 -0500 Original-Received: from schwantz.bang.priv.no ([2a01:4f9:c011:82fd::1]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZqqZ-0001gi-Uz for help-gnu-emacs@gnu.org; Tue, 13 Feb 2024 06:21:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dod.no; s=sb; t=1707823251; bh=9BpLCb7SoDb2HxVzPk0dbtjzIsJyTwaZCWyYCez68GM=; h=From:To:Subject:Date:From; b=VbfHTsDuae2YwrumSJt0XMkLljSflQl84aeZVJHlO54UWypDww/J/wY2OXvdDWISL KBR6unMFAE3v23YIru8gSmKrz2n6ZgTVVLLas2FGIKHliREO6xT3TxcVZGy8vtzo3E 4l2ebKWcBftvaXp93mhQJHEhOaVU9QvQfwDrklvI= Original-Received: from AAP-5CG32757DH (unknown [84.210.69.52]) by schwantz.bang.priv.no (Postfix) with ESMTPSA id 592ED1AC for ; Tue, 13 Feb 2024 11:20:51 +0000 (UTC) Received-SPF: none client-ip=2a01:4f9:c011:82fd::1; envelope-from=sb@dod.no; helo=schwantz.bang.priv.no X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:145922 Archived-At: 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