[ESS] Text in R shell (inferior buffer) becomes greyed-out after printing a tibble

Amit Ramon @m|t@r@mon @end|ng |rom gm@||@com
Sat Jul 2 12:32:28 CEST 2022


Hello,

On Fri, Jul 1, 2022 at 6:25 AM Brett Presnell <presnell using ufl.edu> wrote:
>
>
> I started getting this behavior a few months ago after an emacs upgrade
> (I use a snapshot of emacs devel).  There is a bug report about it at
>
>   https://github.com/emacs-ess/ESS/issues/1193
>
> I currently have the following in my emacs config (derived from the
> comments in the bug report), which "solves" the problem possibly with
> some negative ramifications whose details I have since forgotten..
>
>   (use-package xterm-color
>
>     :init
>     (setq comint-output-filter-functions
>           (remove 'ansi-color-process-output
comint-output-filter-functions))
>
>     (add-hook 'inferior-ess-mode-hook
>               (lambda () (add-hook 'comint-preoutput-filter-functions
#'xterm-color-filter nil t)))
>
>     :config
>     (load "xterm-color.el")
>     (setq xterm-color-use-bold t))


Thanks for the link! I also think my problems started after moving to Emacs
28.1.

After reading https://github.com/emacs-ess/ESS/issues/1193 (and also
https://github.com/emacs-ess/ESS/issues/1199), there is another workaround,
different from the above ono, suggested by Fuco1. It is a bit simpler:

(defun my-inferior-ess-init ()
  (setq-local ansi-color-for-comint-mode 'filter)
  (smartparens-mode 1))
(add-hook 'inferior-ess-mode-hook 'my-inferior-ess-init)

For me Fuco1's solution works better than the other one. With the other
solution some text is not printed to the screen. For example, if I print a
tibble then the line under the column names, which should show the class
for each column, is not shown (or cannot be seen). Also, if I run
dplyr::if_else(TRUE, 1L, 0)
then part of the error message is not shown.

These problems do not occur with Fuco1's solution. However, with this
solution, some text coloring is lost (for example 'library(tidyverse)').
However, for me these are minor issues, and so far this seems to fix the
issues I had.

Best,
Amit

	[[alternative HTML version deleted]]



More information about the ESS-help mailing list