Starting a new R experience in Emacs

John Haman


Categories: Emacs R Tags: Emacs R

For some time, I’ve been wondering if it’s possible to make an alternative to ESS. While I love ESS, I feel that it could be interesting to try to integrate some of the more modern features that the Emacs ecosystem has to offer with the R programming experience.

I’ve started a small project to do just that. The plan is to create some sort of thin R mode for Emacs that looks more like python.el or julia-mode than ESS. So far, I have a working REPL, but not much else.

I sketched the following diagram to show the features that I would like to have:

R +

  1. Vterm
  2. LSP / eglot -> corfu
  3. Eldoc
  4. Some help interaction (html?)
  5. ??? Tree-sitter (R/emacs)
  6. ??? Rmd support
  7. ??? radian support


I plan to offer few features in the current spirit of making Emacs packages as lightweight as possible. I’ve been able to get vterm integrated with R and Emacs, which shows some advantages to comint-mode. If I can manage to get tree-sitter, completions, and few other features working, then I might have a light and performative ESS alternative. Based on my scan of github, all the pieces are available, they just aren’t being used.

We’ll see how it goes. This is mostly for fun, but I have a personal interest in having the best possible R programming experience in Emacs.

Unfortunately, the Vterm integration means that this project will only work on Linux and Mac computers for now.