* Using cygwin bash shell with NT Emacs, path is not setup perfectly
@ 2007-08-25 13:36 Eric Lilja
0 siblings, 0 replies; 3+ messages in thread
From: Eric Lilja @ 2007-08-25 13:36 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: cygwin
Hello, I'm using a native win32 version emacs and I want M-x shell to
invoke Cygwin's bash instead of the default shell. Everything seems to
work except that the path does not get setup properly.
Here's the output from echo $PATH when bash is run under nt emacs:
$ echo $PATH
/usr/bin:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX
2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin
Here's the same command when started using cygwin.bat:
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX
2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin
See the difference? Under ntemacs I get /usr/bin twice in a row instead
of /usr/bin:/bin:
This is causing problems for me. Why is this happening and how can I
solve it?
Here's the relevant section of my .emacs. It's basically what's on the
emacs wiki (I added ansi-color.for-comint-mode-on and removed the
setting of the HOME variable as that is availabe anyway on my system):
(let* ((cygwin-root "c:/cygwin")
(cygwin-bin (concat cygwin-root "/bin")))
;(setenv "HOME" (concat cygwin-root "/home/eric"))
(setenv "PATH" (concat cygwin-bin ";" (getenv "PATH")))
(setq exec-path (cons cygwin-bin exec-path))
(setq shell-file-name "bash")
(setq explicit-shell-file-name "bash")
(add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on)))
Thanks for any replies.
Posting this to both gmane.os.cygwin and gmane.emacs.help, hope that's
not inappropriate. If so, I sincerly apologise.
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Using cygwin bash shell with NT Emacs, path is not setup perfectly
@ 2007-08-25 14:00 Eric Lilja
2007-08-26 0:29 ` Eric Lilja
0 siblings, 1 reply; 3+ messages in thread
From: Eric Lilja @ 2007-08-25 14:00 UTC (permalink / raw)
To: help-gnu-emacs
Hello, I'm using a native win32 version emacs and I want M-x shell to
invoke Cygwin's bash instead of the default shell. Everything seems to
work except that the path does not get setup properly.
Here's the output from echo $PATH when bash is run under nt emacs:
$ echo $PATH
/usr/bin:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX
2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin
Here's the same command when started using cygwin.bat:
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program/MiKTeX
2.6/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/emacs/bin
See the difference? Under ntemacs I get /usr/bin twice in a row instead
of /usr/bin:/bin:
This is causing problems for me. Why is this happening and how can I
solve it?
Here's the relevant section of my .emacs. It's basically what's on the
emacs wiki (I added ansi-color.for-comint-mode-on and removed the
setting of the HOME variable as that is available anyway on my system):
(let* ((cygwin-root "c:/cygwin")
(cygwin-bin (concat cygwin-root "/bin")))
(setenv "PATH" (concat cygwin-bin ";" (getenv "PATH")))
(setq exec-path (cons cygwin-bin exec-path))
(setq shell-file-name "bash")
(setq explicit-shell-file-name "bash")
(add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on)))
Thanks for any replies.
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-26 0:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-25 13:36 Using cygwin bash shell with NT Emacs, path is not setup perfectly Eric Lilja
-- strict thread matches above, loose matches on Subject: below --
2007-08-25 14:00 Eric Lilja
2007-08-26 0:29 ` Eric Lilja
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).