Subject: Re: bug#18902: Emacs 24.4 doesn't respect X resources

From: Rogério Brito <[email-masked]>
Date: Sun, 23 Nov 2014 14:24:08 -0200

Dear Stefan,

I'm also including Chong Yidong as CC, since he is the author of the first
change that broke Emacs for me.

I am, therefore, keeping a lot of quote, for the sake of context here.

On Oct 31 2014, Rogério Brito wrote:
> On Oct 31 2014, Stefan Monnier wrote:
> > > Debian has just upgraded Emacs 24.3 to 24.4 and one thing stopped
> > > working: It seems that Emacs 24.4 does not respect all the X resources
> > > that I used to specify (for many, many, many years) in my .Xresources
> > > file.
> > > 
> > > Going back to 24.3 makes the configuration work again. Going forward to
> > > 24.4 makes it stop. Tested multiple times just in case I was going nuts.
> > > 
> > > In particular, I set the geometry, foreground and background colors with
> > > the following:
> > > 
> > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > > Emacs*cursorColor:		red
> > > Emacs*geometry:			100x45
> > > Emacs*Background:		#002540
> > > Emacs*Foreground:		azure3
> > 
> > Can you reproduce the problem with "emacs -q" (with lower-case "q",
> > since "-Q" ignores Xresources)?
> 
> Yes, I can reproduce this with -q.
> 
> > Is the above from your .Xresources or from the output of "xrdb -query"
> > (I ask since Emacs himself doesn't read the .Xresources file)?
> 
> This is from my .Xresources file, but they are also spit with xrdb -query.
> *BUT*, in the mean time, I did the following:
> 
> * I am using the MATE desktop environment (essentially, GNOME 2) and I get
>   the X resources ignored with Emacs 24.4, but everything worked just fine
>   with Emacs 24.3.
> 
> * I tried installing and seeing the behavior with LXDE, GNOME 3 Classic
>   (regular GNOME 3 just crashed), and  XFCE.  Emacs 24.4 loaded the
>   resources just fine with these.
>   
> * Then, I became more adventurous and spent a lot of time git bisecting the
>   emacs tree and after a lot of electrical energy/heat, I discovered that
>   the first bad commit is, indeed, related to faces and X resources.
> 
>   The commit is 15e14b165dcbc6566a0459b0d5e66f89080f569e and right at the
>   bottom of the comment is
> 
>     * faces.el (face-spec-set): Use face-spec-recalc in all cases.
>     (face-spec-reset-face): Don't assign extra properties in temacs.
>     (face-spec-recalc): Apply X resources too.
> 
>   The commit (in more than one place) is:
> 
>     https://github.com/emacs-mirror/emacs/commit/15e14b165dcbc6566a0459b0d5e66f89080f569e
>     http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=15e14b165dcbc6566a0459b0d5e66f89080f569e

Apparently, the recent changes from the bzr repository to the git repository
have broken the 2nd link, but the 1st one still works.

In any case, I am still keeping below the output of git bisect log:

> git bisect start
> # bad: [23ce11b16aea239c5632f542c47a0ec6c18fbdc7] Minor fix in bidi.c:bidi_cache_reset_to.
> git bisect bad 23ce11b16aea239c5632f542c47a0ec6c18fbdc7
> # good: [3a1ce0685f66f5fb162b07f6bf4a1d8e1ec75c06] Add 24.3 release to ChangeLogs
> git bisect good 3a1ce0685f66f5fb162b07f6bf4a1d8e1ec75c06
> # skip: [ea6e1a63d8be3ac5fe029de23b83beccdcd3ecdc] * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated TODO.  Add "." after " @ ". (ruby-smie--at-dot-call): New function.  Checks if point at method call with explicit target. (ruby-smie--forward-token, ruby-smie--backward-token): Prepend "." to the method name tokens when it precedes them. (ruby-smie--backward-id, ruby-smie--forward-id): Remove. (ruby-smie-rules): Add rule for indentation before and after "." token.
> git bisect skip ea6e1a63d8be3ac5fe029de23b83beccdcd3ecdc
> # good: [4324fdcd76e3e69c09b3219f583d615c2db355b1] * lisp/progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some viewers such as evince when ebnf-production-name-p is nil.
> git bisect good 4324fdcd76e3e69c09b3219f583d615c2db355b1
> # bad: [0a153b238ecdaec77b2d6dee74595fa60e714b3f] * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $' used as a variable.
> git bisect bad 0a153b238ecdaec77b2d6dee74595fa60e714b3f
> # bad: [28f859b697e41f31133d8b3bc919d738e5c1369c] Ignore XF86WakeUp
> git bisect bad 28f859b697e41f31133d8b3bc919d738e5c1369c
> # good: [448014150c794c7da80475421a30505d6e3afd14] (Mostly) fix bug #16007 with generation of MULE-*.map files.
> git bisect good 448014150c794c7da80475421a30505d6e3afd14
> # good: [187ab3738148c325fb4556be00068d4b2f06de60] Fix session GUI startup.
> git bisect good 187ab3738148c325fb4556be00068d4b2f06de60
> # bad: [f2408d020f446103a3123f047f9e59ce2279e4dd] Document `scroll-bar-adjust-thumb-portion'.
> git bisect bad f2408d020f446103a3123f047f9e59ce2279e4dd
> # good: [90981d876d005b04b50049eb17532d40b13ef13f] lisp/gnus/ChangeLog: Fix timestamp of last commit
> git bisect good 90981d876d005b04b50049eb17532d40b13ef13f
> # good: [1e5c6c91bed1566e703ffdbbd71e2da33c871546] Mark `split-window' change from command to function as ---.
> git bisect good 1e5c6c91bed1566e703ffdbbd71e2da33c871546
> # good: [2e9883868deb524a1cc1883a8945f3c6c81f0d3f] Re-organize NEWS.
> git bisect good 2e9883868deb524a1cc1883a8945f3c6c81f0d3f
> # bad: [2b4bf1c47011b3e289170a505bdd3b797f6afded] eww: minor code fixes and toolbar support
> git bisect bad 2b4bf1c47011b3e289170a505bdd3b797f6afded
> # bad: [15e14b165dcbc6566a0459b0d5e66f89080f569e] Don't make faces when loading Custom themes.
> git bisect bad 15e14b165dcbc6566a0459b0d5e66f89080f569e
> # good: [33e44744004ff92f6b8ecef0102f800f11ddfda9] Fix compilation warning on MS-Windows in my_png_error.
> git bisect good 33e44744004ff92f6b8ecef0102f800f11ddfda9
> # good: [1e992d21cc0d3e3294ac916d22d6af8d74757263] Doc fixes for face functions.
> git bisect good 1e992d21cc0d3e3294ac916d22d6af8d74757263
> # first bad commit: [15e14b165dcbc6566a0459b0d5e66f89080f569e] Don't make faces when loading Custom themes.

The above is the complete log.

> Given the commit above, is this a bug with Emacs or should I report things
> elsewhere?

Again, is there any further information that I can provide about my system,
or anything else that you would like me to test so that this can get fixed?

Thank you very much for your help,

Rogério Brito.

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br