0

I'm running emacs 24.2.1 on OpenSUSE 12.2 x 64. I am trying to get ESS mode to load rJava properly. I get it to work from M-x shell by saving the environment vars from R CMD javareconf to my .bashrc. Now, when I run R in shell-mode, it works fine and loads the libraries and finds the paths without issue.

The Problem occurs when I try to use ESS mode (M-x R RET), which apparently doesn't read my .bashrc . How can I get an in-emacs program like ESS to read my variables, without lengthy double-coding them into my .emacs file?

WorldsEndless
  • 1,493
  • 1
  • 15
  • 27
  • You can use `(setenv "PATH" ...)` in your `.emacs`. – Barmar Jul 26 '13 at 19:20
  • My problem is that there are half a dozen, not just my PATH. Is the only solution really to load each one individually? – WorldsEndless Jul 26 '13 at 19:24
  • 1
    Are you running Emacs from the GUI instead of from the shell? Then you need to set environment variables in your .xinitrc, not .bashrc, so they'll be inherited by GUI programs. – Barmar Jul 26 '13 at 19:25

1 Answers1

1

Move your environment variable settings from .bashrc to .xinitrc. This way they'll be set for GUI applications like emacs, not just programs you run from terminal shells.

Barmar
  • 741,623
  • 53
  • 500
  • 612