Closed jackkamm closed 3 years ago
Right after I posted this I realized there's another way to achieve what I want -- define a new function to call the version of R I want:
(defun R-prd ()
(interactive)
(let ((inferior-ess-r-program "R-prd"))
(R)))
Is this the recommended way to use multiple versions of R within Emacs?
If so, feel free to close the issue.
The comments in R should start with #
:
This works for me:
x <- 1+1
print(x)
## Local Variables:
## inferior-ess-r-program: "R-prd"
## End:
I would like to use different versions of R within Emacs, by setting
inferior-ess-r-program
as a buffer-local variable. However, the buffer-local value is ignored, andM-x R
always uses the global value ofinferior-ess-r-program
.Minimal reproducible example:
Init.el:
test.R (with
inferior-ess-r-program
set locally via a file-local variable):Calling
M-x R
withintest.R
does not use my desired value ofinferior-ess-r-program
.Emacs version: 27.1 ESS version: Pulled from MELPA on 2021-03-18