This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Emacs with gui error ...

Tags: emacs, error, neon emacs, error, neon emacs, error, neon
(comma "," separated)
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Emacs with gui error ...

Wed Oct 14, 2020 8:12 am
emacs with gui does not start! it from terminal initially said: "emacs Undefined color: "WINDOW_FOREGROUND" ", then I read in a site the command:" xrdb -q|grep -vie 'emacs.*WINDOW_FOREGROUND'|xrdb -load "that I gave, now it comes out: emacs Undefined color: "FOREGROUND", searching on google I found a solution for terminal use: emacs -nw, but I'm interested in the gui. How do I start emacs with the gui in kde (with gnome starting)?
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Emacs with gui error ...

Wed Oct 14, 2020 11:36 am
Hi!

Did you try to start `emacs --debug-init ` or `emacs --no-init-file`? I'm here with the latest kde neon (updated and rebootet a few minutes ago) and emacs starts without problems. Perhaps you did define some stuff in your configuration file which results in an endless loop or a crash.
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Wed Oct 14, 2020 4:16 pm
koffeinfriedhof wrote:Hi!

Did you try to start `emacs --debug-init ` or `emacs --no-init-file`? I'm here with the latest kde neon (updated and rebootet a few minutes ago) and emacs starts without problems. Perhaps you did define some stuff in your configuration file which results in an endless loop or a crash.

Image how do i start it if it gives me these errors?
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Wed Oct 14, 2020 7:14 pm
I tried kubuntu in virtualbox, I installed emacs-gtk and it started, so the problem is not purely kde plasma, but or kde neon user in general, or my kde users!? I wonder what the reason will be: missing packages or some wrong setting if not a bug? help
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Emacs with gui error ...

Wed Oct 14, 2020 8:24 pm
Seems it is missing gcc → ArchWiki

Try solving with `sudo apt install gcc`
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Wed Oct 14, 2020 9:56 pm
Does not work gcc ,only kde does it, I opened a post in bugzilla! https://bugs.kde.org/show_bug.cgi?id=427725
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Emacs with gui error ...

Thu Oct 15, 2020 9:27 am
Very interesting. I am using the kde neon developer release in a VM, emacs just starts fine. Do you use the snap-version of emacs or the package available via apt?
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Thu Oct 15, 2020 3:36 pm
emacs .deb on kde neon user! if it works for you maybe they have corrected the problem!
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Emacs with gui error ...

Fri Oct 16, 2020 7:51 am
Okay, I've read some about this error which seems to occur every now and then.
Code: Select all
xrdb -q | grep -E "^Emacs.*foreground"
results in
user@KDEneon[~/kdesrc-build]› xrdb -q | grep -E "^Emacs.*foreground"
Emacs*Dialog*foreground: #232627
Emacs*menubar*foreground: #232627
user@KDEneon[~/kdesrc-build]›
on my machine, so the gtk-app-style seems to work here.

Did you change/set the GTK-Application-Style in systemsettings → application style → configure gnome/gtk application style or do you have old configurations like an ~/.Xresources file in your homefolder?


/edit: As a workaround you can try start emacs with
Code: Select all
emacs --foreground-color COLOR
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Fri Oct 16, 2020 4:31 pm
it doesn't work, and it doesn't surprise me; in the link https://bugs.kde.org/show_bug.cgi?id=427725 there is a comment that informs that in version 5.20 they have removed a program and that is why it is wrong, but if you say that in the devolper version it works, then they are solving the problem. is your Kde Neon devolper version Testing?
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Emacs with gui error ...

Fri Oct 16, 2020 6:32 pm
I'm using the unstable repositories, yes.

Does emacs not start with manual setting the colors? If it is only related to the foreground color it should… Perhaps you need the background too? Does the same error occur if you start
Code: Select all
emacs -fg black -bg white
User avatar
robertotamburrino
Registered Member
Posts
68
Karma
0
OS

Re: Emacs with gui error ...

Sat Oct 17, 2020 4:19 pm
Image yes
salotz
Registered Member
Posts
1
Karma
0

Re: Emacs with gui error ...

Wed Oct 21, 2020 4:26 am
I'm having the same issue but only on one machine oddly enough.

Code: Select all
Description:    KDE neon User Edition 5.20
Release:        20.04
Codename:       focal


For each machine.

Both have gcc installed.

On the bad one:

Code: Select all
xrdb -query | grep Emacs


gives:

Code: Select all
Emacs*Background:       WINDOW_BACKGROUND
Emacs*Dialog*background:        BACKGROUND
Emacs*Dialog*foreground:        FOREGROUND
Emacs*Foreground:       WINDOW_FOREGROUND
Emacs*XlwScrollBar.Background:  BACKGROUND
Emacs*XlwScrollBar.Foreground:  FOREGROUND
Emacs*backgroundToolBarColor:   BACKGROUND
Emacs*bottomToolBarShadowColor: BACKGROUND
Emacs*menubar*background:       BACKGROUND
Emacs*menubar*foreground:       FOREGROUND
Emacs*popup*Background: BACKGROUND
Emacs*popup*Foreground: FOREGROUND
Emacs*toolBarShadowThickness:   0
Emacs*topToolBarShadowColor:    BACKGROUND
Emacs.default.attributeBackground:      WINDOW_BACKGROUND
Emacs.default.attributeForeground:      WINDOW_FOREGROUND


(which is the machine I am posting from and can copy-paste).

And on the good one I get the same lines but all instead of BACKGROUND, FOREGROUND etc. there are color hex codes like: #232627 instead of WINDOW_FOREGROUND.

On the good machine it wasn't a completely clean install. '/' partition was clean but '/home' was from an existing partition. Otherwise both were using the same installation media only two weeks apart.

I tried adding this into '~/.Xresources' like some other forums were saying:
Code: Select all
*.WINDOW_FOREGROUND: black

and loading with
Code: Select all
xrdb -merge ~/.Xresources


But that did nothing, unsurprisingly since thats the wrong prefix. This does help:

Code: Select all
Emacs*Foreground: black


Except then you'll need to go in and add all of them to Xresources file. And there are a lot of other entries besides the emacs ones that have similar entries and will likely cause problems.

Also doesn't explain how it is working on the good machine since these are not set in the Xresources file.

Found that these configurations are coming from this directory '/usr/share/kdisplay/app-defaults/Emacs.ad'. But the file is identical on both machines.

I found that the appropriate flags for starting emacs to avoid this **** is

Code: Select all
emacs --no-x-resources


and probably the easiest way to solve this is just to set this in your '.profile'.

Code: Select all
alias emacs="emacs --no-x-resources"


Don't see any problem with that and X resource are a load of **** anyhow. Even this is a pain in the **** since I need to change all my systemd service files too.

Would like to get to the root cause still.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]