Making Your Emacs Shell a Login Shell
Published . Tags: emacs.
I like to use
multi-term to handle shells in
Emacs. However, when using RVM to handle different versions of Ruby,
opening up a shell gave me the following error:
Warning! PATH is not properly set up, '/Users/hrs/.rvm/gems/ruby-2.0.0-p353/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p353'.
This seemed really baffling, because I was sure my
configured correctly, and I didn’t see any errors in a non-Emacs
Eventually I figured out that I wasn’t configured to use a login
shell, which sources dotfiles differently. This was easily solved by
(setq multi-term-program-switches "--login")
Now, creating a new
multi-term instance runs
bash with the
--login flag, sourcing
Boom! No more errors!