GNU bug report logs - #19194
24.4.50; `window-body-width' is not dynamic relative to font size changes

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Joe Corneli <holtzermann17@HIDDEN>; merged with #20022; dated Wed, 26 Nov 2014 13:48:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 19194 20022. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 18:29:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 13:29:43 2014
Received: from localhost ([127.0.0.1]:53296 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Omc-0005QM-Ob
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:29:43 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:60474)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2Oma-0005Q6-Hg
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:29:41 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NGW009008EWS700@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 20:29:39 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW0097C8PEHL50@HIDDEN>;
 Sat, 20 Dec 2014 20:29:39 +0200 (IST)
Date: Sat, 20 Dec 2014 20:29:29 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5495B73C.6060006@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83ppbeqinq.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
 <54958C83.8010209@HIDDEN> <834msqs3ap.fsf@HIDDEN> <5495A466.7040802@HIDDEN>
 <83wq5mqne6.fsf@HIDDEN> <5495B73C.6060006@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 20 Dec 2014 18:51:56 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> Probably to know how many characters fit into a line.  With a
>  >> proportional font.
>  >
>  > But for a proportional font, that question has no meaningful answer.
>  > Using the maximum width could yield a result that it a gross
>  > underestimation.  I fail to see how this could be more useful than
>  > using the average width.
> 
> Are we sure that all numbers fit into the average width.  If not, we can
> get problems with line numbers.

Like I said: you will get a wrong answer either way.  I think this is
simply the wrong way to do it.  I cannot suggest a better way without
knowing more about the particular application.

> BTW you probably might want to close bugs 1255, 8379 and 10960 now ;-)

So can you ;-)

>  >> He wants the width of a default font "M" (where the default fount could
>  >> be proportional) filtered by the frame it appears on and the remapping
>  >> specified for the buffer the character appears in.
>  >
>  > Once you get the font used by a face on that frame and buffer, the
>  > font parameters are fixed.
> 
> I lost you here.  Does that mean that with proportional fonts an "M" and
> an "I" have different fonts?

I'm saying that specifying the font by a face on a frame makes any
"filtering" redundant.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 17:52:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 12:52:10 2014
Received: from localhost ([127.0.0.1]:53264 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2OCI-0004TO-Bx
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:52:10 -0500
Received: from mout.gmx.net ([212.227.17.20]:58566)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2OCG-0004TG-86
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:52:08 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx103)
 with ESMTPSA (Nemesis) id 0MBFBB-1Y9m3n1iMf-00ACbc; Sat, 20 Dec 2014 18:52:06
 +0100
Message-ID: <5495B73C.6060006@HIDDEN>
Date: Sat, 20 Dec 2014 18:51:56 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
 <54958C83.8010209@HIDDEN> <834msqs3ap.fsf@HIDDEN> <5495A466.7040802@HIDDEN>
 <83wq5mqne6.fsf@HIDDEN>
In-Reply-To: <83wq5mqne6.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:KQs2vg2ybYzfWCxMrvEdMph3Cb12DXGbSODh9xNoXveMIV43zwO
 w37rzS4IrkvpnZr7Itvk8MHcoioSfvVkqXTvlY7sc28Aj137j+a3A0doAMArGoj4fp/bYBw
 BdEicuL4dt0OBPKc2lKoKaJSRqt278ymFUiIw5MbjDemeJ87bv/C9LHluDNTfXVClrZx+T8
 JQOhQX5mHGu9V8ukmFW1A==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> Probably to know how many characters fit into a line.  With a
 >> proportional font.
 >
 > But for a proportional font, that question has no meaningful answer.
 > Using the maximum width could yield a result that it a gross
 > underestimation.  I fail to see how this could be more useful than
 > using the average width.

Are we sure that all numbers fit into the average width.  If not, we can
get problems with line numbers.

BTW you probably might want to close bugs 1255, 8379 and 10960 now ;-)

 >> He wants the width of a default font "M" (where the default fount could
 >> be proportional) filtered by the frame it appears on and the remapping
 >> specified for the buffer the character appears in.
 >
 > Once you get the font used by a face on that frame and buffer, the
 > font parameters are fixed.

I lost you here.  Does that mean that with proportional fonts an "M" and
an "I" have different fonts?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 16:47:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:47:27 2014
Received: from localhost ([127.0.0.1]:53238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2NBf-0002oZ-Kj
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:47:27 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:40469)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2NBd-0002oQ-9v
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:47:26 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NGW008003VUWZ00@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 18:47:23 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW0082D3YWKC50@HIDDEN>;
 Sat, 20 Dec 2014 18:47:21 +0200 (IST)
Date: Sat, 20 Dec 2014 18:47:13 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5495A466.7040802@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83wq5mqne6.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
 <54958C83.8010209@HIDDEN> <834msqs3ap.fsf@HIDDEN> <5495A466.7040802@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 20 Dec 2014 17:31:34 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  > I actually don't really understand the question.  What does "character
>  > width" mean when each character has a different width?  Do you (Joe)
>  > mean you want to know the actual width of each and every character?
> 
> The maximum character width.  That's why he proposes to use the width of
> an "M" for this.
> 
>  > If so, what for?
> 
> Probably to know how many characters fit into a line.  With a
> proportional font.

But for a proportional font, that question has no meaningful answer.
Using the maximum width could yield a result that it a gross
underestimation.  I fail to see how this could be more useful than
using the average width.

>  > In any case, if you do need the width of individual characters, take a
>  > look at font-get-glyphs (and font-at to get you the font for that).
> 
> He wants the width of a default font "M" (where the default fount could
> be proportional) filtered by the frame it appears on and the remapping
> specified for the buffer the character appears in.

Once you get the font used by a face on that frame and buffer, the
font parameters are fixed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 16:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:32:02 2014
Received: from localhost ([127.0.0.1]:53202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Mwk-0002Qb-HM
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:32:02 -0500
Received: from mout.gmx.net ([212.227.15.18]:60352)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2MwV-0002Pv-GV
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:32:00 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx001)
 with ESMTPSA (Nemesis) id 0MWCgz-1YQLxx3RCz-00XITI; Sat, 20 Dec 2014 17:31:44
 +0100
Message-ID: <5495A466.7040802@HIDDEN>
Date: Sat, 20 Dec 2014 17:31:34 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
 <54958C83.8010209@HIDDEN> <834msqs3ap.fsf@HIDDEN>
In-Reply-To: <834msqs3ap.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:TQ/7RvVNWNv44LP7PqnJes6aSGmFe9HreF6C94QNkIdCg+jZRQT
 vPYlVgUw65x38/Iekef6oPg8WMJp3heKdeCEDUtcYvD2rvS/KGlS2hyMGR+YUZTtb22A/8B
 sG+A+Rf7mMo31718j5D7hN9tnhaEE8VneKtaEN1yhajWs6+5KKZq30rk3517LxhlZ6hOSFi
 81N12X0i7H6NM6U87rDiw==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > I actually don't really understand the question.  What does "character
 > width" mean when each character has a different width?  Do you (Joe)
 > mean you want to know the actual width of each and every character?

The maximum character width.  That's why he proposes to use the width of
an "M" for this.

 > If so, what for?

Probably to know how many characters fit into a line.  With a
proportional font.

 > In any case, if you do need the width of individual characters, take a
 > look at font-get-glyphs (and font-at to get you the font for that).

He wants the width of a default font "M" (where the default fount could
be proportional) filtered by the frame it appears on and the remapping
specified for the buffer the character appears in.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 16:18:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:18:34 2014
Received: from localhost ([127.0.0.1]:53089 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Mjh-000212-Mj
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:18:34 -0500
Received: from mtaout26.012.net.il ([80.179.55.182]:37302)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2Mje-00020t-Hz
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:18:31 -0500
Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il
 (HyperSendmail v2007.08) id <0NGW001001XSVF00@HIDDEN> for
 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 18:17:41 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW00LCZ2LHP770@HIDDEN>; Sat, 20 Dec 2014 18:17:41 +0200 (IST)
Date: Sat, 20 Dec 2014 18:18:22 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54958C83.8010209@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <834msqs3ap.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
 <54958C83.8010209@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 20 Dec 2014 15:49:39 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: Eli Zaretskii <eliz@HIDDEN>, 19194 <at> debbugs.gnu.org
> 
>  > The one thing I'd add is an explanation of how "character width" is
>  > found or computed for variable-width fonts.  (E.g. is it the width of an
>  > "M"?)
> 
> Elsewhere I proposed:
> 
> (defun window-char-width (&optional window)
>    "Return default character width for WINDOW.
> WINDOW must be a live window and defaults to the selected one."
>    (setq window (window-normalize-window window t))
>    (with-current-buffer (window-buffer window)
>      (let* ((info (font-info (face-font 'default)))
>         (width (aref info 11)))
>        (if (> width 0)
>        width
>      (aref info 10)))))
> 
> You could try to experiment with this and either use
> 
> (width (aref info 10))
> 
> or
> 
> (width (aref info 7))
> 
> instead of (aref info 11).  Or use something like
> 
> (face-font 'default ?M) instead of (face-font 'default).
> 
> I use variable width fonts only in customization buffers, so I'm not
> very qualified at checking this myself.  We can use whatever you find
> here provided we can pack it into an argument of `window-body-width'.
> 
> And Eli certainly knows better, so wait.  Maybe my idea is silly.

I actually don't really understand the question.  What does "character
width" mean when each character has a different width?  Do you (Joe)
mean you want to know the actual width of each and every character?
If so, what for?

In any case, if you do need the width of individual characters, take a
look at font-get-glyphs (and font-at to get you the font for that).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 14:49:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 09:49:55 2014
Received: from localhost ([127.0.0.1]:52248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2LLv-0007v3-6Q
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:49:55 -0500
Received: from mout.gmx.net ([212.227.15.15]:60596)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2LLs-0007uu-6T
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:49:53 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx002)
 with ESMTPSA (Nemesis) id 0Mbxdm-1YJSWm1xxO-00JIr6; Sat, 20 Dec 2014 15:49:50
 +0100
Message-ID: <54958C83.8010209@HIDDEN>
Date: Sat, 20 Dec 2014 15:49:39 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Joe Corneli <holtzermann17@HIDDEN>
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN> <87r3vuedxm.fsf@HIDDEN>
In-Reply-To: <87r3vuedxm.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:oHttwfo60fA3h+ygP7zXVnFKuwNG/pwoT2R8m05fcmwAw3dTx9G
 0f57GFj/5gXySirzb2dY9XbYxUikEnYw7Go0Nb6nMwg5EYjnz9S020i02RlUi+cDjz3u6C4
 fIMY/FtqDgBGmqwuv9fK5dUnOo8BR1u7906bai62dgir9IsND9OgQQ5TL9wooA/Iw6ExXgP
 LHUnf08KQ3cm6SlmM9D4A==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: Eli Zaretskii <eliz@HIDDEN>, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > The one thing I'd add is an explanation of how "character width" is
 > found or computed for variable-width fonts.  (E.g. is it the width of an
 > "M"?)

