Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emacs fails with undefined WINDOW_FOREGROUND
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
cfgauss
Guru
Guru


Joined: 18 May 2005
Posts: 599
Location: USA

PostPosted: Thu Oct 15, 2020 8:41 pm    Post subject: Emacs fails with undefined WINDOW_FOREGROUND Reply with quote

Code:
$ emacs
Undefined color: "WINDOW_FOREGROUND"

This happens with emacs-27, emacs-26, and emacs-25. This Arch forum suggests a workaround
Code:
$ xrdb /dev/null
which works if I execute it before each invocation of emacs.

What is a more permanent solution?
Back to top
View user's profile Send private message
coderanger
Apprentice
Apprentice


Joined: 19 Sep 2018
Posts: 163

PostPosted: Fri Oct 16, 2020 8:11 am    Post subject: Reply with quote

I grepped the contents of both
Quote:
emacs-27.1.tar.xz
emacs-common-gentoo-1.6.tar.xz
and did not observe the string WINDOW_FOREGROUND

Could you grep this string in your .emacs.d folder so we can see which lisp code throws this error?

UPD: Also this can give some additional info https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-01/msg00836.html

Try running
Code:
emacs -fg '#ffffff'
If this works you can create alias or write a start script as workaround


This is what I see on my laptop for reference:
Code:
$ xrdb -query | grep -E '^Emacs.*foreground'
Emacs*Dialog*foreground:        #232627
Emacs*menubar*foreground:       #232627

Code:
$ grep WINDOW_FOREGROUND /usr/share/kdisplay/app-defaults/Emacs.ad
Emacs.default.attributeForeground:      WINDOW_FOREGROUND
Emacs*Foreground:               WINDOW_FOREGROUND
Back to top
View user's profile Send private message
cfgauss
Guru
Guru


Joined: 18 May 2005
Posts: 599
Location: USA

PostPosted: Sat Oct 17, 2020 6:34 pm    Post subject: Reply with quote

coderanger wrote:
Could you grep this string in your .emacs.d folder so we can see which lisp code throws this error?
Code:

~$ find .emacs.d -type f -exec grep WINDOW_FOREGROUND {} \;
returns nothing.
coderanger wrote:
Also this can give some additional info https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-01/msg00836.htmlk
I deleted Emacs.ad as suggested but get a similar error.
coderanger wrote:
Try running
Code:
emacs -fg '#ffffff'
I get the same error.
coderanger wrote:
This is what I see on my laptop for reference:
Code:
$ xrdb -query | grep -E '^Emacs.*foreground'
Emacs*Dialog*foreground:        #232627
Emacs*menubar*foreground:       #232627
Code:
$ xrdb -query|grep -i emacs
returns nothing.
I believe the problem is KDE/Plasma.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum