From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angus Comber Newsgroups: gmane.emacs.help Subject: Re: How to run an awk command on file in emacs - using minGW on Windows Date: Wed, 18 Sep 2013 10:55:19 +0100 Message-ID: References: <83bo3rpueb.fsf@gnu.org> <834n9jpdpo.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1379498147 30367 80.91.229.3 (18 Sep 2013 09:55:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Sep 2013 09:55:47 +0000 (UTC) Cc: Emacs Help To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 18 11:55:51 2013 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 1VMEUA-0004ef-1V for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Sep 2013 11:55:50 +0200 Original-Received: from localhost ([::1]:45573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMEU9-0006Nb-D1 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Sep 2013 05:55:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMETj-0006NN-H4 for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 05:55:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMETi-0000wh-8I for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 05:55:23 -0400 Original-Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]:62044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMETg-0000wI-B7; Wed, 18 Sep 2013 05:55:20 -0400 Original-Received: by mail-pa0-f51.google.com with SMTP id lf1so8011087pab.38 for ; Wed, 18 Sep 2013 02:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=H8EfHDYn9YB4vlfOF92Et1XhJIIyHbJQhhqwDCUeNRU=; b=ZrtedQEWI8bLRPtxmIu/EXK3LnyzmCUYujQPNce9fHUuj6w/fy2P9AUfuOomp7Nhlh 29SiGaNDysyiH1ShYmd9oJvzfT0/NtJZ2f/cCRlq3E7TO7DwiOWbydVZsDnftwRKYV4o UPtIydJOx/71XGRE/VRQbbYjRpyeiD7MT/UC3HgJacHohq549qRE8YIrY8eNH9CBP9pm 5syvmovvTqvF9wzq86y+uh7nrxAQ9hmCLEhBAXIUpq/n1G9KCGLLMz2AS11Xm5NQX/Fb pw6vefbcYBlfLrRRA1tFNtwLePomSGD/S6xLUr8v/okpYL6mXnFtgKGr9tz5l10gkyAR rRZg== X-Received: by 10.66.234.131 with SMTP id ue3mr40943583pac.35.1379498119218; Wed, 18 Sep 2013 02:55:19 -0700 (PDT) Original-Received: by 10.68.197.34 with HTTP; Wed, 18 Sep 2013 02:55:19 -0700 (PDT) In-Reply-To: <834n9jpdpo.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::233 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:93440 Archived-At: OK this is what I just tried: I removed my PC's %SHELL% variable (set to C:/MinGW/msys/1.0/bin/bash.exe) I removed this line in my emacs init.el file (emacs init file) '(shell-file-name "C:/MinGW/msys/1.0/bin/bash.exe") After doing that I still have same issue and even using ' /Sam/' workaround doesn't work. So this move doesn't look helpful. I do have a folder containing native 'unix' tools, eg awk etc in a folder on my PC. So I have the programs - and path set in env variable. Is there some step I am missing? I thought problem with emacs and shell was because it attempted to use cmd.exe? So I changed shell to bash.exe - and that at least seemed to help. If you have any suggestions I would love to hear them. On 17 September 2013 18:20, Eli Zaretskii wrote: > > Date: Tue, 17 Sep 2013 17:41:07 +0100 > > From: Angus Comber > > > > > Try this: > > > > > > awk ' /Sam/' test.txt > > > > > > i.e. an extra blank before the first slash. > > > > > > > *** The extra space fixes it. That is not obvious. > > Of course, it's not obvious. Nothing ever is with MSYS name-mangling. > > > > But I really suggest not to use MSYS tools from Emacs. There are > > > native (MinGW) ports available. > > > > > *** But msys gives me my unix environment. Are you saying install full > > Cygwin? Or just remove my %SHELL% env var? > > What exactly do you mean by "unix environment" in this context? Why > do you need to set SHELL to point to the MSYS Bash when you are > working in Emacs? Do you actually want the shell (and if so, for what > purposes), or do you want the Unix utilities? If the latter, there > are natively compiled ports of those utilities, just install and use > them. > >