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

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

Re: shell doesn't appear to execute $HOME/.emacs_bash


From: David Karr
Subject: Re: shell doesn't appear to execute $HOME/.emacs_bash
Date: Tue, 30 Jun 2009 15:42:22 -0700 (PDT)
User-agent: G2/1.0

On Jun 1, 4:33 pm, David Karr <davidmichaelk...@gmail.com> wrote:
> I'm running GNU Emacs in Cygwin, both of which I just installed on
> this
> box.
>
> In shell-mode in Emacs, I want the same aliases that are defined in
> my $HOME/.bashrc file.  As far as I can tell, the way to do this is to
> create a file $HOME/.emacs_bashwith the following contents:
>
>   . $HOME/.bashrc
>
> Unfortunately, this seems to have no effect.  Once the shell mode
> finishes initializing, the aliases I needed are not set.  I also tried
> adding an "echo" to the top of that file, to see if I could when it is
> executed, but I never saw that output anywhere.
>
> I've also tested this with XEmacs on Cygwin, and it behaves exactly
> the same way.

I'm getting back to this, because I'm setting up my environment on a
new box.

I discovered one more interesting fact, but I don't know what to do
with it yet.

When I start up Emacs and execute "shell", it apparently just executes
"bash" without running "$HOME/.bashrc" or "$HOME/.emacs_bash".  I can
tell because I have print statements in both of those.

If I then kill the "*shell*" buffer and then execute "shell" again,
the shell buffer shows the print statement from "$HOME/.bashrc" (I
really only need to execute $HOME/.bashrc, not $HOME/.emacs_bash, for
what I need).

I don't understand what the difference might be between the first
invocation of "shell", with the second one, after killing the *shell*
buffer.


reply via email to

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