[ESS] Code highlighting differences between -nw and GUI mode

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Thu Sep 4 01:02:56 CEST 2025


On 3 September 2025 at 22:32, James W. MacDonald via ESS-help wrote:
| I am using the stock Emacs I got from the Ubuntu repo (GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)  of 2024-04-01, modified by Debian) with ESS-25.01.0, and polymode etc from MELPA.
| 
| If I open an RMD file using the GUI version, the code highlighting is as I expect. However, if I run using -nw, then any R code blocks are all solid orange. The only different message I get is
| 
| Error during redisplay: (poly-lock-function 1) signaled (wrong-number-of-arguments #<subr color-rgb-to-hsl> 0)
| 
| Which I get on the terminal version. I am lost here, and hope someone might have some advice as to what to try to diagnose.

With the caveat that I am still more-or-less an elisp / "real emacs" neophyte
after all these 30+ years, I do have this working. Also on Ubuntu. But

 - versions matter: I am now on Ubuntu 25.04 so emacs is 30.1 (but AFAIK that
   matters more for fonts than colouring)
 - terminals matter (!!): for me 'emacs -nw' now works in tmux/byobu inside
   gnome-terminal
 - themes matter (!!): I switched some time ago to 'Nord' as a theme, and
   with Nord enabled things are really nice under x11 and on the terminal
 - this matter because emacs in daemon is the bee's knees as I can then ssh
   in, be in terminal mode, and continue in the same session

So is short: Yes. All this matters. Keep at it. I have no real tips other
than saying to try different themese as well as maybe different terminal apps.

Good luck,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the ESS-help mailing list