FIX ess comint color thing

This commit is contained in:
Nathan Dwarshuis 2023-07-09 16:12:12 -04:00
parent 4a3bfe0231
commit 7420de7ca3
1 changed files with 12 additions and 1 deletions

View File

@ -891,10 +891,14 @@ End rant.
Oh yes, and to get linting to work, also install r-lintr and r-styler in the conda environment. In general it seems better and less risky to install things from =conda= rather than from within an R session.
#+begin_src emacs-lisp
(nd/when-bin "conda"
(use-package xterm-color
:straight t)
(use-package ess
:straight t
:init
(require 'ess-r-mode)
:after xterm-color
:hook
((ess-mode . flycheck-mode)
(ess-mode . company-mode)
@ -913,7 +917,14 @@ Oh yes, and to get linting to work, also install r-lintr and r-styler in the con
;; for RStudio by the people who maintain RStudio
ess-style 'RStudio
;; always start from the current file
ess-startup-directory 'default-directory)))
ess-startup-directory 'default-directory))
;; Workaround for https://github.com/emacs-ess/ESS/issues/1193
(defun my-inferior-ess-init ()
(add-hook 'comint-preoutput-filter-functions #'xterm-color-filter -90 t)
(setq-local ansi-color-for-comint-mode nil))
(add-hook 'inferior-ess-mode-hook #'my-inferior-ess-init))
;; ;; fast compile
;; (defun nd/ess-r-add-env (orig-fun inf-buf proc-name start-args)