From: Eric Lilja <mindcooler@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Using cygwin bash shell with NT Emacs, path is not setup perfectly
Date: Sat, 25 Aug 2007 16:00:09 +0200 [thread overview]
Message-ID: <fapcla$ub1$1@sea.gmane.org> (raw)
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
next reply other threads:[~2007-08-25 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-25 14:00 Eric Lilja [this message]
2007-08-26 0:29 ` 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 13:36 Eric Lilja
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='fapcla$ub1$1@sea.gmane.org' \
--to=mindcooler@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).