0

After updated to macOS Catalina (10.15) I've been trying to use R in Emacs 26.3. However, Emacs is not fetching R by using M-x R (Emacs says [No match]).

I already checked the paths for both R and Emacs in the Terminal, both are in /usr/local/bin. Also, I checked M-x getenv PATH within Emacs. This is the result:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_14:/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_14

Can anyone help me with this please? Any ideas to fix the problem? Please let me know if you need more info.

6
  • Apparently there is no Emacs command named R in your setup.
    – Drew
    Oct 18, 2019 at 17:53
  • Have you (re-)installed ess? You need that to run R.
    – Tyler
    Oct 18, 2019 at 18:07
  • 1
    The command R disappeared somewhere between version 16 and 18 of ESS. See #787 of the ESS git repository on github. Solutions are discussed there. You can define your own alias but you must wait for the detection of the newest R version. The problem should be solved in the newest version of ESS directly from github since the ticket is closed with a commit. R-newest should be some replacement for R (see the comment of jabraham).
    – Tobias
    Oct 18, 2019 at 20:57
  • 1
    @Tobias the problem you link to was fixed in April; the version of ESS in Melpa includes the fix. So just reinstalling ESS from Melpa should fix the problem.
    – Tyler
    Oct 18, 2019 at 22:01
  • @Tyler - Thank you very much for your help. I re-installed ESS and R came back in Emacs. @Drew and @Tobias, thanks for your comments and for editing my question, I appreciate you!
    – Dylan
    Oct 19, 2019 at 2:03

1 Answer 1

2

The command M-x R is provided by the package ESS, which is available via the Melpa repository. You need to install this package before you can start the R process this way.

There was a period in early 2019 when the R command was broken in ESS, but it has since been fixed, so installing the current release of ESS should restore the R command.

1
  • Confirming this works on Big Sur after installing macOS R app from official source.
    – Paul
    Apr 23, 2021 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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