Subject: bug#58459: Getting a fresh emacs session with no customisation

From: uzibalqa <[email-masked]>
Date: Wed, 12 Oct 2022 12:56:37 +0000

------- Original Message -------
On Wednesday, October 12th, 2022 at 12:52 PM, uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> wrote:

> ------- Original Message -------
> On Wednesday, October 12th, 2022 at 9:51 AM, Stefan Kangas [email-masked] wrote:
> 
> 
> 
> > tags 58459 notabug
> > close 58459
> > thanks
> > 
> > uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
> > editors" [email-masked] writes:
> > 
> > > I am finding it extremely difficult to get a fresh emacs configuration. Even after removing
> > > my "~/.emacs" file and even with "emacs -q" which should not load any init file, I get a black
> > > background when I do "emacs -q". With customize-themes not showing that any theme is selected.
> > > 
> > > Even the command
> > > 
> > > emacs -q --no-site-file --no-splash
> > > 
> > > gives me a black background.
> > > 
> > > But "emacs -Q" gives me a white background.
> > 
> > So you have some X resources that are causing you trouble. See the
> > documentation for the -Q flag.
> > 
> > Try this to see:
> > 
> > xrdb -query -all|grep -i emacs
> > 
> > And then unset those resources.
> > 
> > This is a support question and not a bug, so I'm closing this.
> 
> 
> Why is emacs not taking care of these EMACS generated X-Resources?
> You may claim it is not a bug, but what would be the usefelness when
> user wants a fresh restart but has to go through all this torture
> to find out what is going on. It is definitely not for the novice
> to fix this.

How can one unset those resources?

--------------------------------------

This is the result of xrdb

xrdb -query -all | grep -i emacs

Emacs*Background:	#000000

Emacs*Dialog*background:	#000000

Emacs*Dialog*foreground:	#ffffff

Emacs*Foreground:	#ffffff

Emacs*XlwScrollBar.Background:	#000000

Emacs*XlwScrollBar.Foreground:	#ffffff

Emacs*backgroundToolBarColor:	#000000

Emacs*bottomToolBarShadowColor:	#000000

Emacs*menubar*background:	#000000

Emacs*menubar*foreground:	#ffffff

Emacs*popup*Background:	#000000

Emacs*popup*Foreground:	#ffffff

Emacs*topToolBarShadowColor:	#000000

Emacs.default.attributeBackground:	#000000

Emacs.default.attributeForeground:	#ffffff

Emacs.mode-line.attributeForeground:	#ffffff

Emacs.scroll-bar.attributeBackground:	#000000

Emacs.scroll-bar.attributeForeground:	#ffffff

Emacs.tool-bar.attributeBackground:	#000000

Emacs.tool-bar.attributeForeground:	#ffffff