Say I want to create and edit a new R file using emacs/ESS. I type emacs myfile.R at my shell prompt and an empty file opens. Hurray! I start typing my code:


at which point I am interrupted and prompted with,

R starting project directory? ~/Desktop/

I think I have two options: 1) Ctrl+g to ignore the prompt and keep on working or 2) specify a project directory. If I do the former, I will keep getting the same prompt until I specify a project directory. If I specify a project directory, an R console will automatically open. The problem is that I don't want an R console: I just want to create and edit an R file using ESS so that I have syntax highlighting.

Q: Is there a way to prevent the R console from opening?


This is happening because ESS uses an active R process to find completion targets. If you customize the variable ess-use-R-completion to the value nil, you won't be prompted to start an R process anymore. You also won't get tab completion of variable names, function arguments, etc.

| improve this answer | |
  • Thanks for the helpful reply, Tyler. Daft question, but does that active R process need to be open within emacs? – Lyngbakr Oct 22 at 15:51
  • 1
    Yes, it does. ESS starts the R process, and keeps track of which process is associated with the script buffer. It doesn't interact with external R processes. But if you're using ESS, you wouldn't normally be using R outside of Emacs anyways. – Tyler Oct 22 at 15:52

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.