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

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

Re: [h-e-w] Unable to launch cygwin bash (M-x shell) in win 7 64 bit


From: Sivaram Neelakantan
Subject: Re: [h-e-w] Unable to launch cygwin bash (M-x shell) in win 7 64 bit
Date: Thu, 02 Aug 2012 10:22:43 +0530
User-agent: Gnus/5.110019 (No Gnus v0.19) Emacs/24.1 (windows-nt)

On Wed, Aug 01 2012,Drew Adams wrote:

>> Looks like (require 'setup-cygwin) was interfering with HOME and other
>> details and that's why things were getting borked.  Removed the above
>> package and it reads the .enacs_bash file correctly.
>
> I don't think `setup-cygwin.el' changes HOME.
>

I probably should STFU instead of making wild assertions!  You're
right that there was nothing about HOME in it.  However, setup-cygwin
had something that was interfering with the shell invocation, which
again, would be my fault rather than anything of yours.  More below.


[snipped 9 lines]

> Let me know and I'll try to make a reasonable fix to `setup-cygwin.el'.  Thx.

My .emacs snip for cygwin
--8<---------------cut here---------------start------------->8---
(setq exec-path  (cons "C:/gnu/bin/" exec-path))
(setq exec-path (cons "C:/cygwin/usr/bin" (cons "C:/cygwin/bin" exec-path)))
(setq exec-path  (cons "C:/MiKTeX2.9/miktex/bin" exec-path))
(setenv "PATH" (concat 
"C:\\MiKTeX2.9\\miktex\\bin;C:\\cygwin\\bin;C:\\cygwin\\usr\\bin;C:\\gnu\\bin\\;"
 (getenv "PATH")))
(setq shell-file-name "/usr/bin/bash")
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(require 'cygwin-mount)
(cygwin-mount-activate)
(require 'setup-cygwin)
--8<---------------cut here---------------end--------------->8---

my .emacs_bash
--8<---------------cut here---------------start------------->8---
PS1="\e[0;address@hidden:\$ \e[m "
--8<---------------cut here---------------end--------------->8---

With the above, invoking M-x shell, gives me
--8<---------------cut here---------------start------------->8---
$ ls
COPYING
addpm.exe
...
runemacs.exe
]0;/cygdrive/c/gnu/emacs-24.1/bin  <== extra line
--8<---------------cut here---------------end--------------->8---

For every command that I call in the shell, the current directory is
listed along with some control characters after the command completes.

In setup-cygwin, I comment out

--8<---------------cut here---------------start------------->8---
;;(setq explicit-shell-file-name  shell-file-name) ; Interactive shell
--8<---------------cut here---------------end--------------->8---

everything is hunky dory.  The extraneous line disappears.

--8<---------------cut here---------------start------------->8---
$  ls
COPYING
addpm.exe
...
runemacs.exe
$  
--8<---------------cut here---------------end--------------->8---


Like I said, I do lots of silly stuff without reading the
documentation, so this could be a case of doofus user doing what
shouldn't be done.

 sivaram
 -- 




reply via email to

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