From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: What does Emacs on w32 know that grep can't figure out? Date: Sun, 03 Oct 2010 15:23:20 +0200 Organization: ThierryVolpiatto Message-ID: <87sk0ne7g7.fsf@tux.homenetwork> References: <87bp7d1o6k.fsf@catnip.gol.com> <83bp7dqcgu.fsf@gnu.org> <87mxqw28cv.fsf@tux.homenetwork> <87mxqw4oup.fsf@tux.homenetwork> <83ocbcpqif.fsf@gnu.org> <87aamvo912.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286112311 25830 80.91.229.12 (3 Oct 2010 13:25:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2010 13:25:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 03 15:25:09 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P2OYt-000836-QO for ged-emacs-devel@m.gmane.org; Sun, 03 Oct 2010 15:25:08 +0200 Original-Received: from localhost ([127.0.0.1]:52709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2OYt-0004Wa-7K for ged-emacs-devel@m.gmane.org; Sun, 03 Oct 2010 09:25:07 -0400 Original-Received: from [140.186.70.92] (port=54302 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2OYn-0004WG-KB for emacs-devel@gnu.org; Sun, 03 Oct 2010 09:25:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2OYm-0008KQ-9E for emacs-devel@gnu.org; Sun, 03 Oct 2010 09:25:01 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:44129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2OYl-0008KJ-UG for emacs-devel@gnu.org; Sun, 03 Oct 2010 09:25:00 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P2OYk-000815-U6 for emacs-devel@gnu.org; Sun, 03 Oct 2010 15:24:58 +0200 Original-Received: from 231.211.85-79.rev.gaoland.net ([79.85.211.231]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2010 15:24:58 +0200 Original-Received: from thierry.volpiatto by 231.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2010 15:24:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 231.211.85-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) Cancel-Lock: sha1:/+S6P7du5vWEvsbFVtZAQY8a0s0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131288 Archived-At: Thierry Volpiatto writes: > Lennart Borgman writes: > >> On Sat, Oct 2, 2010 at 5:56 PM, Lennart Borgman >> wrote: >>> On Sat, Oct 2, 2010 at 5:23 PM, Eli Zaretskii wrote: >>>>> From: Thierry Volpiatto >>>>> Date: Sat, 02 Oct 2010 17:05:18 +0200 >>>>> Cc: emacs-devel@gnu.org >>>>> >>>>> > Based on your advice I just took the trouble to install powershell. I >>>>> > can not see that it addresses the problem with utf-16, but maybe I am >>>>> > missing something. Can you please tell me how to search also utf-16 >>>>> > files with it? >>>>> >>>>> That's just an idea i sent, i personally don't use (or really few >>>>> sometimes on other machines) windows systems and i have just a basic >>>>> knowledge of all that is related to it and microsoft in general (e.g Powershell). >>>>> So i can't help you much here. >>>>> Anyway, Eli seem to have tried it and is not convinced. >>>> >>>> Looks like the PowerShell cmdlet that's supposed to be equivalent of >>>> Grep is Select-String. >>> >>> Yes, thanks. And that actually works with utf-16. >>> >>> So now we have a strange situation. >> >> >> Or maybe not. Looking at the documentation for Select-String here >> >> http://technet.microsoft.com/en-us/library/dd315403.aspx >> >> it does not look as it autodetects the coding system in the file. >> >> It does not even say it can handle utf-16, or at least I can't find >> it. Maybe someone who understands this better can see it there? > > Can you try to use FINDSTR from command line (it work from eshell) and > tell me if that work on your utf-16 files? > (It seem this command is not part of powershell) > > I wrote some code that use this command with success on windows (with > anything). It is now available on anything-config.el Use M-x anything-do-grep No tweak, work out of the box on GNU/Linux and windows as it is. That's a first shot, feedback welcome. > That would allow to have a decent grep that work on windows without > having to install external programs. > > Even if that seem not powerfull as grep for regexps, that provide a > default grep command better than "grep command not found". -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997