Prevent inclusion of repo name in R buffer name

  Kiến thức lập trình

I have been successfully using the my-ess-start-R function from the ESS wiki for a long time. However, upon upgrading Emacs (29.4) and ESS via the Goulet Windows installer recently it no longer works because this line

(if (not (member "*R*" (mapcar (function buffer-name) (buffer-list))))

No longer holds when an R script inside a repo for an R package is opened. This is because the repo name is added to the buffer name, so instead of “*R*” it is e.g. “*R:foo*” so the if statement is always false and it keeps reopening R. It works for scripts outside of R package repos.

I don’t use git integration through emacs, so is there an easy way to prevent ESS from naming the buffer in this way, forcing all R sessions to be simply *R*? Or a better way to replicate this setup for R packages?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT