0

I have installed emacs on windows 10 working ok so far. Installed R and ESS. Set system and user path to Rterm.exe as read in some forums. Restarted and opened a R file in emacs. Syntax coloring is Ok, emacs entered ESS-R-mode but I cannot evaluate R code.

Using C-c C-n to evaluate the current line / selection, gives me a message:

"Searching for program: No such file or directory, R"

M-x R prompt for starting project directory, but same message is shown.

Double checked system PATH and everything seems ok. Checked emacs variable "getenv" and path is properly set to Rterm.exe folder.

I can open a shell inside emacs and run R prompt with no issue.

any hint?

UPDATE: tried setting (inferior-R-program-name "C:/Users/joe/R/bin/x64/Rterm") and (inferior-ess-r-program "C:/Users/joe/R/bin/x64/Rterm.exe") to .emacs file and now emacs is stuck on blank screen after asking for R starting project directory. The only way to close it is Task Manager - kill process

  • what does (executable-find "R") return? – Felipe Lema Jul 11 '18 at 15:06
  • How to execute such command? I've tried M-x but helm did not find such – Forge Jul 11 '18 at 17:02
  • open the scratch buffer using C-x b, write down (executable-find "R"), go to end of line and type C-x C-e – Felipe Lema Jul 11 '18 at 18:45
  • answer is nil. Seems that some other variable needs to be set – Forge Jul 12 '18 at 7:00
  • tried setting (inferior-R-program-name "C:/Users/joe/R/bin/x64/Rterm") and (inferior-ess-r-program "C:/Users/joe/R/bin/x64/Rterm.exe") to .emacs file and now emacs is stuck on blank screen after asking for R starting project directory. The only way to close it is Task Manager - kill process – Forge Jul 12 '18 at 8:49
0

It's no longer required to use Rterm.exe; you can just use R.exe directly. To configure the program name that emacs/ESS uses, set the variable in your .emacs like this:

(setq inferior-ess-r-program "R")

Alternatively, press C-h v, select the inferior-ess-r-program variable, and use the Customize interface to set and save the setting.

If you don't have the Windows Path set correctly to include the R/bin folder, you can specify the full path in the setting.

(setq inferior-ess-r-program "C:/Program Files/R/R-3.5.3/bin/R.exe")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.