From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: How to find lines not matching a certain pattern - ie grep -v Date: Wed, 25 Feb 2015 01:29:11 +0000 Message-ID: <871tleok2g.fsf@robertthorpeconsulting.com> References: <3fc1ac7e-624f-4fa5-8770-345d504c48f7@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424827782 25997 80.91.229.3 (25 Feb 2015 01:29:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 01:29:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: ltolenaar@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 02:29:32 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YQQn4-0008Jc-9D for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 02:29:30 +0100 Original-Received: from localhost ([::1]:52389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQQn3-0006wW-MD for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Feb 2015 20:29:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQQmr-0006ta-Pa for help-gnu-emacs@gnu.org; Tue, 24 Feb 2015 20:29:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQQmo-0002n3-K1 for help-gnu-emacs@gnu.org; Tue, 24 Feb 2015 20:29:17 -0500 Original-Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:37957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQQmo-0002md-FL for help-gnu-emacs@gnu.org; Tue, 24 Feb 2015 20:29:14 -0500 Original-Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp01.blacknight.com (Postfix) with ESMTPS id 0CA75983D4 for ; Wed, 25 Feb 2015 01:29:13 +0000 (UTC) Original-Received: (qmail 14734 invoked from network); 25 Feb 2015 01:29:12 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.178.75]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 25 Feb 2015 01:29:12 -0000 In-Reply-To: <3fc1ac7e-624f-4fa5-8770-345d504c48f7@googlegroups.com> (ltolenaar@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.7 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102878 Archived-At: ltolenaar@gmail.com writes: > The grep -v may not work if it is not installed as is likely to be the > case on windows. Apparently what is needed is a true grep > implementation in compiled elisp. I would be glad to do this if there > are substantial pointers or instruction. If your on MS Windows there are plenty of ways to get Grep. It's available in Eli Zaretski's ezwinports: http://sourceforge.net/projects/ezwinports/ That also includes find, man, diff, groff, make, gnutls and a bunch of other useful GNU programs. There's MinGW, MinGW2 and GNUWin32 for all the stuff it doesn't cover (I use MinGW). Vincent Goulet supplies an Emacs for MS Window which comes with some of these things (though not grep, AFAIK). Making a grep replacement in elisp would certainly be possible but it would be slow. Emacs regexps aren't fast and neither is it's byte-code interpreter. Performance is quite critical for Grep. There is a "find" replacement in Emacs, find-lisp.el, e.g. find-lisp-find-dired. It's useful if you're stuck without a port of GNU find, but it's not as fast and doesn't have the same features. If your looking for a project making an MS Win distribution of Emacs with all the GNU utilities it uses would be a good one. BR, Robert Thorpe