help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to run an awk command on file in emacs - using minGW on Windows


From: Angus Comber
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

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 <address@hidden> wrote:

> > Date: Tue, 17 Sep 2013 17:41:07 +0100
> > From: Angus Comber <address@hidden>
> >
> > > 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.
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]