From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steve Purcell Newsgroups: gmane.emacs.bugs Subject: bug#19972: Font size change doesn't update (window-total-width) Date: Mon, 2 Mar 2015 17:23:58 +0000 Message-ID: <547071A4-097B-43D7-8C8E-F65107A68E6C@sanityinc.com> References: <874mq5o3di.fsf@fastmail.fm> <2B9A60CD-AAAA-40E8-B116-8A75A78B0DDC@sanityinc.com> <54F4998B.40507@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1425317121 17686 80.91.229.3 (2 Mar 2015 17:25:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 17:25:21 +0000 (UTC) Cc: 19972@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 18:25:12 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 1YSU5g-0005zP-8u for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 18:25:12 +0100 Original-Received: from localhost ([::1]:58451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSU5f-0002sp-GL for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 12:25:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSU5b-0002pe-NA for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 12:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSU5W-0000Yu-NK for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 12:25:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSU5W-0000Yd-Ip for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 12:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YSU5V-0002hS-Rp for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 12:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Mar 2015 17:25:01 +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.142531704910302 (code B ref 19972); Mon, 02 Mar 2015 17:25:01 +0000 Original-Received: (at 19972) by debbugs.gnu.org; 2 Mar 2015 17:24:09 +0000 Original-Received: from localhost ([127.0.0.1]:33046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSU4f-0002g6-Dm for submit@debbugs.gnu.org; Mon, 02 Mar 2015 12:24:09 -0500 Original-Received: from purcellpeople.com ([85.214.32.38]:33945 helo=h1189701.stratoserver.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSU4c-0002fT-EI for 19972@debbugs.gnu.org; Mon, 02 Mar 2015 12:24:07 -0500 Original-Received: from [192.168.1.103] (host86-175-248-64.range86-175.btcentralplus.com [86.175.248.64]) by h1189701.stratoserver.net (Postfix) with ESMTPSA id CB3EC8201B1; Mon, 2 Mar 2015 18:23:59 +0100 (CET) In-Reply-To: <54F4998B.40507@gmx.at> X-Mailer: Apple Mail (2.2070.6) 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:99973 Archived-At: On 2 Mar 2015, at 17:10, martin rudalics wrote: >=20 > > - Consider the case of full-screen frames, which never change in = pixel > > size. The window-width should change when the font size changes in > > this case too. >=20 > This is the case (hopefully) with Emacs 25 but not with Emacs 24.5. > Although some window managers may refuse to change the frame size even > with Emacs 24.5 as we've learned here. It=E2=80=99s not the case on OS X with Emacs HEAD from 19th Feb, at = least. > > - set-frame-font is a built-in function with a KEEP-SIZE param which > > tells it to try to preserve the pixel-size of the frame after the > > font has changed: my code is copied from there. >=20 > If you look at the implementation of this you will see that it first > resizes the frame (via x_new_font) and then tries to size it back to = the > original size. This will fail miserably when the frame was maximized > before (because maximization is a state and not just a specific size) > and will fail when the frame size was not an integral multiple of its > default character size (because `set-frame-font' does some strange > rounding). So never ever use `set-frame-font' with KEEP-SIZE non-nil. > With Emacs 25 you can do, for example, >=20 > (let ((frame-inhibit-implied-resize t)) > (custom-push-theme 'theme-face 'default 'user 'set '((t (:height = 128)))) > (face-spec-recalc 'default (selected-frame))) >=20 > unless you have set `frame-inhibit-implied-resize' to non-nil already. Interesting: I hadn=E2=80=99t seen that. The above snippet still results = in a changed frame size on my system, though.