[OS X Emacs] How to configure '~/.bash_profile' and '~/.bashrc' to work with Aquamacs?

Christopher M. Balz christopherbalz at yahoo.com
Thu Jul 7 20:35:57 EDT 2011

A symlink from '~/.emacs_bash' to '~/.bash_profile' succeeded in getting '~/.bash_profile' to execute on Aquamacs, so that the shell buffers have some of the desired settings (aliases).

However, what is needed is to configure Aquamacs so that '~/.bash_profile' executes once per Aquamacs session, and '~/.bashrc' executes once per Aquamacs shell?  Otherwise, for example with a link from '~/.emacs_bash' to '~/.bash_profile', concatenated shell variables (commonly, $PATH) get a lot of redundant values in them.

On *nix and Cygwin-on-NT, GNU Emacs works out of the box with '.bash_profile' and '.bashrc' in the expected way: '.bash_profile' is executed once on the *nix system, and all shells, including Emacs shell buffers, get the variables from that. Likewise, '.bashrc' executes once per *nix shell, including for Emacs shell buffers.

Does anyone have any pointers to how to get Aquamacs to do the same?  Thank you in advance.

(As posted on Stack Overflow - http://stackoverflow.com/questions/3492290/define-bash-aliases-for-aquamacs-shell/6618251#6618251)

More information about the MacOSX-Emacs mailing list