[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shell in Cygwin Emacs doesn't source .bashrc
From: |
David M. Karr |
Subject: |
Shell in Cygwin Emacs doesn't source .bashrc |
Date: |
Sun, 03 Apr 2011 22:06:30 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
I'm on a new Windows Seven box, with the latest released Cygwin and
Cygwin Emacs. I copied over my .emacs file from an older Cygwin
installation on a Windows XP box.
On the old WinXP box, after I start Emacs and execute "shell", it
appears to properly execute my .bashrc, setting my PS1 and putting me in
my home directory.
On the new box, when I execute "shell", the prompt isn't set to my PS1
value, and the current directory is "/usr/bin".
If I execute "bash" at that point, and then "cd", I'm where I should be,
and with my environment set up.
Something obviously changed between the older installation and the
latest, which my older .emacs isn't dealing with properly.
I don't currently have a "$HOME/.emacs_bash" file. I don't know if I
need it.
I start Emacs with the following shortcut command line:
C:\cygwin\bin\run.exe -p /usr/bin emacs-X11.exe -display 127.0.0.1:0.0
I have a feeling this line might be the problem. Do I have to make this
run "bash" instead, and have that run Emacs?
If it matters, here is my current shell-mode-hook function, which I set
to "shell-mode-hook" in a "custom-set-variables" block:
---------------------------
(defun my-shell-mode-hook ()
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt nil t)
(setq explicit-shell-file-name "bash")
(setq shell-file-name explicit-shell-file-name)
(ansi-color-for-comint-mode-on)
(setq shell-prompt-pattern "^\[[A-z0-9]+:[A-z0-9/]+\] ")
(local-set-key "\C-xs" 'cycle-go-shell)
(local-set-key "\C-xS" 'cycle-find-shell-or-shells-buffer-list)
(local-set-key "\C-j" 'lfd-send-input)
(local-set-key [f5] 'comint-previous-matching-input-from-input)
(local-set-key [f12] 'compilation-shell-minor-mode)
)
---------------------------
- Shell in Cygwin Emacs doesn't source .bashrc,
David M. Karr <=