Elsewhere I proposed:

(defun window-char-width (&optional window)
   "Return default character width for WINDOW.
WINDOW must be a live window and defaults to the selected one."
   (setq window (window-normalize-window window t))
   (with-current-buffer (window-buffer window)
     (let* ((info (font-info (face-font 'default)))
        (width (aref info 11)))
       (if (> width 0)
       width
     (aref info 10)))))

You could try to experiment with this and either use

(width (aref info 10))

or

(width (aref info 7))

instead of (aref info 11).  Or use something like

(face-font 'default ?M) instead of (face-font 'default).

I use variable width fonts only in customization buffers, so I'm not
very qualified at checking this myself.  We can use whatever you find
here provided we can pack it into an argument of `window-body-width'.

And Eli certainly knows better, so wait.  Maybe my idea is silly.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 11:52:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 06:52:27 2014
Received: from localhost ([127.0.0.1]:52178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2IaA-00021U-Oc
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:52:26 -0500
Received: from mail-wg0-f50.google.com ([74.125.82.50]:60830)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <holtzermann17@HIDDEN>) id 1Y2Ia9-00021K-0u
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:52:25 -0500
Received: by mail-wg0-f50.google.com with SMTP id a1so3314388wgh.37
 for <19194 <at> debbugs.gnu.org>; Sat, 20 Dec 2014 03:52:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type;
 bh=pehWb5zv3QzTV0Ax8dXIjgL1JshsvR8y0Vz7fLFO2mA=;
 b=kvL7K2q1bl1LxjzJnoION9rN2C7px3ijNU9YoerY4zzxkDYO/Db3QHbZlSYf+rHVJk
 smCzoU8jjP4OuM6aUWTnjAiopCOrmIyYbdF3zLgrArWtJKzm6n/Z4c7egudUMbO21cSO
 03t9VSb8EGNj4yGewPOXbFXrf/Ve/HLdUFA5iv5JoRBLf1AOoJwkUXWzpTDne3FN6MOy
 SdOtb7GBE4hgJ/oOD66vWt037mPrz+Y8CS7AbaT99NG2i8ednZ9FGkQDOXnU7xfVJw5h
 res+zxNeJaVfqJg4mw8LieDzbu83U52WkfY/ghHQoY2Jbz4pFhbtlIJCKK65SGAWo8HZ
 yBKg==
X-Received: by 10.180.206.165 with SMTP id lp5mr14141488wic.83.1419076344216; 
 Sat, 20 Dec 2014 03:52:24 -0800 (PST)
Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net.
 [213.105.32.80])
 by mx.google.com with ESMTPSA id u9sm16083225wjy.37.2014.12.20.03.52.21
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Dec 2014 03:52:22 -0800 (PST)
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
 <54954B15.7040002@HIDDEN>
From: Joe Corneli <holtzermann17@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54954B15.7040002@HIDDEN>
Date: Sat, 20 Dec 2014 11:52:21 +0000
Message-ID: <87r3vuedxm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 19194
Cc: Eli Zaretskii <eliz@HIDDEN>, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)


On Sat, Dec 20 2014, martin rudalics wrote:

>  > Now done on trunk.
>
> Thank you.
>
> Mr. Corneli: How about a doc-string that goes as follows?

The one thing I'd add is an explanation of how "character width" is
found or computed for variable-width fonts.  (E.g. is it the width of an
"M"?)

> If the optional argument PIXELWISE is nil, return the largest integer
> smaller than WINDOW's pixel width divided by the character width of
> WINDOW's frame.  If PIXELWISE is the symbol `window', return the largest
> integer smaller than WINDOW's pixel width divided by the character width
> of WINDOW.  In either of these cases, if a column at the right of the
> text area is only partially visible, that column is not counted.
>
> PIXELWISE t means return the exact width of the text area in pixels.
> Other values of PIXELWISE are reserved for future use.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 20 Dec 2014 10:10:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 05:10:47 2014
Received: from localhost ([127.0.0.1]:52131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Gzm-0007sn-N3
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:10:46 -0500
Received: from mout.gmx.net ([212.227.17.21]:58302)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2Gzk-0007se-J6
 for 19194 <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:10:45 -0500
Received: from [178.190.22.249] ([178.190.22.249]) by mail.gmx.com (mrgmx103)
 with ESMTPSA (Nemesis) id 0MSdRI-1YRXdd005k-00RXNR;
 Sat, 20 Dec 2014 11:10:41 +0100
Message-ID: <54954B15.7040002@HIDDEN>
Date: Sat, 20 Dec 2014 11:10:29 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN> <83r3vvsa0p.fsf@HIDDEN>
In-Reply-To: <83r3vvsa0p.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:8jpGMrHgxPWAmeLB7h8l+mzvVzmXliJ5RIkprABgDWZibp6t5X+
 jh/Yv3nPau+5fd5uf3LAhwGRg/Z3wbn5oG79rhFBB70DHcJrLmYMezCbbx634qUJWIlkc+0
 7ta9j3WkZ73DKdsqB7jPPYRe6uiuWfiXiH8KM36TgOZfLr+IceI41KV2VNajrB560QbyaLv
 Cp2QhlKMg/jwcxIyFStWA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > Now done on trunk.

Thank you.

Mr. Corneli: How about a doc-string that goes as follows?


(window-body-width &optional WINDOW PIXELWISE)

Return the width of WINDOW's text area.

WINDOW must be a live window and defaults to the selected one.  The
return value does not include any vertical dividers, fringes or marginal
areas, or scroll bars.

If the optional argument PIXELWISE is nil, return the largest integer
smaller than WINDOW's pixel width divided by the character width of
WINDOW's frame.  If PIXELWISE is the symbol `window', return the largest
integer smaller than WINDOW's pixel width divided by the character width
of WINDOW.  In either of these cases, if a column at the right of the
text area is only partially visible, that column is not counted.

PIXELWISE t means return the exact width of the text area in pixels.
Other values of PIXELWISE are reserved for future use.


martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 19 Dec 2014 19:40:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 19 14:40:59 2014
Received: from localhost ([127.0.0.1]:51807 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y23Q3-0006Dm-Gf
	for submit <at> debbugs.gnu.org; Fri, 19 Dec 2014 14:40:59 -0500
Received: from mtaout28.012.net.il ([80.179.55.184]:57549)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y23Q0-0006Db-M0
 for 19194 <at> debbugs.gnu.org; Fri, 19 Dec 2014 14:40:57 -0500
Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il
 (HyperSendmail v2007.08) id <0NGU00G00GU2SF00@HIDDEN> for
 19194 <at> debbugs.gnu.org; Fri, 19 Dec 2014 21:38:40 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGU00BGYH8FN370@HIDDEN>; Fri, 19 Dec 2014 21:38:40 +0200 (IST)
Date: Fri, 19 Dec 2014 21:40:54 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5478C11C.6050207@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83r3vvsa0p.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 28 Nov 2014 19:38:20 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> OK.  Now how do I get the `default-font-width' from that?
>  >
>  > You need help from Emacs, because it knows everything about that
>  > font's metrics.  But we don't have an API for that for now.
> 
> I see.  Can you provide one?

Now done on trunk.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 19:20:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 14:20:09 2014
Received: from localhost ([127.0.0.1]:48665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuR5M-0002sX-Od
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 14:20:09 -0500
Received: from mtaout29.012.net.il ([80.179.55.185]:41321)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XuR5J-0002sN-J2
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 14:20:07 -0500
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NFR00O00JUJM200@HIDDEN> for
 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 21:17:59 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFR00J2RK9ZT260@HIDDEN>; Fri, 28 Nov 2014 21:17:59 +0200 (IST)
Date: Fri, 28 Nov 2014 21:20:05 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5478C11C.6050207@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83y4qvku8q.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN> <5478C11C.6050207@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 28 Nov 2014 19:38:20 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> That's what I'm trying to fathom out here all the time.  So when
>  >> calculating the actual height of a character as it will be displayed in
>  >> a window I have to apply (in some order) the height attribute specified
>  >> by (1) the font of the frame the window belongs to, (2) the font of the
>  >> buffer shown in the window, and (3) the font of the default face.
>  >
>  > We always use the current default face's font for this.  Otherwise,
>  > you get to a problem that IMO is insoluble even in principle.
> 
> But doesn't that imply that `frame-char-height' is just an artifact?

It's useful for dealing with measures in canonical character units.

>  >> OK.  Now how do I get the `default-font-width' from that?
>  >
>  > You need help from Emacs, because it knows everything about that
>  > font's metrics.  But we don't have an API for that for now.
> 
> I see.  Can you provide one?

Added to my todo.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 18:38:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 13:38:33 2014
Received: from localhost ([127.0.0.1]:48652 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuQR7-0001pN-J9
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 13:38:33 -0500
Received: from mout.gmx.net ([212.227.15.15]:56900)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XuQR5-0001pC-3n
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 13:38:32 -0500
Received: from [188.22.39.122] ([188.22.39.122]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0Lb5GD-1YInt63prV-00kdUj; Fri, 28 Nov 2014 19:38:30
 +0100
Message-ID: <5478C11C.6050207@HIDDEN>
Date: Fri, 28 Nov 2014 19:38:20 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
 <83h9xjn1zz.fsf@HIDDEN>
In-Reply-To: <83h9xjn1zz.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:P35jrbDMGRYX98ahV/olNYHUDmZhUJHn+6/JIHtcXqz3Uctdsrd
 NQ9l/Y4LpvQOhGg/Ca0GZ/0/ldycg4e2S/G1jztLbE5n2LO/+c7m3feTD59cBJyvqEeC81s
 ORBXU4yFaefNRdeqMpSxlMEja+aCMUr8212ggf71WLWntnRnQ5cwuTHgOyq1tw3Ld7dXwdV
 i2/ST8tL6WdwM0YSzS3Jg==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> That's what I'm trying to fathom out here all the time.  So when
 >> calculating the actual height of a character as it will be displayed in
 >> a window I have to apply (in some order) the height attribute specified
 >> by (1) the font of the frame the window belongs to, (2) the font of the
 >> buffer shown in the window, and (3) the font of the default face.
 >
 > We always use the current default face's font for this.  Otherwise,
 > you get to a problem that IMO is insoluble even in principle.

But doesn't that imply that `frame-char-height' is just an artifact?

 >> OK.  Now how do I get the `default-font-width' from that?
 >
 > You need help from Emacs, because it knows everything about that
 > font's metrics.  But we don't have an API for that for now.

I see.  Can you provide one?

Thanks, martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 08:49:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 03:49:41 2014
Received: from localhost ([127.0.0.1]:48098 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuHFF-0008Vm-Ex
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 03:49:41 -0500
Received: from mtaout29.012.net.il ([80.179.55.185]:53392)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XuHFC-0008Va-7k
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 03:49:39 -0500
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NFQ00N00QQGO400@HIDDEN> for
 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 10:47:33 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFQ00G2LR39TL80@HIDDEN>; Fri, 28 Nov 2014 10:47:33 +0200 (IST)
Date: Fri, 28 Nov 2014 10:49:36 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54782441.3030600@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83h9xjn1zz.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN> <54782441.3030600@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 28 Nov 2014 08:29:05 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  > Faces are frame-specific.  The same face can have different attributes
>  > on each frame, and that includes the size.
> 
> That's what I'm trying to fathom out here all the time.  So when
> calculating the actual height of a character as it will be displayed in
> a window I have to apply (in some order) the height attribute specified
> by (1) the font of the frame the window belongs to, (2) the font of the
> buffer shown in the window, and (3) the font of the default face.

We always use the current default face's font for this.  Otherwise,
you get to a problem that IMO is insoluble even in principle.

>  >> Is this the final value as it would be displayed or could the height
>  >> of "the font of the frame's 'default' face" get mixed in afterwards?
>  >
>  > The former, I think.
> 
> OK.  Now how do I get the `default-font-width' from that?

You need help from Emacs, because it knows everything about that
font's metrics.  But we don't have an API for that for now.

>  > default-line-height includes the line-spacing.
> 
> I see.  Silly of me to ask.
> 
> The doc-string of this should be slightly improved because OT1H
> `line-spacing' is buffer-local and OTOH "the frame" in
> 
>    The value includes `line-spacing', if any, defined for the buffer
>    or the frame.
> 
> is slightly ambiguous.

It's ambiguous on purpose: the line-spacing can be specified in
several ways.  Feel free to improve the doc string.

>  >>   > Btw, the OP wanted the width of the window, not its height, AFAIR.
>  >>
>  >> ... we would need `window-screen-columns' too.
>  >
>  > That will be harder, unless we change some APIs.  We currently don't
>  > have the font width in what font-info returns.
> 
> Is there a way to approximate the "width of a character" in points from
> (1) its height and (2) its width attribute?

There's no need: the width of a font is well defined, and the display
engine uses it all the time.  We just don't expose it in the font-info
API; we should add that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 08:42:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 03:42:06 2014
Received: from localhost ([127.0.0.1]:48094 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuH7u-0008JZ-Ky
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 03:42:06 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:45414)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XuH7r-0008JQ-S6
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 03:42:05 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NFQ00100QKLNF00@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Fri, 28 Nov 2014 10:42:01 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFQ001XPQU1MG10@HIDDEN>;
 Fri, 28 Nov 2014 10:42:01 +0200 (IST)
Date: Fri, 28 Nov 2014 10:42:01 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <547823EA.6060608@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83iohzn2cm.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN> <54776EFA.8090104@HIDDEN> <83zjbcmqgj.fsf@HIDDEN>
 <54778260.1070104@HIDDEN> <83vbm0mlc3.fsf@HIDDEN> <547823EA.6060608@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 28 Nov 2014 08:27:38 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> Hmm... I'm lost.  Which face is referenced by the default face?
>  >
>  > The face whose symbol is 'default', e.g.:
>  >
>  >    (face-font 'default)
>  >     => "-outline-Courier New-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1"
> 
> But that is a font.

Yes.  I just demonstrated how you can reference that face by the
'default' symbol, that's all.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 07:29:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 02:29:20 2014
Received: from localhost ([127.0.0.1]:48080 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuFzU-0006S2-5p
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:29:20 -0500
Received: from mout.gmx.net ([212.227.17.22]:50171)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XuFzR-0006Rs-DZ
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:29:17 -0500
Received: from [88.117.48.182] ([88.117.48.182]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0LcWSI-1YMPHQ2Lp8-00ju83; Fri, 28 Nov 2014 08:29:14
 +0100
Message-ID: <54782441.3030600@HIDDEN>
Date: Fri, 28 Nov 2014 08:29:05 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN> <83tx1kml24.fsf@HIDDEN>
In-Reply-To: <83tx1kml24.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:rTzC76+PhvgIADM8VcFldJ4/QPUr2rZEyVE6DU+V3m/Adb944Yh
 riPtIljN9woH91XvRDanVMDH3JNP4pV43BMPMP1vN0KeBJwAjKtT+ic6s8a5QXYdQgxuTnO
 Yhc79ZiaFgI+IaUxJ6FmBNMuxmxbnS6+mx3riSdlqH8oxWmHtmfQ77IBZTspeJ/8oUdY+/f
 yhylcauoH1YhaKjAEIW9Q==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > Faces are frame-specific.  The same face can have different attributes
 > on each frame, and that includes the size.

That's what I'm trying to fathom out here all the time.  So when
calculating the actual height of a character as it will be displayed in
a window I have to apply (in some order) the height attribute specified
by (1) the font of the frame the window belongs to, (2) the font of the
buffer shown in the window, and (3) the font of the default face.

 >>   > You mean, like what default-font-height returns?
 >>
 >> Does this take text scaling into account?
 >
 > Yes.  You can try it yourself: call it before and after "C-x C-+", and
 > see for yourself.

I did now.

 >> Is this the final value as it would be displayed or could the height
 >> of "the font of the frame's 'default' face" get mixed in afterwards?
 >
 > The former, I think.

OK.  Now how do I get the `default-font-width' from that?

 >> And how does `default-font-height' differ from
 >> `default-line-height'?
 >
 > default-line-height includes the line-spacing.

I see.  Silly of me to ask.

The doc-string of this should be slightly improved because OT1H
`line-spacing' is buffer-local and OTOH "the frame" in

   The value includes `line-spacing', if any, defined for the buffer
   or the frame.

is slightly ambiguous.

 >>   > Btw, the OP wanted the width of the window, not its height, AFAIR.
 >>
 >> ... we would need `window-screen-columns' too.
 >
 > That will be harder, unless we change some APIs.  We currently don't
 > have the font width in what font-info returns.

Is there a way to approximate the "width of a character" in points from
(1) its height and (2) its width attribute?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 07:27:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 02:27:51 2014
Received: from localhost ([127.0.0.1]:48075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuFy2-0006PI-Mk
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:27:50 -0500
Received: from mout.gmx.net ([212.227.17.20]:53465)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XuFy0-0006P9-SK
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:27:49 -0500
Received: from [88.117.48.182] ([88.117.48.182]) by mail.gmx.com (mrgmx102)
 with ESMTPSA (Nemesis) id 0Lo3IS-1YN18k3Rsm-00g1v2; Fri, 28 Nov 2014 08:27:46
 +0100
Message-ID: <547823EA.6060608@HIDDEN>
Date: Fri, 28 Nov 2014 08:27:38 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN> <54776EFA.8090104@HIDDEN> <83zjbcmqgj.fsf@HIDDEN>
 <54778260.1070104@HIDDEN> <83vbm0mlc3.fsf@HIDDEN>
In-Reply-To: <83vbm0mlc3.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:9cWcXivzExRitgxsxaJPGA3S6KPZgGuMuV3RLSrG/B+QoGXvtvV
 JnnOpSuDcbsKykN7oI9BD7YMu/juENE6ntkgAXPjzRu4hjJGhVOFCmPMcvuhrqDQrg39kXN
 dBId+iYa0mIwO+J7p2cVqncQqpYNcXqAr4xv8MPHI1XqXslSFufsTbEo6CP9jR1vUfmoIbk
 F/frVlefrTqOO57LV+9WA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> Hmm... I'm lost.  Which face is referenced by the default face?
 >
 > The face whose symbol is 'default', e.g.:
 >
 >    (face-font 'default)
 >     => "-outline-Courier New-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1"

But that is a font.  I must be stuck in some biased assumption about
fonts and face.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 28 Nov 2014 07:27:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 28 02:27:43 2014
Received: from localhost ([127.0.0.1]:48072 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XuFxv-0006Ox-7w
	for submit <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:27:43 -0500
Received: from mout.gmx.net ([212.227.17.20]:64182)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XuFxs-0006Ok-MB
 for 19194 <at> debbugs.gnu.org; Fri, 28 Nov 2014 02:27:42 -0500
Received: from [88.117.48.182] ([88.117.48.182]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0MDV5t-1XgE8F0hIr-00Gt9D; Fri, 28 Nov 2014 08:27:38
 +0100
Message-ID: <547823E2.2070104@HIDDEN>
Date: Fri, 28 Nov 2014 08:27:30 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Joe Corneli <holtzermann17@HIDDEN>
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN>
 <87a93cqtob.fsf@HIDDEN>
In-Reply-To: <87a93cqtob.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:qXboVjz93IRS5q5BDJ4B7AAjDTYTxQOVByhgCSFrV/iDabqmeHa
 s5223/4O5boeCM75+GV1lRaYAeQk1yiBEQpzqCE/4j5ze4MlrN5rWlkLACLZnCRjZbEcvk6
 1IgRXbWkmLpJuj6kKO21NSDLEDhvYp0DFSoueVla+ernv+pjd4Ah28JIEP1/u/xoMmJmwJL
 5au093nnNUksmSjIf/Fpw==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> What is the width of a buffer?  What are em-lenght units?
 >
 > I mean, the distance (in useful units!) from the left side of the
 > buffer,

=2E.. a buffer has no "left side" unless you mean the value of how many
columns the buffer has been scrolled horizontally in some window ...

 > as displayed within a given window, to the right side of that
 > window.  If the buffer is displayed using *a fixed width font*, then o=
ne
 > useful unit is *columns*, i.e. the number of columns that can be
 > displayed before line wrap or continuation kicks in.  However, if the
 > buffer is displayed using a variable-width font, then "columns" is *no=
t*
 > necessarily a meaningful unit -- as has been pointed out in the earlie=
r
 > discussion.  In this case, see below for "ems."
 >
 > To be clear, the width of the *window* calculated in non-buffer-specif=
ic
 > units is not generally "useful" for the purpose of measuring the numbe=
r
 > of characters that can be fit, horizontally, into the buffer.

".., into the window" I presume.  Is it that what you want to do: Fit
characters into a window?

 > Nevertheless, if the window is displayed using *the default face* at t=
he
 > default scale (and if the default font happens to be fixed width!) the=
n
 > `window-body-width' does indeed return the number of columns.

The number of columns available for displaying the buffer in the window.

 >    =C2=ABAn em is a unit in the field of typography, equal to the curr=
ently
 >    specified point size. For example, one em in a 16-point typeface is=
 16
 >    points. Therefore, this unit is the same for all typefaces at a giv=
en
 >    point size. [...] The name "em" was originally a reference to the
 >    width of the the capital "M" in the typeface and size being used,
 >    which was often the same as the point size.=C2=BB

So you mean the width of a default face "M" in points here?  No idea how
to get that.  IIRC `nlinum-mode' tries to approximate that somehow.

 >> (3) `text-scale-mode-amount' constitutes a request to the display eng=
ine
 >>       to scale a face height.  What shall we do when our target machi=
ne
 >>       can't display the character with the requested height and uses,=
 for
 >>       example, the nearest available height instead?
 >
 > Presumably the function should fall back to the height (and
 > corresponding scale factor) that is actually used.  This is an edge ca=
se
 > that I hadn't considered!

Apparently it's possible to get the face actually used, but I don't
understand how.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 20:43:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 15:43:00 2014
Received: from localhost ([127.0.0.1]:47946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu5u0-00056r-2i
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:43:00 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:45442)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xu5tx-00056g-OJ
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:42:58 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NFP00H00T1F0J00@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Thu, 27 Nov 2014 22:42:56 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFP00GJDTJKMY60@HIDDEN>;
 Thu, 27 Nov 2014 22:42:56 +0200 (IST)
Date: Thu, 27 Nov 2014 22:43:15 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54778275.1090007@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83tx1kml24.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
 <54778275.1090007@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 27 Nov 2014 20:58:45 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
> Could you try to explain how the height of a character assigned the
> default face (the one whose attributes are all specified) can change
> in dependence of the frame where the character is displayed?

Faces are frame-specific.  The same face can have different attributes
on each frame, and that includes the size.

>  > You mean, like what default-font-height returns?
> 
> Does this take text scaling into account?

Yes.  You can try it yourself: call it before and after "C-x C-+", and
see for yourself.

> Is this the final value as it would be displayed or could the height
> of "the font of the frame's 'default' face" get mixed in afterwards?

The former, I think.

> And how does `default-font-height' differ from
> `default-line-height'?

default-line-height includes the line-spacing.

>  > Btw, the OP wanted the width of the window, not its height, AFAIR.
> 
> ... we would need `window-screen-columns' too.

That will be harder, unless we change some APIs.  We currently don't
have the font width in what font-info returns.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 20:37:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 15:37:08 2014
Received: from localhost ([127.0.0.1]:47942 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu5oK-0004y4-CA
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:37:08 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:44612)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xu5oH-0004xt-JN
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:37:06 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NFP00H00T1F0J00@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Thu, 27 Nov 2014 22:37:03 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFP00GU4T9LU830@HIDDEN>;
 Thu, 27 Nov 2014 22:36:57 +0200 (IST)
Date: Thu, 27 Nov 2014 22:37:16 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54778260.1070104@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83vbm0mlc3.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN> <54776EFA.8090104@HIDDEN> <83zjbcmqgj.fsf@HIDDEN>
 <54778260.1070104@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 27 Nov 2014 20:58:24 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> On a per-buffer basis.  The height of the default face is unaffected
>  >> here.
>  >
>  > We both talk about the "default face", but mean 2 different things, it
>  > seems.  I mean the face that is referenced by 'default'.
> 
> Hmm... I'm lost.  Which face is referenced by the default face?

The face whose symbol is 'default', e.g.:

  (face-font 'default)
   => "-outline-Courier New-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1"




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 20:23:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 15:23:37 2014
Received: from localhost ([127.0.0.1]:47936 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu5bE-0004cK-Uh
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:23:37 -0500
Received: from mail-wg0-f43.google.com ([74.125.82.43]:64238)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <holtzermann17@HIDDEN>) id 1Xu5bC-0004cA-OF
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 15:23:35 -0500
Received: by mail-wg0-f43.google.com with SMTP id l18so7251390wgh.30
 for <19194 <at> debbugs.gnu.org>; Thu, 27 Nov 2014 12:23:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type:content-transfer-encoding;
 bh=mrIAqwXNxjq3ojOL/sDiAO2CXeCCxspKtwcM9w0P8BI=;
 b=FPLgqPUwcTodfpHmfWbsTP+1jWkhPRrTd/E4DzIT9PErpyY306PBJAycfWe1uNa/cr
 qhimXjWX53UBwK5lCiViREAltyRfeKGwE6stWP4NQCGn7VmFiIz0dhkoEGqLkgfG9kDG
 7bICxsSRONl3W5QcvW+DxRH6ippHSS/y2Kx9uHisNo4LecwLpZt+inKBxVnBCYEGYUgq
 2q99zoriL4aKrXTDwSutNa6PHPbmv9bIP+nXb9fWzPNoUm1Y8FoWPkrNCiEqfGbA7MJf
 HvoltlZT//nJ42q287XyTVgRh5vu19xq/3YydvXZU4EC2F8E2Sk43UAQPUid2lv51Rst
 2JXw==
X-Received: by 10.180.24.193 with SMTP id w1mr55450117wif.34.1417119814151;
 Thu, 27 Nov 2014 12:23:34 -0800 (PST)
Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net.
 [213.105.32.80])
 by mx.google.com with ESMTPSA id qg11sm6199496wic.17.2014.11.27.12.23.32
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 27 Nov 2014 12:23:33 -0800 (PST)
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN>
From: Joe Corneli <holtzermann17@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54776EED.9090303@HIDDEN>
Date: Thu, 27 Nov 2014 20:23:32 +0000
Message-ID: <87a93cqtob.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)


On Thu, Nov 27 2014, martin rudalics wrote:

>  > I think you are totally right.  To keep the buffer and window
>  > distinction properly, my note should probably be read as a feature
>  > request, not a bug report.  The request is for a function such as
>  > `buffer-body-width' that would return the width of the current displayed
>  > buffer in em-length units.
>
> What is the width of a buffer?  What are em-lenght units?

I mean, the distance (in useful units!) from the left side of the
buffer, as displayed within a given window, to the right side of that
window.  If the buffer is displayed using *a fixed width font*, then one
useful unit is *columns*, i.e. the number of columns that can be
displayed before line wrap or continuation kicks in.  However, if the
buffer is displayed using a variable-width font, then "columns" is *not*
necessarily a meaningful unit -- as has been pointed out in the earlier
discussion.  In this case, see below for "ems."

To be clear, the width of the *window* calculated in non-buffer-specific
units is not generally "useful" for the purpose of measuring the number
of characters that can be fit, horizontally, into the buffer.
Nevertheless, if the window is displayed using *the default face* at the
default scale (and if the default font happens to be fixed width!) then
`window-body-width' does indeed return the number of columns.

From Wikipedia:

  «An em is a unit in the field of typography, equal to the currently
  specified point size. For example, one em in a 16-point typeface is 16
  points. Therefore, this unit is the same for all typefaces at a given
  point size. [...] The name "em" was originally a reference to the
  width of the the capital "M" in the typeface and size being used,
  which was often the same as the point size.»

> (2) `text-scale-mode-amount' is buffer-local.  So we have to choose the
>      right buffer before evaluating it.

I agree, this is indeed an important.

> (3) `text-scale-mode-amount' constitutes a request to the display engine
>      to scale a face height.  What shall we do when our target machine
>      can't display the character with the requested height and uses, for
>      example, the nearest available height instead?

Presumably the function should fall back to the height (and
corresponding scale factor) that is actually used.  This is an edge case
that I hadn't considered!





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 19:58:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 14:58:57 2014
Received: from localhost ([127.0.0.1]:47919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu5DN-0003wF-5w
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 14:58:57 -0500
Received: from mout.gmx.net ([212.227.15.18]:57549)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Xu5DL-0003w7-1d
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 14:58:55 -0500
Received: from [188.22.37.213] ([188.22.37.213]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0Lh7PL-1YE4fz1nnT-00oSvo; Thu, 27 Nov 2014 20:58:52
 +0100
Message-ID: <54778275.1090007@HIDDEN>
Date: Thu, 27 Nov 2014 20:58:45 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN> <83y4qwmq66.fsf@HIDDEN>
In-Reply-To: <83y4qwmq66.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:MGnWDFXDsbb+m+A3qfSrxeP/6ahFOqcAczGQVLcPTtCzGU5x3gJ
 QLlVNRYfbm695Med0O7ZtVcXt5N5BO2iOuhoRmVYJ3m6bykAUiPVdT2rdYHN7QWU8W95Pc0
 CPwXkYge6Pr5U++mUwGUr7oZgEalYI/sw5Oyj5mkgMo/UU5s1YldsDrNWaGSaZc/4NMyqUz
 VEWraKStAcG5PKfpieerg==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> (4) I don't know whether and how the frame's `font' parameter can/should
 >>       affect the height of the "default face".  Likely this is not a
 >>       problem - Eli will tell.
 >
 > Sorry, I don't understand the question.  In particular, a frame
 > doesn't have a font; a face does.

I meant that from section 28.3.3.8 "Font and Color Parameters" of the
Elisp manual:

`font'
      The name of the font for displaying text in the frame.  This is a
      string, either a valid font name for your system or the name of an
      Emacs fontset (*note Fontsets::).  It is equivalent to the `font'
      attribute of the `default' face.

 > Perhaps you are talking about the
 > font of the frame's 'default' face -- this is what the frame's 'font'
 > parameter determines, AFAIR.

Maybe.  The nomenclature is incomprehensible for me.  Could you try to
explain how the height of a character assigned the default face (the one
whose attributes are all specified) can change in dependence of the
frame where the character is displayed?

 > You mean, like what default-font-height returns?

Does this take text scaling into account?  Is this the final value as it
would be displayed or could the height of "the font of the frame's
'default' face" get mixed in afterwards?  And how does
`default-font-height' differ from `default-line-height'?

In any case, somehing like `default-font-width' seems all we need.

 >> Next we should try to incorporate this in `window-body-height'
 >
 > You mean, like what window-screen-lines returns?

This sounds like a good idea as well, but then ...

 > Btw, the OP wanted the width of the window, not its height, AFAIR.

... we would need `window-screen-columns' too.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 19:58:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 14:58:42 2014
Received: from localhost ([127.0.0.1]:47916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu5D7-0003vl-Pr
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 14:58:42 -0500
Received: from mout.gmx.net ([212.227.15.18]:51674)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Xu5D3-0003vX-Aq
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 14:58:38 -0500
Received: from [188.22.37.213] ([188.22.37.213]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0MhAVV-1XXtd31UOH-00MPPt; Thu, 27 Nov 2014 20:58:32
 +0100
Message-ID: <54778260.1070104@HIDDEN>
Date: Thu, 27 Nov 2014 20:58:24 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN> <54776EFA.8090104@HIDDEN> <83zjbcmqgj.fsf@HIDDEN>
In-Reply-To: <83zjbcmqgj.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:PHrSpwQIbjhMFhGCjSgb/Q1jCHdP9JXjfR5mVactURa3ZADjb4I
 yMwKblteisOZo0NuWGaZn9Sq2bdXqv6OgGrXLwVmoI857FOkfm9p9jHTFOUHqFtQ7pt9MWO
 IPqZ4hdYKCP5mfHccWacFmdl+hj77yb1U8df3eGwZLZzLdSMnW2NWsHSwcvcK75uiMPiHGR
 /uQznEbugWcxqh6kSoVVw==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> On a per-buffer basis.  The height of the default face is unaffected
 >> here.
 >
 > We both talk about the "default face", but mean 2 different things, it
 > seems.  I mean the face that is referenced by 'default'.

Hmm... I'm lost.  Which face is referenced by the default face?  From
the manual I only know that "all other faces implicitly inherit from
it".  Probably that's the clue of face remappping ...

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 18:52:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 13:52:35 2014
Received: from localhost ([127.0.0.1]:47908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu4B8-0002DO-J0
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:52:34 -0500
Received: from mtaout28.012.net.il ([80.179.55.184]:35463)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xu4B6-0002DF-9G
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:52:33 -0500
Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il
 (HyperSendmail v2007.08) id <0NFP00600O42YH00@HIDDEN> for
 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 20:50:01 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFP001KQOBDSQ50@HIDDEN>; Thu, 27 Nov 2014 20:50:01 +0200 (IST)
Date: Thu, 27 Nov 2014 20:52:49 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54776EED.9090303@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83y4qwmq66.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN> <54776EED.9090303@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 27 Nov 2014 19:35:25 +0100
> From: martin rudalics <rudalics@HIDDEN>
> Cc: 19194 <at> debbugs.gnu.org
> 
> (4) I don't know whether and how the frame's `font' parameter can/should
>      affect the height of the "default face".  Likely this is not a
>      problem - Eli will tell.

Sorry, I don't understand the question.  In particular, a frame
doesn't have a font; a face does.  Perhaps you are talking about the
font of the frame's 'default' face -- this is what the frame's 'font'
parameter determines, AFAIR.

> As I said before, I'd rather have a buffer-local equivalent of the
> variable `frame-char-height', something like `buffer-char-height',
> instead of having to find out by myself what the correct value is.

You mean, like what default-font-height returns?

> Next we should try to incorporate this in `window-body-height'

You mean, like what window-screen-lines returns?

Btw, the OP wanted the width of the window, not its height, AFAIR.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 18:46:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 13:46:22 2014
Received: from localhost ([127.0.0.1]:47904 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu457-00023V-M4
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:46:22 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:60735)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xu455-00023M-6m
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:46:20 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NFP00F00NKPZH00@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Thu, 27 Nov 2014 20:46:17 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFP00FQ2O54ZY10@HIDDEN>;
 Thu, 27 Nov 2014 20:46:17 +0200 (IST)
Date: Thu, 27 Nov 2014 20:46:36 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <54776EFA.8090104@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83zjbcmqgj.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN> <54776EFA.8090104@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 27 Nov 2014 19:35:38 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
> 
>  >> 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.
>  >
>  > No, it works via face remapping, see text-scale-mode.  IOW, it does
>  > change the height of the default face by replacing it with another
>  > face.
> 
> On a per-buffer basis.  The height of the default face is unaffected
> here.

We both talk about the "default face", but mean 2 different things, it
seems.  I mean the face that is referenced by 'default'.

> I suppose the display engine applies the scaling lazily, whenever it
> has to retrieve the height of the default face.

The display engine doesn't apply the scaling at all, it just uses the
face and obeys its attributes.  text-scale-mode prepares that face,
like this:

    (face-remap-add-relative 'default
                             :height
                             (expt text-scale-mode-step
                                   text-scale-mode-amount))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 18:35:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 13:35:52 2014
Received: from localhost ([127.0.0.1]:47890 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu3ux-0001m3-Ri
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:35:52 -0500
Received: from mout.gmx.net ([212.227.15.15]:55545)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Xu3uv-0001ls-E1
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:35:49 -0500
Received: from [188.22.37.213] ([188.22.37.213]) by mail.gmx.com (mrgmx001)
 with ESMTPSA (Nemesis) id 0LiDKt-1YFLzH1rn9-00nQzO; Thu, 27 Nov 2014 19:35:44
 +0100
Message-ID: <54776EFA.8090104@HIDDEN>
Date: Thu, 27 Nov 2014 19:35:38 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;	`window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <83h9xkobxa.fsf@HIDDEN>
In-Reply-To: <83h9xkobxa.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:XT8Gyko8DUUcaOc6/n+iaaMiVzgNvnFUf7KZwnKpztTgxEyA7mZ
 U0I1J1KIB8nnc05f8JHHUo97qTnhZC8ytY4a39zN1WZJiEZMbJAK2UloWPMYRb+4VupEJMT
 jOrfG1BirjYyn0kEqtwm+YgNlu/tAsd++F1Np219mtm4fBSj2mIH28D3RUi8ZONoXGSv0kB
 oaLLP3/Bqn0f30V/I/EKg==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> 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.
 >
 > No, it works via face remapping, see text-scale-mode.  IOW, it does
 > change the height of the default face by replacing it with another
 > face.

On a per-buffer basis.  The height of the default face is unaffected
here.  I suppose the display engine applies the scaling lazily, whenever
it has to retrieve the height of the default face.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 18:35:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 13:35:39 2014
Received: from localhost ([127.0.0.1]:47887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu3ul-0001lV-CS
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:35:39 -0500
Received: from mout.gmx.net ([212.227.15.15]:60354)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Xu3uh-0001lL-9Y
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 13:35:36 -0500
Received: from [188.22.37.213] ([188.22.37.213]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0Lfjxq-1YHoru09lq-00pINH; Thu, 27 Nov 2014 19:35:32
 +0100
Message-ID: <54776EED.9090303@HIDDEN>
Date: Thu, 27 Nov 2014 19:35:25 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Joe Corneli <holtzermann17@HIDDEN>
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
 <87ppc8rk08.fsf@HIDDEN>
In-Reply-To: <87ppc8rk08.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:2Pp1RRsxN5BN7NBLIAmeWIRCYtKVvww/3Rj/hipjR/K7pmLNkJI
 u8aoyGTdrQyWJJJdEngaP9NO3e7x7XxB/fLHUNps3lasDafoRmh0csmQc6/2ccbQQC4jt88
 fRLlgzV/osH3CxRjQUfoZ7O3nHeCtBW8HhHcRakPE1LIOvQ9NhBMl3OvDdgQKkT0xfgG2xJ
 Uzl2/O3Bi/eSb8kx5rZsA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > I think you are totally right.  To keep the buffer and window
 > distinction properly, my note should probably be read as a feature
 > request, not a bug report.  The request is for a function such as
 > `buffer-body-width' that would return the width of the current displayed
 > buffer in em-length units.

What is the width of a buffer?  What are em-lenght units?

 > Sounds promising!  I just pressed C-x C-- which runs `text-scale-adjust'
 > to the effect: "Decrease the default face height by one step".

That's incorrect.  The doc-string of `text-scale-decrease' tells it more
accurately: "Decrease the height of the default face in the current
buffer by DEC steps."

 > The step
 > is `text-scale-mode-step', unchanged from its default value of 1.2.  The
 > number of steps looks to be stored buffer-locally as
 > `text-scale-mode-amount'.
 >
 > ... So a candidate function would be:
 >
 > (defun buffer-body-width (&optional buffer pixelwise)
 >    (let ((width (window-body-width (get-buffer-window (or buffer
 > 							 (current-buffer)))
 > 				  pixelwise)))
 >      (floor (cond
 > 	    ((eq text-scale-mode-amount 0)
 > 	     width)
 > 	    ((> text-scale-mode-amount 0)
 > 	     (/ width (* text-scale-mode-step text-scale-mode-amount)))
 > 	    ((< text-scale-mode-amount 0)
 > 	     (* width (* -1 text-scale-mode-step text-scale-mode-amount)))))))

We could start from here.  But:

(1) `text-scale-mode-amount' is not autoloaded, so we get an error
     calling this with emacs -Q.

(2) `text-scale-mode-amount' is buffer-local.  So we have to choose the
     right buffer before evaluating it.

(3) `text-scale-mode-amount' constitutes a request to the display engine
     to scale a face height.  What shall we do when our target machine
     can't display the character with the requested height and uses, for
     example, the nearest available height instead?

(4) I don't know whether and how the frame's `font' parameter can/should
     affect the height of the "default face".  Likely this is not a
     problem - Eli will tell.

As I said before, I'd rather have a buffer-local equivalent of the
variable `frame-char-height', something like `buffer-char-height',
instead of having to find out by myself what the correct value is.

Next we should try to incorporate this in `window-body-height', either
by overloading the PIXELWISE argument - for example, if this is the
symbol `lines-scaled' we'd return the scaled lines - or with an extra
BUFFER argument which would also allow to retrieve the body height of a
window as if it displayed BUFFER or with something better yet ...

As a consequence, we'd probably have to rename the current C routine
`window-body-height' to `window-body-height-internal' and write the new
`window-body-height' in Elisp on top of that.

And finally we would have to do that for all related functions like
`window-total-height', `split-window' or `window-resize' and decide how
a user can specify that, when splitting a window via say C-4 C-x 2, the
top window should have four lines counted in the original window
buffer's text scaling.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 16:17:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 11:17:22 2014
Received: from localhost ([127.0.0.1]:47770 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xu1kw-0003ns-L8
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 11:17:22 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:63723)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xu1ku-0003ni-9v
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 11:17:21 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NFP00G00H3IS700@HIDDEN> for 19194 <at> debbugs.gnu.org;
 Thu, 27 Nov 2014 18:17:18 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFP00GMNH8UB390@HIDDEN>;
 Thu, 27 Nov 2014 18:17:18 +0200 (IST)
Date: Thu, 27 Nov 2014 18:17:37 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5476F298.5000205@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83h9xkobxa.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: holtzermann17@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Thu, 27 Nov 2014 10:44:56 +0100
> From: martin rudalics <rudalics@HIDDEN>
> 
> (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.

No, it works via face remapping, see text-scale-mode.  IOW, it does
change the height of the default face by replacing it with another
face.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 10:54:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 05:54:52 2014
Received: from localhost ([127.0.0.1]:47034 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xtwip-0002Wt-QC
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 05:54:52 -0500
Received: from mail-wi0-f177.google.com ([209.85.212.177]:44452)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <holtzermann17@HIDDEN>) id 1Xtwin-0002Wl-Kd
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 05:54:50 -0500
Received: by mail-wi0-f177.google.com with SMTP id l15so7897861wiw.10
 for <19194 <at> debbugs.gnu.org>; Thu, 27 Nov 2014 02:54:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type;
 bh=e10EDwL7eTpVjfrdxwRRS9sqsCN1Me/zpmnVF0sxpAI=;
 b=0+WxMFFxHGHDfIPeE1uCBViQnYA4WPPxr3eG9/BskDFejMoTnNi8IqSgVVs2ZjWaf6
 x1qXp/15fqPCfquHeivrnR6hATL+p2AIEAHWP6uCYSaooQTxE+uQYzBI9LThBeWFh1aI
 D7Ic0iC9vtZs9i7JERWxC0vUf1GQV6tYCIBKF/wn+cPQYn9HMy6rTyGiov47Ywy6QQ5C
 U41JsYq6piHrl7q6frQfT1NcyZDQ0rnM3P1PWz//6An71xy6tKNlXOngjD67EAaip/Pf
 yCxTuYuoPcuOqSxsV5imkhNaaE4WTNd6eYTJ24JreaKRdr1Rvvc7suai4NTKGA0yEgsi
 ZhpA==
X-Received: by 10.194.133.66 with SMTP id pa2mr14249678wjb.134.1417085688997; 
 Thu, 27 Nov 2014 02:54:48 -0800 (PST)
Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net.
 [213.105.32.80])
 by mx.google.com with ESMTPSA id bf6sm10179357wjb.13.2014.11.27.02.54.47
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 27 Nov 2014 02:54:48 -0800 (PST)
References: <87h9xm6plp.fsf@HIDDEN> <5476F298.5000205@HIDDEN>
From: Joe Corneli <holtzermann17@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <5476F298.5000205@HIDDEN>
Date: Thu, 27 Nov 2014 10:54:47 +0000
Message-ID: <87ppc8rk08.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

On Thu, Nov 27 2014, martin rudalics wrote:

> 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.

I think you are totally right.  To keep the buffer and window
distinction properly, my note should probably be read as a feature
request, not a bug report.  The request is for a function such as
`buffer-body-width' that would return the width of the current displayed
buffer in em-length units.

> 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.

Sounds promising!  I just pressed C-x C-- which runs `text-scale-adjust'
to the effect: "Decrease the default face height by one step".  The step
is `text-scale-mode-step', unchanged from its default value of 1.2.  The
number of steps looks to be stored buffer-locally as
`text-scale-mode-amount'.

... So a candidate function would be:

(defun buffer-body-width (&optional buffer pixelwise)
  (let ((width (window-body-width (get-buffer-window (or buffer
							 (current-buffer)))
				  pixelwise)))
    (floor (cond 
	    ((eq text-scale-mode-amount 0)
	     width)
	    ((> text-scale-mode-amount 0)
	     (/ width (* text-scale-mode-step text-scale-mode-amount)))
	    ((< text-scale-mode-amount 0)
	     (* width (* -1 text-scale-mode-step text-scale-mode-amount)))))))








Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 27 Nov 2014 09:45:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 04:45:11 2014
Received: from localhost ([127.0.0.1]:46991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtvdP-0007sX-3x
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2014 04:45:11 -0500
Received: from mout.gmx.net ([212.227.17.20]:63759)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1XtvdL-0007sN-7N
 for 19194 <at> debbugs.gnu.org; Thu, 27 Nov 2014 04:45:08 -0500
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
Message-ID: <5476F298.5000205@HIDDEN>
Date: Thu, 27 Nov 2014 10:44:56 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Joe Corneli <holtzermann17@HIDDEN>, 19194 <at> debbugs.gnu.org
Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative
 to font size changes
References: <87h9xm6plp.fsf@HIDDEN>
In-Reply-To: <87h9xm6plp.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:90Cw37OdIll8pSxa6cI4LRrn4jpgQ1kx4hh2ExUCWi7Wx3za1So
 9txkDgXYuGniwc8N8J7UzGlICH0kgdoSy+ORZhkw0sw5AqTbvrUJpXTuz/D87aAyzcCjhrW
 tZq3M14J2noAEi5lzO7pkHVWvVFW6VCysAphQwEG0ju7L7wIvOWNvpOabqYefDnuyc/mcCF
 W4y08S7YnPfabL5HC94yQ==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19194
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 26 Nov 2014 17:06:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 26 12:06:47 2014
Received: from localhost ([127.0.0.1]:46450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xtg3C-0003AY-T6
	for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 12:06:47 -0500
Received: from mtaout25.012.net.il ([80.179.55.181]:41080)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xtg39-0003AM-H6
 for 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 12:06:44 -0500
Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il
 (HyperSendmail v2007.08) id <0NFN00O00O58TI00@HIDDEN> for
 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 19:02:21 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFN00NFCONW9O30@HIDDEN>; Wed, 26 Nov 2014 19:02:21 +0200 (IST)
Date: Wed, 26 Nov 2014 19:06:57 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <87tx1lrkdu.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Joe Corneli <holtzermann17@HIDDEN>
Message-id: <83ppc9opqm.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN>
 <jwvioi2hs8d.fsf-monnier+emacsbugs@HIDDEN> <87tx1lrkdu.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: monnier@HIDDEN, 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> From: Joe Corneli <holtzermann17@HIDDEN>
> Date: Wed, 26 Nov 2014 16:34:21 +0000
> Cc: 19194 <at> debbugs.gnu.org
> 
> If people switch fonts mid-line, that's clearly a pain - but "ems" could
> be defined relative to point-size-at-point, and would accordingly return
> an accurate *length*.

But functions like posn-at-point and other similar functions we have
already report the column number of a given position, so you could use
that as your "column counter".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 26 Nov 2014 16:34:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 26 11:34:29 2014
Received: from localhost ([127.0.0.1]:46406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtfXx-0002LT-Hx
	for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 11:34:29 -0500
Received: from mail-wi0-f179.google.com ([209.85.212.179]:45039)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <holtzermann17@HIDDEN>) id 1XtfXu-0002LK-Kt
 for 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 11:34:27 -0500
Received: by mail-wi0-f179.google.com with SMTP id ex7so5592411wid.6
 for <19194 <at> debbugs.gnu.org>; Wed, 26 Nov 2014 08:34:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type;
 bh=VGP2+R1ymU5G5OA8xbV/stryTUszRd7kN5AlV6lKghg=;
 b=AxDL1hmTQPQuFDJ04ipA+/aNAkrjh07fcafQ72OY/cbXrqGvdeKbqebLmnksoW84PJ
 DDx4FrcBM9nndacDRq488+XJKn5OnCtBNmVqb0OvK5+p2QIQUIKRUNCJEpha2UaVS7az
 OggphyC1P389z+w3IiZawLx3tx7FY94ElVYzo4hmphaAzaALV4zkeObKM/ssTpZnDLTk
 ARe5UsfVqF1zhVc8hP0V/IFp5NR45ILorSe8iETDywjeL2Fdbxt3CY3ZqN5VK4KA4r0L
 kpF/UZm2zd5HBIBgtW9BjwrtcvfuEGjp72j1q5iDnlq3oUc6JNeBmdwkP4x0IIUOfojT
 JI8A==
X-Received: by 10.180.211.196 with SMTP id ne4mr7174727wic.71.1417019665682;
 Wed, 26 Nov 2014 08:34:25 -0800 (PST)
Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net.
 [213.105.32.80])
 by mx.google.com with ESMTPSA id qg11sm1087711wic.17.2014.11.26.08.34.21
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 26 Nov 2014 08:34:24 -0800 (PST)
References: <87h9xm6plp.fsf@HIDDEN>
 <jwvioi2hs8d.fsf-monnier+emacsbugs@HIDDEN>
From: Joe Corneli <holtzermann17@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <jwvioi2hs8d.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 26 Nov 2014 16:34:21 +0000
Message-ID: <87tx1lrkdu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

On Wed, Nov 26 2014, Eli Zaretskii wrote:

> One simple technique is to measure everything in pixels, but I don't
> know at this point whether this will solve your use case.

That would probably do it for me, yes.

On Wed, Nov 26 2014, Stefan Monnier wrote:

>> function to return the "actual" number of columns.
>
> How do you define "actual number of columns" in the presence of
> proportional fonts, images, and text of variable size?

I hadn't considered anything but fixed width fonts with uniform size --
but, for instance, the width could be reported in em-length units.

If people switch fonts mid-line, that's clearly a pain - but "ems" could
be defined relative to point-size-at-point, and would accordingly return
an accurate *length*.  In the general not the same as the "actual number
of columns" - but possibly still of use.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 26 Nov 2014 16:04:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 26 11:04:27 2014
Received: from localhost ([127.0.0.1]:46373 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xtf4t-0001ZR-0H
	for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 11:04:27 -0500
Received: from mtaout29.012.net.il ([80.179.55.185]:53323)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Xtf4q-0001ZI-FT
 for 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 11:04:25 -0500
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NFN00C00LPBKH00@HIDDEN> for
 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 18:02:21 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NFN002SQLVXMB90@HIDDEN>; Wed, 26 Nov 2014 18:02:21 +0200 (IST)
Date: Wed, 26 Nov 2014 18:04:38 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
In-reply-to: <87h9xm6plp.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Joe Corneli <holtzermann17@HIDDEN>
Message-id: <83tx1mne21.fsf@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> From: Joe Corneli <holtzermann17@HIDDEN>
> Date: Wed, 26 Nov 2014 13:47:14 +0000
> 
> 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."

That's not what it says in Emacs 24.4.  It says this:

  If PIXELWISE is nil, return the largest integer smaller than WINDOW's
  pixel width divided by the character width of WINDOW's frame.

IOW, the function is explicitly documented to measure columns in
canonical character units.  It functions as designed.

> 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.
> 
> ( I note one practical implication of the underlying issue here:
> https://github.com/kiwanami/emacs-calfw/issues/45 )

I've read that, and since I don't know what Calfw is or what it does,
it is hard for me to interpret your use case.  If you explain it in
small words, I'm sure a solution will be found, as Emacs has more than
enough functions to give you the width in any units you want, provided
that they are uniform (i.e., don't expect that to work when teh window
uses variable size fonts).

One simple technique is to measure everything in pixels, but I don't
know at this point whether this will solve your use case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at 19194 <at> debbugs.gnu.org:


Received: (at 19194) by debbugs.gnu.org; 26 Nov 2014 15:55:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 26 10:55:58 2014
Received: from localhost ([127.0.0.1]:46364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xtewf-0001LH-NI
	for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 10:55:57 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:36764)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Xtewe-0001LA-FN
 for 19194 <at> debbugs.gnu.org; Wed, 26 Nov 2014 10:55:56 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAQFtt3X001149;
 Wed, 26 Nov 2014 10:55:55 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 633054820; Wed, 26 Nov 2014 10:55:55 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Joe Corneli <holtzermann17@HIDDEN>
Subject: Re: bug#19194: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
Message-ID: <jwvioi2hs8d.fsf-monnier+emacsbugs@HIDDEN>
References: <87h9xm6plp.fsf@HIDDEN>
Date: Wed, 26 Nov 2014 10:55:55 -0500
In-Reply-To: <87h9xm6plp.fsf@HIDDEN> (Joe Corneli's message of "Wed, 26 Nov
 2014 13:47:14 +0000")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0.2
X-NAI-Spam-Rules: 2 Rules triggered
	GEN_SPAM_FEATRE=0.2, RV5137=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5137> : inlines <1562> : streams
 <1349015> : uri <1836228>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19194
Cc: 19194 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

> function to return the "actual" number of columns.

How do you define "actual number of columns" in the presence of
proportional fonts, images, and text of variable size?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2014 13:47:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 26 08:47:42 2014
Received: from localhost ([127.0.0.1]:45703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtcwS-0005Bx-TL
	for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 08:47:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38113)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <holtzermann17@HIDDEN>) id 1XtcwP-0005Bm-H8
 for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 08:47:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <holtzermann17@HIDDEN>) id 1XtcwJ-000896-FL
 for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 08:47:33 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.1 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35345)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <holtzermann17@HIDDEN>) id 1XtcwJ-000890-CW
 for submit <at> debbugs.gnu.org; Wed, 26 Nov 2014 08:47:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39794)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <holtzermann17@HIDDEN>) id 1XtcwD-0004qL-Dl
 for bug-gnu-emacs@HIDDEN; Wed, 26 Nov 2014 08:47:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <holtzermann17@HIDDEN>) id 1Xtcw8-00080C-JD
 for bug-gnu-emacs@HIDDEN; Wed, 26 Nov 2014 08:47:21 -0500
Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:57267)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <holtzermann17@HIDDEN>) id 1Xtcw8-0007zX-4R
 for bug-gnu-emacs@HIDDEN; Wed, 26 Nov 2014 08:47:16 -0500
Received: by mail-wg0-f49.google.com with SMTP id x12so3757785wgg.36
 for <bug-gnu-emacs@HIDDEN>; Wed, 26 Nov 2014 05:47:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version:content-type;
 bh=z3ckn/gx8lKNImnhPF+JJDp3RXM+6+rWOBvVssjhMrQ=;
 b=a9LC40WAdpknZyNfutnjAtF849NDOeDkdYq0FuEOGkf5U6SEV7Yh9gfSIk9+/Uv1C6
 nh0rCbsc6mFpOsqeshl4x231xGz+gf70w7WWocorVfDBo3oTSYQMjZArc0cYQBizfSYh
 uM2LHrfR3yPZC+dDquZVCQkPdeVuBxEtoRX8GeIRbLMYDotV9Y93mGffh0uCSy3MAGw8
 /wMeF20/XlUZ0TIxEvbE8452lIzMhm5TqJ3grUWh4yovE+pU+QUR5oqcAdkNVjL3+ahu
 G06YkGz3TI1qTmSzQxxkIqTHiChYHbHaez5prDi+UXQ/12PGSmlNcWx8Z/GfQbzkmnvy
 iQ4Q==
X-Received: by 10.180.99.1 with SMTP id em1mr42348377wib.29.1417009634992;
 Wed, 26 Nov 2014 05:47:14 -0800 (PST)
Received: from Teacup (cpc2-flit3-2-0-cust79.9-1.cable.virginm.net.
 [213.105.32.80])
 by mx.google.com with ESMTPSA id kn5sm6417864wjb.48.2014.11.26.05.47.12
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 26 Nov 2014 05:47:13 -0800 (PST)
From: Joe Corneli <holtzermann17@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.4.50;
 `window-body-width' is not dynamic relative to font size changes
Date: Wed, 26 Nov 2014 13:47:14 +0000
Message-ID: <87h9xm6plp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

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.

( I note one practical implication of the underlying issue here:
https://github.com/kiwanami/emacs-calfw/issues/45 )




In GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-09-01 on Teacup
Repository revision: 117795 rgm@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GSETTINGS NOTIFY GNUTLS
LIBXML2 FREETYPE XFT ZLIB

Important settings:
  value of $LC_MONETARY: en_GB.UTF-8
  value of $LC_NUMERIC: en_GB.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  openwith-mode: t
  show-paren-mode: t
  tooltip-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<up> <left> D M C-g C-x 1 C-x C-b C-x o <down> <down> 
<down> <return> C-x 1 <up> <C-left> C-s C-w C-w C-w 
C-s C-s C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-l <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> C-e M-x <up> C-g C-M-x 
e C-/ M-x e f d e b u <backspace> <backspace> <backspace> 
<backspace> <backspace> d e b u <tab> d e f <tab> <return> 
M-x <up> <up> <up> <return> n n n n n n n n n n n n 
n n n q <up> <up> <up> <up> <up> <up> M-b <left> <left> 
<left> <up> <up> <up> <up> <up> <C-left> C-r C-w C-w 
C-w C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r 
C-r C-r <left> <right> C-SPC <C-right> M-w M-x g r 
e p <return> " C-y " SPC * <return> C-x o <down> <down> 
<down> <down> <return> C-e M-b M-b M-f C-h f <return> 
C-x o C-v C-l <up> <up> <up> <up> <up> C-l C-x C-b 
C-x o <down> <down> <down> <down> <down> C-g M-x <up> 
<up> <return> q M-x <up> <return> C-l <C-right> C-e 
C-x C-e M-x <up> <return> M-: <pause> C-y <return> 
M-: <up> <return> C-h v <up> C-e <M-backspace> b o 
d <tab> y C-g C-h f w i n d o w - b o d <tab> w <tab> 
<return> C-x b <return> C-a <right> <right> <right> 
<right> <right> <right> <left> <left> <help-echo> <help-echo> 
<S-down-mouse-1> M-: <up> <return> <S-down-mouse-1> 
M-x <up> <up> <up> <down> <down> C-g M-: <up> <return> 
C-x o M-x r e p o <tab> C-g C-z C-x 1 e m a c s SPC 
- Q <return> M-: <up> C-SPC C-e M-w C-g C-c C-c M-x 
r e p o <tab> r <tab> <return>

Recent messages:
cfw:view-month-calc-param
89 (#o131, #x59, ?Y) [2 times]
Quit
Type "q" to restore previous buffer, M-x scroll-up to scroll help.
89 (#o131, #x59, ?Y)
Quit
89 (#o131, #x59, ?Y)
Making completion list...
Quit [2 times]
Making completion list...

Load-path shadows:
~/mu/mu4e/mu4e-speedbar hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-speedbar
~/mu/mu4e/org-old-mu4e hides /usr/local/share/emacs/site-lisp/mu4e/org-old-mu4e
~/mu/mu4e/mu4e-draft hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-draft
~/mu/mu4e/mu4e-contrib hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-contrib
~/mu/mu4e/mu4e-proc hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-proc
~/mu/mu4e/mu4e-message hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-message
~/mu/mu4e/mu4e-headers hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-headers
~/mu/mu4e/mu4e-meta hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-meta
~/mu/mu4e/mu4e-vars hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-vars
~/mu/mu4e/mu4e-utils hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-utils
~/mu/mu4e/mu4e hides /usr/local/share/emacs/site-lisp/mu4e/mu4e
~/mu/mu4e/mu4e-lists hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-lists
~/mu/mu4e/mu4e-compose hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-compose
~/mu/mu4e/mu4e-main hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-main
~/mu/mu4e/org-mu4e hides /usr/local/share/emacs/site-lisp/mu4e/org-mu4e
~/mu/mu4e/mu4e-view hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-view
~/mu/mu4e/mu4e-about hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-about
~/mu/mu4e/mu4e-mark hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-mark
~/mu/mu4e/mu4e-actions hides /usr/local/share/emacs/site-lisp/mu4e/mu4e-actions
~/org-mode/lisp/org-crypt hides /usr/local/share/emacs/24.4.50/lisp/org/org-crypt
~/org-mode/lisp/org-mouse hides /usr/local/share/emacs/24.4.50/lisp/org/org-mouse
~/org-mode/lisp/ob-R hides /usr/local/share/emacs/24.4.50/lisp/org/ob-R
~/org-mode/lisp/org-indent hides /usr/local/share/emacs/24.4.50/lisp/org/org-indent
~/org-mode/lisp/ob-lilypond hides /usr/local/share/emacs/24.4.50/lisp/org/ob-lilypond
~/org-mode/lisp/org-mobile hides /usr/local/share/emacs/24.4.50/lisp/org/org-mobile
~/org-mode/lisp/ob-scheme hides /usr/local/share/emacs/24.4.50/lisp/org/ob-scheme
~/org-mode/lisp/ob-comint hides /usr/local/share/emacs/24.4.50/lisp/org/ob-comint
~/org-mode/lisp/org-eshell hides /usr/local/share/emacs/24.4.50/lisp/org/org-eshell
~/org-mode/lisp/ob-asymptote hides /usr/local/share/emacs/24.4.50/lisp/org/ob-asymptote
~/org-mode/lisp/ob-makefile hides /usr/local/share/emacs/24.4.50/lisp/org/ob-makefile
~/org-mode/lisp/org-w3m hides /usr/local/share/emacs/24.4.50/lisp/org/org-w3m
~/org-mode/lisp/org-colview hides /usr/local/share/emacs/24.4.50/lisp/org/org-colview
~/org-mode/lisp/org-install hides /usr/local/share/emacs/24.4.50/lisp/org/org-install
~/org-mode/lisp/org-bibtex hides /usr/local/share/emacs/24.4.50/lisp/org/org-bibtex
~/org-mode/lisp/ob-sqlite hides /usr/local/share/emacs/24.4.50/lisp/org/ob-sqlite
~/org-mode/lisp/org-element hides /usr/local/share/emacs/24.4.50/lisp/org/org-element
~/org-mode/lisp/org-timer hides /usr/local/share/emacs/24.4.50/lisp/org/org-timer
~/org-mode/lisp/ob-C hides /usr/local/share/emacs/24.4.50/lisp/org/ob-C
~/org-mode/lisp/ob-haskell hides /usr/local/share/emacs/24.4.50/lisp/org/ob-haskell
~/org-mode/lisp/ob-sql hides /usr/local/share/emacs/24.4.50/lisp/org/ob-sql
~/org-mode/lisp/ob-picolisp hides /usr/local/share/emacs/24.4.50/lisp/org/ob-picolisp
~/org-mode/lisp/ob-java hides /usr/local/share/emacs/24.4.50/lisp/org/ob-java
~/org-mode/lisp/org-footnote hides /usr/local/share/emacs/24.4.50/lisp/org/org-footnote
~/org-mode/lisp/ox-html hides /usr/local/share/emacs/24.4.50/lisp/org/ox-html
~/org-mode/lisp/ob-latex hides /usr/local/share/emacs/24.4.50/lisp/org/ob-latex
~/org-mode/lisp/ob-screen hides /usr/local/share/emacs/24.4.50/lisp/org/ob-screen
~/org-mode/lisp/ob-css hides /usr/local/share/emacs/24.4.50/lisp/org/ob-css
~/org-mode/lisp/org-attach hides /usr/local/share/emacs/24.4.50/lisp/org/org-attach
~/org-mode/lisp/ob-ditaa hides /usr/local/share/emacs/24.4.50/lisp/org/ob-ditaa
~/org-mode/lisp/ob-shen hides /usr/local/share/emacs/24.4.50/lisp/org/ob-shen
~/org-mode/lisp/org-feed hides /usr/local/share/emacs/24.4.50/lisp/org/org-feed
~/org-mode/lisp/ob-keys hides /usr/local/share/emacs/24.4.50/lisp/org/ob-keys
~/org-mode/lisp/ob-exp hides /usr/local/share/emacs/24.4.50/lisp/org/ob-exp
~/org-mode/lisp/org-datetree hides /usr/local/share/emacs/24.4.50/lisp/org/org-datetree
~/org-mode/lisp/org-macs hides /usr/local/share/emacs/24.4.50/lisp/org/org-macs
~/org-mode/lisp/ob-ruby hides /usr/local/share/emacs/24.4.50/lisp/org/ob-ruby
~/org-mode/lisp/ob-mscgen hides /usr/local/share/emacs/24.4.50/lisp/org/ob-mscgen
~/org-mode/lisp/ob-fortran hides /usr/local/share/emacs/24.4.50/lisp/org/ob-fortran
~/org-mode/lisp/org-irc hides /usr/local/share/emacs/24.4.50/lisp/org/org-irc
~/org-mode/lisp/org-version hides /usr/local/share/emacs/24.4.50/lisp/org/org-version
~/org-mode/lisp/ox-beamer hides /usr/local/share/emacs/24.4.50/lisp/org/ox-beamer
~/org-mode/lisp/ob-ref hides /usr/local/share/emacs/24.4.50/lisp/org/ob-ref
~/org-mode/lisp/org-rmail hides /usr/local/share/emacs/24.4.50/lisp/org/org-rmail
~/org-mode/lisp/ox hides /usr/local/share/emacs/24.4.50/lisp/org/ox
~/org-mode/lisp/ob-perl hides /usr/local/share/emacs/24.4.50/lisp/org/ob-perl
~/org-mode/lisp/org-agenda hides /usr/local/share/emacs/24.4.50/lisp/org/org-agenda
~/org-mode/lisp/org-habit hides /usr/local/share/emacs/24.4.50/lisp/org/org-habit
~/org-mode/lisp/org-compat hides /usr/local/share/emacs/24.4.50/lisp/org/org-compat
~/org-mode/lisp/ox-md hides /usr/local/share/emacs/24.4.50/lisp/org/ox-md
~/org-mode/lisp/org-plot hides /usr/local/share/emacs/24.4.50/lisp/org/org-plot
~/org-mode/lisp/ob-clojure hides /usr/local/share/emacs/24.4.50/lisp/org/ob-clojure
~/org-mode/lisp/ob-matlab hides /usr/local/share/emacs/24.4.50/lisp/org/ob-matlab
~/org-mode/lisp/ob-core hides /usr/local/share/emacs/24.4.50/lisp/org/ob-core
~/org-mode/lisp/ob-tangle hides /usr/local/share/emacs/24.4.50/lisp/org/ob-tangle
~/org-mode/lisp/org-loaddefs hides /usr/local/share/emacs/24.4.50/lisp/org/org-loaddefs
~/org-mode/lisp/org-ctags hides /usr/local/share/emacs/24.4.50/lisp/org/org-ctags
~/org-mode/lisp/org-docview hides /usr/local/share/emacs/24.4.50/lisp/org/org-docview
~/org-mode/lisp/ob-ledger hides /usr/local/share/emacs/24.4.50/lisp/org/ob-ledger
~/org-mode/lisp/org hides /usr/local/share/emacs/24.4.50/lisp/org/org
~/org-mode/lisp/org-protocol hides /usr/local/share/emacs/24.4.50/lisp/org/org-protocol
~/org-mode/lisp/ox-latex hides /usr/local/share/emacs/24.4.50/lisp/org/ox-latex
~/org-mode/lisp/ob-gnuplot hides /usr/local/share/emacs/24.4.50/lisp/org/ob-gnuplot
~/org-mode/lisp/ob-sass hides /usr/local/share/emacs/24.4.50/lisp/org/ob-sass
~/org-mode/lisp/org-pcomplete hides /usr/local/share/emacs/24.4.50/lisp/org/org-pcomplete
~/org-mode/lisp/ob hides /usr/local/share/emacs/24.4.50/lisp/org/ob
~/org-mode/lisp/ox-odt hides /usr/local/share/emacs/24.4.50/lisp/org/ox-odt
~/org-mode/lisp/ob-lob hides /usr/local/share/emacs/24.4.50/lisp/org/ob-lob
~/org-mode/lisp/ob-table hides /usr/local/share/emacs/24.4.50/lisp/org/ob-table
~/org-mode/lisp/org-mhe hides /usr/local/share/emacs/24.4.50/lisp/org/org-mhe
~/org-mode/lisp/ob-dot hides /usr/local/share/emacs/24.4.50/lisp/org/ob-dot
~/org-mode/lisp/ob-octave hides /usr/local/share/emacs/24.4.50/lisp/org/ob-octave
~/org-mode/lisp/ob-calc hides /usr/local/share/emacs/24.4.50/lisp/org/ob-calc
~/org-mode/lisp/ob-scala hides /usr/local/share/emacs/24.4.50/lisp/org/ob-scala
~/org-mode/lisp/ox-texinfo hides /usr/local/share/emacs/24.4.50/lisp/org/ox-texinfo
~/org-mode/lisp/org-macro hides /usr/local/share/emacs/24.4.50/lisp/org/org-macro
~/org-mode/lisp/ox-ascii hides /usr/local/share/emacs/24.4.50/lisp/org/ox-ascii
~/org-mode/lisp/ob-org hides /usr/local/share/emacs/24.4.50/lisp/org/ob-org
~/org-mode/lisp/ob-plantuml hides /usr/local/share/emacs/24.4.50/lisp/org/ob-plantuml
~/org-mode/lisp/org-gnus hides /usr/local/share/emacs/24.4.50/lisp/org/org-gnus
~/org-mode/lisp/ox-man hides /usr/local/share/emacs/24.4.50/lisp/org/ox-man
~/org-mode/lisp/ob-emacs-lisp hides /usr/local/share/emacs/24.4.50/lisp/org/ob-emacs-lisp
~/org-mode/lisp/ob-ocaml hides /usr/local/share/emacs/24.4.50/lisp/org/ob-ocaml
~/org-mode/lisp/org-faces hides /usr/local/share/emacs/24.4.50/lisp/org/org-faces
~/org-mode/lisp/org-clock hides /usr/local/share/emacs/24.4.50/lisp/org/org-clock
~/org-mode/lisp/org-src hides /usr/local/share/emacs/24.4.50/lisp/org/org-src
~/org-mode/lisp/ob-lisp hides /usr/local/share/emacs/24.4.50/lisp/org/ob-lisp
~/org-mode/lisp/org-list hides /usr/local/share/emacs/24.4.50/lisp/org/org-list
~/org-mode/lisp/ob-js hides /usr/local/share/emacs/24.4.50/lisp/org/ob-js
~/org-mode/lisp/ob-maxima hides /usr/local/share/emacs/24.4.50/lisp/org/ob-maxima
~/org-mode/lisp/ox-publish hides /usr/local/share/emacs/24.4.50/lisp/org/ox-publish
~/org-mode/lisp/org-archive hides /usr/local/share/emacs/24.4.50/lisp/org/org-archive
~/org-mode/lisp/ob-awk hides /usr/local/share/emacs/24.4.50/lisp/org/ob-awk
~/org-mode/lisp/ob-io hides /usr/local/share/emacs/24.4.50/lisp/org/ob-io
~/org-mode/lisp/ob-python hides /usr/local/share/emacs/24.4.50/lisp/org/ob-python
~/org-mode/lisp/ox-icalendar hides /usr/local/share/emacs/24.4.50/lisp/org/ox-icalendar
~/org-mode/lisp/org-bbdb hides /usr/local/share/emacs/24.4.50/lisp/org/org-bbdb
~/org-mode/lisp/org-id hides /usr/local/share/emacs/24.4.50/lisp/org/org-id
~/org-mode/lisp/org-capture hides /usr/local/share/emacs/24.4.50/lisp/org/org-capture
~/org-mode/lisp/org-entities hides /usr/local/share/emacs/24.4.50/lisp/org/org-entities
~/org-mode/lisp/ox-org hides /usr/local/share/emacs/24.4.50/lisp/org/ox-org
~/org-mode/lisp/org-inlinetask hides /usr/local/share/emacs/24.4.50/lisp/org/org-inlinetask
~/org-mode/lisp/org-info hides /usr/local/share/emacs/24.4.50/lisp/org/org-info
~/org-mode/lisp/ob-eval hides /usr/local/share/emacs/24.4.50/lisp/org/ob-eval
~/org-mode/lisp/org-table hides /usr/local/share/emacs/24.4.50/lisp/org/org-table
~/postdoc.git/elisp/lisp-mode hides /usr/local/share/emacs/24.4.50/lisp/emacs-lisp/lisp-mode

Features:
(shadow emacsbug eieio-opt grep edebug rect cus-edit cus-start cus-load
image-file qp tabify cal-move help-mode cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew diary-lib diary-loaddefs dired-aux vc-git
tex-mode compile latexenc pcmpl-unix ispell misearch multi-isearch
mailalias mail-extr sort face-remap timezone gnutls network-stream
starttls url-http url-gw url-auth url-queue url-cache shr-color
mule-util shell poly-markdown polymode pcase poly-base polymode-weave
polymode-export polymode-methods polymode-classes polymode-common
eieio-custom eieio-base color markdown-mode thingatpt openwith joes-dict
dictem calfw-org org-capture calfw holidays hol-loaddefs htmlize
convenience joes-dired-config ls-lisp joes-buffer-menu-config joes-eww
eww mm-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse url-vars mailcap joes-org-mode
ox-s5 org-agenda ox-latex ox-icalendar ox-html ox-ascii ox-publish ox
org-rmail org-mhe org-irc org-info org-gnus org-docview org-bibtex
bibtex org-bbdb org-w3m gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader wid-edit
org-element avl-tree org-install joes-mu4e-config org-mu4e org org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs find-func cal-menu calendar
cal-loaddefs shr smtpmail-multi mu4e mu4e-speedbar speedbar sb-image
ezimage dframe mu4e-main mu4e-view epa derived epg epg-config browse-url
comint ansi-color ring mu4e-headers mu4e-compose mu4e-draft mu4e-actions
ido rfc2368 smtpmail auth-source eieio byte-opt bytecomp byte-compile
cconv eieio-core gnus-util password-cache sendmail mu4e-mark
mu4e-message html2text mu4e-proc mu4e-utils doc-view jka-compr
image-mode mu4e-lists mu4e-about mu4e-vars message cl-macs dired
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mailabbrev mail-utils gmm-utils mailheader hl-line cl gv mu4e-meta
generic generic-x advice help-fns edmacro kmacro cl-loaddefs cl-lib
paren time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process gfilenotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

Memory information:
((conses 16 633853 89119)
 (symbols 48 45326 4)
 (miscs 40 4504 2420)
 (strings 32 104101 9049)
 (string-bytes 1 3520659)
 (vectors 16 42195)
 (vector-slots 8 1492748 165381)
 (floats 8 1084 572)
 (intervals 56 12494 1976)
 (buffers 976 67)
 (heap 1024 63592 6821))




Acknowledgement sent to Joe Corneli <holtzermann17@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#19194; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 12 Aug 2020 16:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.