From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#19972: 24.4; Font size change doesn't update (window-total-width) Date: Sun, 01 Mar 2015 16:14:38 +0100 Message-ID: <54F32CDE.9080308@gmx.at> References: <874mq5o3di.fsf@fastmail.fm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1425222927 14133 80.91.229.3 (1 Mar 2015 15:15:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Mar 2015 15:15:27 +0000 (UTC) To: Joost Kremers , 19972@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 01 16:15:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YS5aM-00019Z-Ow for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Mar 2015 16:15:14 +0100 Original-Received: from localhost ([::1]:52917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YS5aL-0005vr-Tz for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Mar 2015 10:15:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YS5aF-0005nx-VU for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2015 10:15:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YS5aC-0005TH-OJ for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2015 10:15:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YS5aC-0005Sn-DC for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2015 10:15:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YS5aB-00052K-U7 for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2015 10:15:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Mar 2015 15:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19972-submit@debbugs.gnu.org id=B19972.142522289919334 (code B ref 19972); Sun, 01 Mar 2015 15:15:03 +0000 Original-Received: (at 19972) by debbugs.gnu.org; 1 Mar 2015 15:14:59 +0000 Original-Received: from localhost ([127.0.0.1]:33424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YS5a6-00051m-Sk for submit@debbugs.gnu.org; Sun, 01 Mar 2015 10:14:59 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:55930) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YS5a5-00051X-1Z for 19972@debbugs.gnu.org; Sun, 01 Mar 2015 10:14:57 -0500 Original-Received: from [194.118.137.119] ([194.118.137.119]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MQzIE-1Y4SoR3NoE-00UGn0; Sun, 01 Mar 2015 16:14:50 +0100 In-Reply-To: <874mq5o3di.fsf@fastmail.fm> X-Provags-ID: V03:K0:pGJ8zTaVUZX/iWaiB8Ei5lpGG454Jcw9IMeIO3XTBR2Rbw5jGwu 8doFxgAtWKSD9pXc9dZIRiaxnSNMsw0gER5nL4xGRTHD0xJxzUIIMx8UtGS7fba34D90fKM 3WzVU16WrJnlD+Co8lTwBKBfD74yQtvU7eu5Mk/u3e0trxKg+4U1RVyliNtZ75EIrHAvOu2 VbR9+W3k0HNfJHKJI8XLA== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99926 Archived-At: > After changing the font size (with `custom-push-theme' and > `face-spec-recalc'), the value returned by `window-total-width' is not= > updated. > > To reproduce, run `emacs -Q' and do: > > - (window-total-width) ; shows the initial value > - (custom-push-theme 'theme-face 'default 'user 'set '((t (:height 128= )))) > ; use a :height value that's actually different from the default he= ight. > - (face-spec-recalc 'default (selected-frame)) > - (window-total-width) ; still shows the initial value > - C-x 3 ; split window horizontally > - C-x 1 ; delete other window > - (window-total-width) ; shows the new value > > The second call to `window-total-width' should already have returned t= he > new value. > > The following IELM transcript (recorded directly after `emacs -Q') sho= ws > the problem: > > ELISP> (window-total-width) > 240 (#o360, #xf0, ?=C3=B0) > ELISP> (custom-push-theme 'theme-face 'default 'user 'set '((t (:heigh= t 128)))) > ((theme-face default user > ((t > (:height 128))))) > > ELISP> (face-spec-recalc 'default (selected-frame)) > nil > ELISP> (window-total-width) > 240 (#o360, #xf0, ?=C3=B0) > > ;; now press `C-x 3` followed by `C-x 1' > > ELISP> (window-total-width) > 192 (#o300, #xc0, ?=C3=80) > ELISP> > > The second call to `window-total-width` returns 240, but it should hav= e > returned 192. I must admit that I don't have the faintest idea what `face-spec-recalc' is supposed to do. I don't understand its doc-string and don't know where further documentation about it can be found in the manuals. So I would be grateful if you or someone else provided me with the necessary information. Anyway. Why do you think that `window-total-width' should return 192 in the first call? In principle, face/font changes are supposed to keep the number of columns/lines unchanged so returning 240 seems reasonable to me. Unfortunately, the fact that ... > After splitting the window and deleting the other window > again, the correct value is returned. =2E.. seems to consitute a bug which, however, I haven't been able to reproduce here. One further puzzling aspect: Here, `face-spec-recalc' makes the frame so large that it goes off-screen and I can't see the modeline any more. And you seem to expect the window to shrink ... > Note that splitting the window vertically (`C-x 2`) does *not* fix the= > value returned by `window-total-width'. Hopefully not. Everything else would be strange. In any case, please evaluate (window--dump-frame) in IELM once immediately before you invoke `face-spec-recalc', once immediately after you invoked it, and once after you did C-x 1. You have to copy the results from a buffer called *window-frame-dump* (three times, because each dump overwrites the previous one). Please post the results here. > In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) > of 2014-10-22 on IdeaPad Could you try with current master/trunk? Lots of things changed in this area recently. martin