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

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

Re: [h-e-w] The bash shell from Emacs


From: Benjamin Riefenstahl
Subject: Re: [h-e-w] The bash shell from Emacs
Date: Fri, 06 Aug 2004 17:54:46 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux)

Hi Gerald,


address@hidden writes:
> When I start bash from Emacs through the "shell" command a shell
> buffer is opened and I get the bash prompt BUT bash doesn't
> recognize any command.
>
> bash-2.05b$ ls
> : command not found

I am sure this has been discussed here before (search the list
archives), although I can't find it in the FAQ.

Your output suggests that when Emacs sends a command to bash, the
command is terminated with a DOS-style <CR><NL> combination, while the
shell only expects <NL>.  (When bash sees command "ls\r" it naturally
can't find that, and when Emacs gets the response output "ls\r:
command not found" that looks like what you show above.)

This may also depend on your Cygwin configuration, like when you have
something about "binmode" in your CYGWIN environment variable (which
is of course expected to create problems with non-Cygwin tools).  I
haven't tested this, though.

>From the Emacs side you should be able to use the variable
process-coding-system-alist to tell Emacs to use Unix-style line ends
for bash.  Something like this may help (please check the
documentation):

  (add-to-list 'process-coding-system-alist '("bash" . cp850-unix))


benny





reply via email to

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