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#19194: 24.4.50; `window-body-width' is not dynamic relative to font size changes Date: Thu, 27 Nov 2014 10:44:56 +0100 Message-ID: <5476F298.5000205@gmx.at> References: <87h9xm6plp.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417081642 7936 80.91.229.3 (27 Nov 2014 09:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Nov 2014 09:47:22 +0000 (UTC) To: Joe Corneli , 19194@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 27 10:47:16 2014 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 1XtvfO-0002dv-E7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Nov 2014 10:47:14 +0100 Original-Received: from localhost ([::1]:38477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtvfN-0008E5-Rp for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Nov 2014 04:47:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtveK-0006hV-56 for bug-gnu-emacs@gnu.org; Thu, 27 Nov 2014 04:46:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtveE-0000cD-3r for bug-gnu-emacs@gnu.org; Thu, 27 Nov 2014 04:46:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtveE-0000c7-1T for bug-gnu-emacs@gnu.org; Thu, 27 Nov 2014 04:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XtveD-0007th-OP for bug-gnu-emacs@gnu.org; Thu, 27 Nov 2014 04:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Nov 2014 09:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19194 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19194-submit@debbugs.gnu.org id=B19194.141708151130296 (code B ref 19194); Thu, 27 Nov 2014 09:46:01 +0000 Original-Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 09:45:11 +0000 Original-Received: from localhost ([127.0.0.1]:46991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtvdP-0007sX-3x for submit@debbugs.gnu.org; Thu, 27 Nov 2014 04:45:11 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:63759) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtvdL-0007sN-7N for 19194@debbugs.gnu.org; Thu, 27 Nov 2014 04:45:08 -0500 Original-Received: from [88.117.52.129] ([88.117.52.129]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M6fXs-1Y5oBh3Aqi-00wXyu; Thu, 27 Nov 2014 10:45:05 +0100 In-Reply-To: <87h9xm6plp.fsf@gmail.com> X-Provags-ID: V03:K0:90Cw37OdIll8pSxa6cI4LRrn4jpgQ1kx4hh2ExUCWi7Wx3za1So 9txkDgXYuGniwc8N8J7UzGlICH0kgdoSy+ORZhkw0sw5AqTbvrUJpXTuz/D87aAyzcCjhrW tZq3M14J2noAEi5lzO7pkHVWvVFW6VCysAphQwEG0ju7L7wIvOWNvpOabqYefDnuyc/mcCF W4y08S7YnPfabL5HC94yQ== 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:96661 Archived-At: > Adjusting the font size, I would expect that the window's "body width" > would change -- more characters can be fit into the same amount of > screen space. Current behaviour does not match this expectation. > > M-: (window-body-width) RET [Note result.] > C-x C-- > M-: (window-body-width) RET [Result is the same.] > > The function is described: > > "This function returns the width, in columns, of the body of window > window." > > If for some reason the "nominal" number of columns needs to calculated > with reference to the default font, then there should be another > function to return the "actual" number of columns. The doc-string of `text-scale-adjust' is slightly misleading. (defun text-scale-adjust (inc) "Adjust the height of the default face by INC. AFAICT this does not change the height of the default face - it affects how the display engine calculates the height of text when displaying a buffer current at the time `text-scale-adjust' was called. I'm not sure whether we want to define the size of a window in terms of the buffer displayed in that window. One consequence of such a change would be that the sum of the total height of two windows might no more equal the total height of their parent window. If we did, we'd need a way to conveniently specify a buffer's default character width/height. Then we should probably redefine a number of functions like `shrink-window' or `split-window' to work in terms of that value. And maybe specify a mode to control that behavior. > ( I note one practical implication of the underlying issue here: > https://github.com/kiwanami/emacs-calfw/issues/45 ) If you told me how you get the "adjusted font size", I could tell you how to scale the value returned by `window-body-width' accordingly. martin