Bug 414076 - emacs (GUI) does not start (Undefined color: "WINDOW_FOREGROUND")
Summary: emacs (GUI) does not start (Undefined color: "WINDOW_FOREGROUND")
Status: RESOLVED NOT A BUG
Alias: None
Product: Breeze
Classification: Plasma
Component: gtk theme (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 21:34 UTC by Gianluigi Papia
Modified: 2019-12-20 17:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
GTK Config (95.67 KB, image/png)
2019-11-12 22:40 UTC, Gianluigi Papia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluigi Papia 2019-11-12 21:34:07 UTC
emacs does not start, the error is the following:
Undefined color: "WINDOW_FOREGROUND"

According to emacs dev (?), this is outside of Emacs control. There are some files that expects to be run through the preprocessor, but isn't. (sic)
http://emacs.1067599.n8.nabble.com/bug-16462-emacs-does-not-start-under-KDE-Undefined-color-quot-WINDOW-FOREGROUND-quot-td310437.html

It seems that this happens because KDE's defaults apply its color and font definitions even to applications that weren't compiled for KDE. Interesting link (from line 1203): https://fossies.org/linux/emacs/etc/PROBLEMS

I try to remove /usr/share/kdisplay/app-defaults/Emacs.ad or make this file empty. In these cases, the error is now the following:
Undefined color: "FOREGROUND"

I want to keep the breeze dark style for my GTK applications (System Settings > Application Style > GNOME Application Style (GTK)) so I didn't uncheck anything in those GTK settings.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Undefined color: "WINDOW_FOREGROUND"

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux 
(available in About System)
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
It is my first bug report (ever), I searched but I didn't find any bug report of this kind in the KDE Bug Report.
Comment 1 Gianluigi Papia 2019-11-12 22:40:18 UTC
Created attachment 123878 [details]
GTK Config

The emacs version is:
GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-29

For information, emacs runs with option -nw or -Q

In attachment, the GTK style configuration in System Settings.
Comment 2 Gianluigi Papia 2019-12-16 19:22:39 UTC
The answer was just there: https://wiki.archlinux.org/index.php/Emacs#Emacs_fails_to_start_with_the_error_message_'Undefined_color:_%22WINDOW_FOREGROUND%22'

I installed the the mcpp package and now all work fine!
Comment 3 Nate Graham 2019-12-20 17:44:46 UTC
Thanks, looks like this is not a Breeze GTK bug then.