From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Dr. Werner Fink" Newsgroups: gmane.emacs.bugs Subject: bug#25228: 25.1; GNU emacs 25.1: custom-set-faces from init file ~/.emacs ignored Date: Wed, 21 Dec 2016 09:11:04 +0100 Message-ID: <20161221081104.3nd6sga4cyi6q7wl@boole.suse.de> References: <83oa074y73.fsf@gnu.org> <5858289B.2070500@gmx.at> <83fulj4uhu.fsf@gnu.org> <58584121.1070404@gmx.at> <83d1gn4pl2.fsf@gnu.org> <58590F28.9040309@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bdjf27sgzsx3fd3v" X-Trace: blaine.gmane.org 1482307935 7018 195.159.176.226 (21 Dec 2016 08:12:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2016 08:12:15 +0000 (UTC) User-Agent: Mutt/1.6.2 (2016-07-01) Cc: 25228@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 21 09:12:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJc0Q-0001CC-F5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Dec 2016 09:12:10 +0100 Original-Received: from localhost ([::1]:55724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJc0U-0002jj-QU for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Dec 2016 03:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJc0N-0002hI-RO for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2016 03:12:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJc0I-00077J-Ig for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2016 03:12:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJc0I-00077D-FH for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2016 03:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cJc0I-0000rg-5b for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2016 03:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Dr. Werner Fink" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Dec 2016 08:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25228 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25228-submit@debbugs.gnu.org id=B25228.14823078703247 (code B ref 25228); Wed, 21 Dec 2016 08:12:02 +0000 Original-Received: (at 25228) by debbugs.gnu.org; 21 Dec 2016 08:11:10 +0000 Original-Received: from localhost ([127.0.0.1]:49630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJbzR-0000qJ-Tb for submit@debbugs.gnu.org; Wed, 21 Dec 2016 03:11:10 -0500 Original-Received: from mx2.suse.de ([195.135.220.15]:46196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJbzQ-0000qA-7A for 25228@debbugs.gnu.org; Wed, 21 Dec 2016 03:11:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 498FEAABE; Wed, 21 Dec 2016 08:11:07 +0000 (UTC) Content-Disposition: inline In-Reply-To: <58590F28.9040309@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127282 Archived-At: --bdjf27sgzsx3fd3v Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 20, 2016 at 11:59:52AM +0100, martin rudalics wrote: > '(default ((t (:inherit nil :stipple nil :background "grey92" :foregroun= d "black" :inverse-video nil :box nil :strike-through nil :overline nil :un= derline nil :slant normal :weight normal :height 98 :width normal :foundry = "unknown" :family "Droid Sans Mono"))))) >=20 > The ":height 98" entry in this form before the offending change did set > the "height of the default face in 1/10 pt" to 98. After the offending > change it is set to 113. I have no idea what a "pt" is (and I have no > idea what an "inch" is). But from experience I know that the value of > `window-font-height' for the root window of the initial frame is 15 for > a default face height of 98 and 18 for a default face height of 113. AFAIK pt are points aka 1/72 of 1 inch or in metric units 0.35278 mm (and AFAIK the ANSI is member of the ISO but this is na other story:) >=20 > As a consequence of the offending change, the frame character height of > my initial frame is now 18 instead of the desired 15. In the following > I will try to explain how this happened here. >=20 > [Werner - if you read this, please try to repeat it, maybe you get a > completely different behavior. I gdb one of my current versions of a > GTK build of master, so the line numbers may be off wrt what you have > (unfortunately, debugging the release version freezes GNU/Linux > completely here and I have to turn off the power in order to restart > it).] >=20 > I first visit the file xsettings.c in the .src directory and start the > debugger via M-x gdb completing it to >=20 > gdb -i=3Dmi /home/martin/emacs-git/quick/obj-gtk/src/emacs >=20 > which includes the path of my GTK executable. Next in xsettings.c I > move to line 611 which reads as >=20 > memset (&oldsettings, 0, sizeof (oldsettings)); >=20 > and set a breakpoint there. Then I run the executable via >=20 > run -Q --load /home/martin/temp/default-face.el >=20 > and wait till the breakpoint is hit. In the function where I set the > breakpoint (apply_xft_settings) I now want to trigger the setting of the > variable >=20 > changed =3D true; >=20 > I do this by stepping via "n" and find that it happens on line 675 > because of oldsettings.dpi !=3D settings->dpi: The old value was > 96.281588447653434 while the new value is 96. As a consequence, on line > 701 a >=20 > store_config_changed_event (Qfont_render, > XCAR (dpyinfo->name_list_element)); Hmmm ... after verifying this I've tried this patch ---------------------------------------------------------------------------- --- src/xsettings.c +++ src/xsettings.c 2016-12-21 07:25:17.605036477 +0000 @@ -45,6 +45,7 @@ along with GNU Emacs. If not, see #include #endif =20 @@ -620,7 +621,11 @@ apply_xft_settings (struct x_display_inf #endif FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter); FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba); - FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi); + + if (FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi) =3D=3D FcResul= tMatch) + { + oldsettings.dpi =3D round(oldsettings.dpi); + } =20 if ((settings->seen & SEEN_AA) !=3D 0 && oldsettings.aa !=3D settings->a= a) { ---------------------------------------------------------------------------- and indeed there is a change in the behaviour. Without the custom font set= ting now GNU Emacs window does not a resize anymore at open. It simply starts w= ith the system font without changing its size at open its window. Nevertheless, with the custom font setting and without my change in lisp/dy= namic-setting.el the resize event of the GNU Emacs window is back and still the system font = is used regardless what font has been customized in ~/.emacs > [backtraces] >=20 > It's easy to spot `dynamic-setting-handle-config-changed-event' as the > source of this. Ack --=20 "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr --bdjf27sgzsx3fd3v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJYWjkYAAoJEFDpDVUdwWsufQwP/ibj9cUy6aUi8vCkIdj4WUeV C3h4VRtsxiI8s646nuSglEA7qoM+nPxLZoDsl75be8KL+VHANdbGlvUdBfvgMEfw LlRkSeKgklxy8V/6RdeNlJGid3LCHy96BPNHE/r1P+8PFWqKvZZousrfEBrn9XFz wRGlkrrF7ECtqgq3+ELV8I8s3rVKlKlF2lARe/fqOER4R8P8meCv3+y9Hwby7ZNB OujAg9JU7QVN9kw1f0bs6h0eYkcP+SwTmKxEdNEu5pQljYe17GOXLHi8ZF+98XvB Fch19vJRs96mfTcmz3zUjvlETZTkt5rCjNQCi/Q0HK4kSEns+ls4ufan8tpNN6Yz DbcYSTXeB1Dqdn02u3B3bmp0XKO6fHKhu3EbI5bzMXAf0YJrC/ds4IAY2CH4BBd7 w8G4XjwmsniVo72mqNqljFbhOEDIWCUrjh06fKxwM3Hm1w2aFWF622AFBw4+nX3S M7A26T9XzD4fXvk1U3lbBRYX9ZPZxLBANIqTbj/hEr/YB03LkdIOzSYvVR9iNI1s Q55PRBf1KwOgjOhqjrwjyq0vpqaCVnqNlHKmlgPN5cawzVQ07xjBNu4rm49wT80D NW97k7YcTqGQmiQS1tM48NeX5rQgAFD9ECqiyMrpOFHSSh5vU9ARRCo2jNoQ3Bym 5sY+ZsniZH3YJgggy1so =yRzH -----END PGP SIGNATURE----- --bdjf27sgzsx3fd3v--