Doom Emacs se avete un ERROR: Undefined color: …

Fri, Jan 15, 2021 2-minute read

Perdersi in un bicchiera d’acqua.

Ho recetemente migrato ad un desktop manager composto da i3 e Xfce4 come gestiore dei widget e della sessione (un post su questo prima o poi), tutto ok se non per uno strano errore all’avvio di Emacs. ERROR: Undefined color: rgba/….

Boh? Che roba e'? Non ho modificato configurazioni di Emacs, non ho cambiato nulla se non il session manager. Qualche variabile d’ambiente?

Ok, inizio a controllare ma nulla, nulla che giustifichi l’errore. Ricordo che Doom Emacs in fase di installazione generale un setup d’ambiente, ok lo faccio rigenerare… nulla.

Insomma per farla breve, dimenticavo di aver crato un .Xresource per settare i font di Urxvt.

Rimuovo .Xresource e magicamente Emacs non genera piu' errori.

Rileggo .Xresource e trovo i famigerati rgba…

Rimouvo il file e a questo giro seguo il wiki di Archlinux sul tema e quindi creo un file .Xdefaults:

!! URxvt Appearance
URxvt.termName: xterm
URxvt.transparent: true
URxvt.inheritPixmap: False
URxvt.imLocale: en_EN.UTF-8
URxvt.scrollBar: false
URxvt.saveLines: 500
URxvt.urlLauncher:      firefox
URxvt.cursorBlink: true
URxvt.geometry: 80x20
URxvt.fading: 25%
urxvt.font: xft:tamsyn:style=Regular:size=11
urxvt.boldFont: xft:Dejavu sans mono:bold:pixelsize=11
URxvt*background: #303030
urxvt.depth: 32
urxvt.background: #000000
URxvt.foreground: #f2f2f2
URxvt.cursorBlink: true
URxvt.cursorUnderline: true
URxvt.title: ktx-terminal
URxvt.foreground: grey80
URxvt.tintColor: #262626

*foreground:     rgb:cc/cc/cc
*background:     rgb:0/0/0
!black
*color0:         rgb:20/20/20
*color8:         rgb:75/77/73
!red
*color1:         rgb:cc/00/00
*color9:         rgb:ef/29/29
!green
*color2:         rgb:4e/9a/06
*color10:        rgb:8a/e2/34
!brown/yellow
*color3:         rgb:c4/a0/00
*color11:        rgb:fc/e9/4f
!blue
*color4:         rgb:34/65/a4
*color12:        rgb:72/9f/cf
!magenta
*color5:         rgb:75/50/7b
*color13:        rgb:ad/7f/a8
!cyan
*color6:         rgb:06/98/9a
*color14:        rgb:34/e2/e2
!white
*color7:         rgb:d3/d7/cf
*color15:        rgb:ee/ee/ec

Volendo ora posso ricreare il corretto .Xresources cosi':

xrb ~/.Xresources
# oppure
xrdb -merge ~/.Xresources

Biblio