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

Brett Presnell pre@ne|| @end|ng |rom u||@edu
Fri Jul 1 05:25:26 CEST 2022


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))


Amit Ramon via ESS-help <ess-help using r-project.org> writes:

> [External Email]
>
> Hello list,
>
> Say I create a tibble:
>
> library(tidyverse)
> tt <- tibble(a = 1:2, c = 2:3)
>
> If I now print the content of tt, either using 'print(tt)' or by typing
> 'tt' and Enter, the text in the R shell buffer becomes grey from this point
> and forward. Subsequent prints to the buffer will be in grey. All
> syntax-highlighting is gone, and the only way to restore it is to restart R.
>
> This doesn't happen when printing variables of other types. The tibble
> above prints as
>
>> tt
> # A tibble: 2 × 2
>       a     c
>   <int> <int>
> 1     1     2
> 2     2     3
>
> I've noticed that the first character in a tibble print is '#', and thought
> that this might be related to the issue, but simply printing text with
> 'cat', say, with '#" as the first character, doesn't reproduce this issue.
>
> I tried disabling as much of my Emacs initialization code but this issue
> still persists.
>
> My ESS version is 18.10.3 and Emacs 28.1.
>
> Has anyone here run into a similar issue? Any idea how to fix that?
>
> Best,
> Amit



More information about the ESS-help mailing list