emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
620 stars 162 forks source link

ESS Buffer keeps changing font colour. #1199

Open kdschneider opened 2 years ago

kdschneider commented 2 years ago

Problem

The text in the ESS buffer keeps changing to a colour similar to the background making it hard/impossible to read it.

When changing the theme, the text colour gets changed to the correct value, but any new input is wrong again. I have to select text to be able to read it.

lionel- commented 2 years ago

Duplicate of #1193?

kdschneider commented 2 years ago

Seems to be a similar problem, yes. I could fix my issue for the most part by not setting ess-font-lock-keyword, but the tibble problem persists.

I will check #1193. Sry for the duplicate.

Fuco1 commented 2 years ago

Just happened to me. Emacs 28 now uses different system for coloring output that contains ansi sequences. The dark foreground color comes from the face ansi-color-bright-black. If your background is dark, setting this to a white-ish color will at least enable you to read the text. But fontification of say comments printed by tibble no longer works because it simply overwrites any existing faces from font-lock.

Fuco1 commented 2 years ago

Simplest fix seems to be to run (setq-local ansi-color-for-comint-mode 'filter) in the comint buffer. You can add this to 'inferior-ess-mode-hook, my config is

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