GNU bug report logs - #19395
25.0.50; Setting left fringe to 0 messes up window-width

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; Severity: minor; Reported by: Titus von der Malsburg <malsburg@HIDDEN>; dated Tue, 16 Dec 2014 20:03:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 19395) by debbugs.gnu.org; 21 Dec 2014 12:14:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 21 07:14:31 2014
Received: from localhost ([127.0.0.1]:53460 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2fP4-0001xz-Q4
	for submit <at> debbugs.gnu.org; Sun, 21 Dec 2014 07:14:31 -0500
Received: from mx02.posteo.de ([89.146.194.165]:49869)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y2fP2-0001xo-J8
 for 19395 <at> debbugs.gnu.org; Sun, 21 Dec 2014 07:14:29 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id C208625A2135;
 Sun, 21 Dec 2014 13:14:26 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k52md6zy7z5vN5;
 Sun, 21 Dec 2014 13:14:25 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
 <831tnus2gv.fsf@HIDDEN> <5495B700.8080403@HIDDEN> <83sigaqj8u.fsf@HIDDEN>
 <5495C6BD.1080803@HIDDEN> <83lhm2qete.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83lhm2qete.fsf@HIDDEN>
Date: Sun, 21 Dec 2014 13:14:20 +0100
Message-ID: <87h9wpyzc3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, martin rudalics <rudalics@HIDDEN>
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.7 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


On 2014-12-20 Sat 20:52, Eli Zaretskii wrote:
>> Date: Sat, 20 Dec 2014 19:58:05 +0100
>> From: martin rudalics <rudalics@HIDDEN>
>> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
>>=20
>>  >> IIUC this contradicts an earlier observation by Titus that
>>  >>
>>  >>     if the buffer in the specified window is displayed in two frames,
>>  >>     the returned character width was always the one used in the curr=
ent
>>  >>     frame which is not necessarily the character width in the specif=
ied
>>  >>     window (the window may be in the other frame).  This is a problem
>>  >>     because character width can be different, if the two frames use
>>  >>     different default fonts.
>>  >
>>  > I don't see any contradictions.  I said nothing about windows, only
>>  > about frames and buffers.
>>=20
>> His last sentence says that the outcome is dependent on the frame.  So
>> it does not "replace" the original frame-specific face but "merge" the
>> frame and buffer specific faces.
>
> No.  When a buffer is displayed that has a face in its
> face-remapping-alist, every face in that alist is replaced by its
> remapped face.

Yes, that's technically correct.  However, a common use case of
face-remapping-alist is to merge a new attribute into the existing
definition of a face, e.g:

  ((default (:height 1.2) default))

Moreover, the default face seems to be a special case.  If you define
face-remapping-alist as following:

  ((default (:height 1.2)))

the height attribute is merged into the existing definition of the
default face.  What this means is that the faces used in a buffer will
typically (but not necessarily) depend on the default font and thus on
the frame in which the buffer is displayed.

  Titus

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUlrmdAAoJEK40WfPGE2idQBwH/20+9YlmhHgJTepXoO/k3Kaw
WZ+Wb2ImuvKM6BAn30E9Sv9KHjShbyua30HS5GzA1b9MkaeBzYKZSdciSfNPSlds
LE6FAV7YQNINHUdNP0LzBowIQ+Ol8NLPH2Abr1vCLNDBXJa9mxmFkEz+u+ZkJXB3
CnimX/njmEj3fnrP1oiSgkKO97a3B3x0Jmc2X0UFNA5HW0dSiXjWkW+D9LVdHdpN
t1HHTUyACy+HjUFXjv6q0FfvgjtITceVVjX9wW9TtADj6zfwbq7I/o8D0c5HuWCu
hJ0Qa8TUBa6WJ3CpmfKHEs7KVpGG/fX91cB0Up43AHvdQhBFDECiOSX/QsUV2rs=
=vSAg
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 19:52:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 14:52:49 2014
Received: from localhost ([127.0.0.1]:53310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Q52-0000kR-UN
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 14:52:49 -0500
Received: from mtaout28.012.net.il ([80.179.55.184]:36787)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2Q4x-0000jz-QB
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 14:52:45 -0500
Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il
 (HyperSendmail v2007.08) id <0NGW00N00C8Y4700@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 21:50:26 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW00FJ4CG21N80@HIDDEN>; Sat, 20 Dec 2014 21:50:26 +0200 (IST)
Date: Sat, 20 Dec 2014 21:52:29 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <5495C6BD.1080803@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83lhm2qete.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
 <831tnus2gv.fsf@HIDDEN> <5495B700.8080403@HIDDEN> <83sigaqj8u.fsf@HIDDEN>
 <5495C6BD.1080803@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 19:58:05 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  >> IIUC this contradicts an earlier observation by Titus that
>  >>
>  >>     if the buffer in the specified window is displayed in two frames,
>  >>     the returned character width was always the one used in the current
>  >>     frame which is not necessarily the character width in the specified
>  >>     window (the window may be in the other frame).  This is a problem
>  >>     because character width can be different, if the two frames use
>  >>     different default fonts.
>  >
>  > I don't see any contradictions.  I said nothing about windows, only
>  > about frames and buffers.
> 
> His last sentence says that the outcome is dependent on the frame.  So
> it does not "replace" the original frame-specific face but "merge" the
> frame and buffer specific faces.

No.  When a buffer is displayed that has a face in its
face-remapping-alist, every face in that alist is replaced by its
remapped face.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 18:58:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 13:58:20 2014
Received: from localhost ([127.0.0.1]:53300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2PEK-0006jA-9b
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:58:20 -0500
Received: from mout.gmx.net ([212.227.17.21]:51993)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2PEI-0006it-BE
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:58:19 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx102)
 with ESMTPSA (Nemesis) id 0M9vnQ-1YDRrL0LzE-00B6B6; Sat, 20 Dec 2014 19:58:15
 +0100
Message-ID: <5495C6BD.1080803@HIDDEN>
Date: Sat, 20 Dec 2014 19:58:05 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
 <831tnus2gv.fsf@HIDDEN> <5495B700.8080403@HIDDEN> <83sigaqj8u.fsf@HIDDEN>
In-Reply-To: <83sigaqj8u.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:hIVaqIRbbaH2bdflaSHHwYASVduU4loG8TI8T62Fn5X44ivkd0x
 8mQE+cXCrzRJsRdHdxv+0vPjRwhvSTh/YEOfKpwjfRowKazXtB68fXCmO0PMc6vU+wrqfVk
 wZKSZRQSqmdJAvc5HsxxtOCOahGfk80HvVmefcYBQi+lKlIZT1fousLYQlQGz2bsXTfPKUF
 6STuTpKHCa4w9mh5w9opQ==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 (/)

 >> If I want to right-adjust the last word of a buffer line I apparently
 >> have to provide the buffer _and_ the frame in order to know how many
 >> spaces to insert.
 >
 > Yes, and with-current-buffer achieves that, right?

Only if the current buffer appears on the selected frame.  My original
definition was

(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)))))

and you can trust me that I would have written it as

(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-selected-window window
     (let* ((info (font-info (face-font 'default)))
        (width (aref info 11)))
       (if (> width 0)
       width
     (aref info 10)))))

if I had known that

 >>   > It replaces the original frame-specific face.

is not true.

 >> IIUC this contradicts an earlier observation by Titus that
 >>
 >>     if the buffer in the specified window is displayed in two frames,
 >>     the returned character width was always the one used in the current
 >>     frame which is not necessarily the character width in the specified
 >>     window (the window may be in the other frame).  This is a problem
 >>     because character width can be different, if the two frames use
 >>     different default fonts.
 >
 > I don't see any contradictions.  I said nothing about windows, only
 > about frames and buffers.

His last sentence says that the outcome is dependent on the frame.  So
it does not "replace" the original frame-specific face but "merge" the
frame and buffer specific faces.

But maybe we are just miscommunicating again.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 18:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 13:19:49 2014
Received: from localhost ([127.0.0.1]:53291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Od2-00059v-P0
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:19:48 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:45097)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2Od1-00059n-DO
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:19:48 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NGW00J007W82G00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 20:19:46 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW00I0L88XNC70@HIDDEN>;
 Sat, 20 Dec 2014 20:19:46 +0200 (IST)
Date: Sat, 20 Dec 2014 20:19:36 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <5495B712.5040402@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83r3vuqj47.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN> <83zjaiqnsm.fsf@HIDDEN>
 <5495B712.5040402@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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:14 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  >> I need a corresponding `window-char-height' as well, probably also with
>  >> a FACE argument.
>  >
>  > Without the FACE argument, you already have default-font-height,
> 
> It's the window that establishes the correspondence between a buffer and
> its frame.  Otherwise we can do away with `window-char-width' as well.

We are miscommunicating.  What I pointed out that if FACE doesn't
matter, you already have the function you are after, in reply to your
"probably also with a FACE".  That's all I wanted to say.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 18:17:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 13:17:04 2014
Received: from localhost ([127.0.0.1]:53287 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2OaO-00055w-3P
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:17:04 -0500
Received: from mtaout27.012.net.il ([80.179.55.183]:45463)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2OaK-00055P-Ru
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 13:17:02 -0500
Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il
 (HyperSendmail v2007.08) id <0NGW00A007I9TC00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 20:13:03 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW007F67XQHQ40@HIDDEN>; Sat, 20 Dec 2014 20:13:03 +0200 (IST)
Date: Sat, 20 Dec 2014 20:16:49 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <5495B700.8080403@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83sigaqj8u.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
 <831tnus2gv.fsf@HIDDEN> <5495B700.8080403@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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:50:56 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  >> You mean as far as the Emacs display engine is concerned, right?  But
>  >> the caller of `face-font' doesn't know that the display engine operates
>  >> on the current buffer regardless of whether it is displayed or not.
>  >
>  > She doesn't need to know: the effect doesn't depend on that.
> 
> If I want to right-adjust the last word of a buffer line I apparently
> have to provide the buffer _and_ the frame in order to know how many
> spaces to insert.

Yes, and with-current-buffer achieves that, right?

>  >> What means "applied"?  Is it merged or does it replace the
>  >> frame-specific face?
>  >
>  > It replaces the original frame-specific face.
> 
> IIUC this contradicts an earlier observation by Titus that
> 
>    if the buffer in the specified window is displayed in two frames,
>    the returned character width was always the one used in the current
>    frame which is not necessarily the character width in the specified
>    window (the window may be in the other frame).  This is a problem
>    because character width can be different, if the two frames use
>    different default fonts.

I don't see any contradictions.  I said nothing about windows, only
about frames and buffers.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 17:51:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 12:51:28 2014
Received: from localhost ([127.0.0.1]:53259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2OBb-0004Ro-PB
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:51:28 -0500
Received: from mout.gmx.net ([212.227.17.22]:56106)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2OBa-0004Rf-IS
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:51:27 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx103)
 with ESMTPSA (Nemesis) id 0M9KR0-1YCo3G2nQk-00ClVH; Sat, 20 Dec 2014 18:51:24
 +0100
Message-ID: <5495B712.5040402@HIDDEN>
Date: Sat, 20 Dec 2014 18:51:14 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN> <83zjaiqnsm.fsf@HIDDEN>
In-Reply-To: <83zjaiqnsm.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:VlxdO4rOGwW0RZ/hA6K9ntCc8P+3AwdcUXZCCzA5ijxJ+LqB4Su
 Rvo/OFoD12znO5JnTbIPOPkXV+yWcOBJ4urXBtonau8znDNVAsKlzSunOARQVdMVOcoW+Sa
 rhrbiOBjXR0njUuCxdXRr/7oigvfECk2S4hAPM0B6AWa8zfH1Q/288lOi7CB3A9FiLnPhXJ
 ZmfcK2+XUAT/j3Zbp8LcA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 faces apparently _get_ merged dependent on the buffer _and_ the
 >> frame.
 >
 > Remapped faces might depend on the buffer

... and the frame ...

 > , non-remapped ones depend
 > only on the frame.
 >
 >> I need a corresponding `window-char-height' as well, probably also with
 >> a FACE argument.
 >
 > Without the FACE argument, you already have default-font-height,

It's the window that establishes the correspondence between a buffer and
its frame.  Otherwise we can do away with `window-char-width' as well.

 >> I profoundly dislike the "default-" prefix here.  `buffer-font-height'
 >> and `buffer-font-width' would be much better IMHO.
 >
 > But a buffer can use a variety of fonts.

OK.  Then this needs a better doc-string.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 17:51:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 12:51:19 2014
Received: from localhost ([127.0.0.1]:53256 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2OBT-0004RJ-Da
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:51:19 -0500
Received: from mout.gmx.net ([212.227.17.21]:61568)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2OBP-0004R6-Db
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:51:16 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx102)
 with ESMTPSA (Nemesis) id 0LcEPJ-1XaRIG3jrp-00jayM; Sat, 20 Dec 2014 18:51:10
 +0100
Message-ID: <5495B700.8080403@HIDDEN>
Date: Sat, 20 Dec 2014 18:50:56 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
 <831tnus2gv.fsf@HIDDEN>
In-Reply-To: <831tnus2gv.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:GNUAj7o94YxAlhVvZ8fQJtB56XHzhfl14yrKPwWwio/zfw8riAl
 A3b2ywObkocehF9ua9WeljM4ZQAu3iFi/jwWMEEl0tWl432HNOQk5D3FfBdKnlTBCHdXiH1
 jwxVc6Ro9NsQUWC9nJOuvxnbDEtOL+2Fq85vS2M2gkrRYDEsDscbBjvrw3bRPhCrvGFlhLn
 GXTjdfG9WQV6dHKQRXEag==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 (/)

 >> You mean as far as the Emacs display engine is concerned, right?  But
 >> the caller of `face-font' doesn't know that the display engine operates
 >> on the current buffer regardless of whether it is displayed or not.
 >
 > She doesn't need to know: the effect doesn't depend on that.

If I want to right-adjust the last word of a buffer line I apparently
have to provide the buffer _and_ the frame in order to know how many
spaces to insert.

 >> What means "applied"?  Is it merged or does it replace the
 >> frame-specific face?
 >
 > It replaces the original frame-specific face.

IIUC this contradicts an earlier observation by Titus that

   if the buffer in the specified window is displayed in two frames,
   the returned character width was always the one used in the current
   frame which is not necessarily the character width in the specified
   window (the window may be in the other frame).  This is a problem
   because character width can be different, if the two frames use
   different default fonts.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 17:28:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 12:28:37 2014
Received: from localhost ([127.0.0.1]:53248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2NpV-0003q2-1e
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:28:37 -0500
Received: from mx02.posteo.de ([89.146.194.165]:47567)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y2NpS-0003pq-08
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 12:28:35 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id D4E3725ACC26;
 Sat, 20 Dec 2014 18:28:32 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k4YnX4fZwz5vND;
 Sat, 20 Dec 2014 18:28:32 +0100 (CET)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
In-Reply-To: <5495906D.7030800@HIDDEN>
Message-Id: <1228A341-AA54-41A0-81CB-256220D73ABF@HIDDEN>
Date: Sat, 20 Dec 2014 16:45:26 +0100
To: martin rudalics <rudalics@HIDDEN>
Mime-Version: 1.0 (1.0)
X-Mailer: iPhone Mail (11D257)
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: "19395 <at> debbugs.gnu.org" <19395 <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.7 (/)



(Sent from my cell phone.)

>> On 20.12.2014, at 16:06, martin rudalics <rudalics@HIDDEN> wrote:
>>=20
>> (defun window-char-width (&optional window face)
>>    "Return character width for WINDOW.
>> WINDOW must be a live window and defaults to the selected one.
>>=20
>> FACE is the face for which character width should be
>> returned.  Buffer-local face remappings are applied.  If nil, the
>> default face is used."
>>    (with-selected-window (window-normalize-window window t)
>>      (let* ((face (if face face 'default))
>>       (info (font-info (face-font face)))
>>       (width (aref info 11)))
>>        (if (> width 0)
>>     width
>>    (aref info 10)))))
>>=20
>> (defun window-max-characters-per-line (&optional window face)
>>   "Return the number of characters that can be displayed
>> on one line.
>> WINDOW must be a live window and defaults to the selected one.
>>=20
>> FACE is the face whose character width should be used for the
>> calculation.  Buffer-local face remappings are applied.  If nil,
>> the default face is used.
>>=20
>> This function is different from `window-body-width' in that it
>> accounts for fringes (when at least one fringe has zero width,
>> one column is reserved for continuation characters) and for the
>> size of the default font (which may have been adjusted using,
>> e.g., `text-scale-increase')."
>>   (with-selected-window (window-normalize-window window t)
>>     (let* ((window-width (window-body-width window t))
>>            (font-width (window-char-width window face))
>>            (ncols (/ window-width font-width)))
>>       (if (and (display-graphic-p)
>>                overflow-newline-into-fringe
>>                (/=3D (frame-parameter nil 'left-fringe) 0)
>>                (/=3D (frame-parameter nil 'right-fringe) 0))
>>           ncols
>>         (1- ncols)))))
>>=20
>> Note that the first function is a variant of Martin's version which had
>> a bug: if the buffer in the specified window is displayed in two frames,
>> the returned character width was always the one used in the current
>> frame which is not necessarily the character width in the specified
>> window (the window may be in the other frame).  This is a problem
>> because character width can be different, if the two frames use
>> different default fonts.
>=20
> So this what I've been trying to find out all the time.  The faces
> apparently _get_ merged dependent on the buffer _and_ the frame.

Yes, my understanding is that each frame has a default face. The properties i=
n the buffer-local face-remapping-alist overwrite the vales of the dafault f=
ace. Windows do not influence the font.

>=20
> I need a corresponding `window-char-height' as well, probably also with
> a FACE argument.

Yes, that makes sense. I can add it if you want.

>=20
>> For completeness, it probably also makes sense to include the following
>> function in simple.el, which already has a function
>> `default-font-height'.
>>=20
>> (defun default-font-width ()
>>   "Return the width in pixels of the current buffer's default face font.
>=20
> I profoundly dislike the "default-" prefix here.  `buffer-font-height'
> and `buffer-font-width' would be much better IMHO.
>=20
>> I also added the bonus feature which lets you specify a specific face
>> that should be used for the calculations.
>=20
> So are you now sure that we don't need a specific character ("M") any
> more?
>=20
> martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 16:40:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:40:53 2014
Received: from localhost ([127.0.0.1]:53234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2N5I-0002eS-Td
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:40:53 -0500
Received: from mtaout21.012.net.il ([80.179.55.169]:52772)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2N5G-0002eJ-QL
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:40:51 -0500
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NGW002003GWLB00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 18:40:49 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW002L73O0KY10@HIDDEN>;
 Sat, 20 Dec 2014 18:40:49 +0200 (IST)
Date: Sat, 20 Dec 2014 18:40:41 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <54959DD5.3070009@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83y4q2qnp2.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN>
 <87k31mz6qy.fsf@HIDDEN> <54959DD5.3070009@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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:03:33 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: Eli Zaretskii <eliz@HIDDEN>, 19395 <at> debbugs.gnu.org
> 
> BTW, do we have some character or letter spacing which we should
> consider as well?  IIRC somone asked here for an orthogonal function
> that would consider line spacing.

There is already default-line-height which does that for the font of
the default face.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 16:38:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:38:44 2014
Received: from localhost ([127.0.0.1]:53222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2N3E-0002ap-JV
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:38:44 -0500
Received: from mtaout25.012.net.il ([80.179.55.181]:41021)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2N3C-0002af-5o
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:38:43 -0500
Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il
 (HyperSendmail v2007.08) id <0NGW00G003997L00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 18:34:28 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW009M83DGO960@HIDDEN>; Sat, 20 Dec 2014 18:34:28 +0200 (IST)
Date: Sat, 20 Dec 2014 18:38:33 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <5495906D.7030800@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83zjaiqnsm.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 16:06:21 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: 19395 <at> debbugs.gnu.org
> 
> The faces apparently _get_ merged dependent on the buffer _and_ the
> frame.

Remapped faces might depend on the buffer, non-remapped ones depend
only on the frame.

> I need a corresponding `window-char-height' as well, probably also with
> a FACE argument.

Without the FACE argument, you already have default-font-height,

>  > For completeness, it probably also makes sense to include the following
>  > function in simple.el, which already has a function
>  > `default-font-height'.
>  >
>  > (defun default-font-width ()
>  >    "Return the width in pixels of the current buffer's default face font.
> 
> I profoundly dislike the "default-" prefix here.  `buffer-font-height'
> and `buffer-font-width' would be much better IMHO.

But a buffer can use a variety of fonts.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 16:36:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:36:27 2014
Received: from localhost ([127.0.0.1]:53210 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2N11-0002XB-Hs
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:36:27 -0500
Received: from mtaout26.012.net.il ([80.179.55.182]:60413)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2N0y-0002Wz-Va
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:36:26 -0500
Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il
 (HyperSendmail v2007.08) id <0NGW007003C2IV00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 18:35:36 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW0077J3FBRQ00@HIDDEN>; Sat, 20 Dec 2014 18:35:36 +0200 (IST)
Date: Sat, 20 Dec 2014 18:36:16 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <54958CE0.9060105@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <831tnus2gv.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN> <54958CE0.9060105@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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:51:12 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  >> (with-selected-frame some-frame
>  >>     (with-current-buffer a-buffer-not-displayed-on-some-frame
>  >>       ...
>  >
>  > Which makes it "displayed", as far as Emacs is concerned, right?
> 
> You mean as far as the Emacs display engine is concerned, right?  But
> the caller of `face-font' doesn't know that the display engine operates
> on the current buffer regardless of whether it is displayed or not.

She doesn't need to know: the effect doesn't depend on that.

> (1) When two characters have the same face they are identic in their
>      appearance on screen.
> 
> (2) When two characters have a different appearance on screen they have
>      different faces.

I think YES to both, assuming both characters are on the same frame.
If not, then (2) might be false.

> For me it's difficult to discriminate the usage of the term "face" when
> programming Elisp from the usage of the term "face" when Emacs displays
> a character.

I was primarily talking about the latter.  But the different is small,
if it exists at all.

>  > face-remapping-alist is applied _after_ the frame-specific face is
>  > retrieved.  Does that answer your problem?
> 
> What means "applied"?  Is it merged or does it replace the
> frame-specific face?

It replaces the original frame-specific face.

>  >> IIUC face remapping maps a default face (which may be frame specific or
>  >> not) via a scaling value (which may be buffer local or not) to another
>  >> face whose width I eventually want to retrieve via `face-font'.  Does
>  >> the buffer/frame/window relationship affect that value and if so how?
>  >
>  > AFAIK, only the buffer matters, since face-remapping-alist is
>  > buffer-local.
> 
> It's doc-string says
> 
>    If this variable is made buffer-local, the face remapping takes effect
>    only in that buffer.

OK, _if_ face-remapping-alist is buffer-local.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 16:31:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:31:38 2014
Received: from localhost ([127.0.0.1]:53198 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2MwL-0002PZ-VJ
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:31:38 -0500
Received: from mtaout27.012.net.il ([80.179.55.183]:56742)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2MwI-0002PP-TF
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:31:36 -0500
Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il
 (HyperSendmail v2007.08) id <0NGW00A002VU6A00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 18:27:37 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGW0097G320OU10@HIDDEN>; Sat, 20 Dec 2014 18:27:37 +0200 (IST)
Date: Sat, 20 Dec 2014 18:31:25 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87oaqyz85s.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83388as2oy.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Sat, 20 Dec 2014 15:51:27 +0100
> 
> >    (aref (font-info (face-font 'default)) 11)
> 
> Great, thanks for adding this.  Below the updated version of my solution
> to the original problem:

Looks good to me.  A few comments about the doc strings:

> (defun window-char-width (&optional window face)
>    "Return character width for WINDOW.

      Return average character width for the font of FACE used in WINDOW.

> FACE is the face for which character width should be
> returned.

This is redundant with my proposed change above.

>           Buffer-local face remappings are applied.  If nil, the
> default face is used."

I would reverse the order:

  If FACE is nil or omitted, the default face is used.  If FACE is
  remapped (see `face-remapping-alist'), the function returns the
  information for the remapped face.

> (defun window-max-characters-per-line (&optional window face)
>   "Return the number of characters that can be displayed
> on one line.

This should be one line, and it is better to mention WINDOW there.

> Buffer-local face remappings are applied.

"Are applied" is too vague, and might confuse.  See my rewording above
for one possible solution.

> This function is different from `window-body-width' in that it
> accounts for fringes

Actually, it accounts for the portions of the line reserved for the
continuation glyph.  Missing fringes are just the trigger to reserve
that.

> one column is reserved for continuation characters) and for the

Please use "glyphs" here, as it could be a string, not a single
character.  (This is explained in the documentation of
standard-display-table.)

> For completeness, it probably also makes sense to include the following
> function in simple.el, which already has a function
> `default-font-height'.

I agree.

Thanks.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 16:03:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 11:03:48 2014
Received: from localhost ([127.0.0.1]:53085 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2MVQ-0001fr-9E
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:03:48 -0500
Received: from mout.gmx.net ([212.227.15.15]:59607)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2MVN-0001fi-RY
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 11:03:46 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0MLOMM-1Y2ujd0eYc-000fQ4; Sat, 20 Dec 2014 17:03:43
 +0100
Message-ID: <54959DD5.3070009@HIDDEN>
Date: Sat, 20 Dec 2014 17:03:33 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Titus von der Malsburg <malsburg@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN>
 <87k31mz6qy.fsf@HIDDEN>
In-Reply-To: <87k31mz6qy.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:pdQktBe6lwbUePUVpLHhFJH85CXz48QqxNjhGJgGRMWMVKQ9giP
 tOBitoUnr00PcNORaBmHPnn2k8ATI+aONtrmD/aYmA8dth0BeBNi2HDqMLZ8KUXDT+7PolV
 LlRts/SkIJ9SDWfqzCZrR0PQoEP1IiLIjYiJ39yFPaEdHCIRFPy9867kqKMLuTdp/gkeohs
 jE8riCoik72889ySIAP6Q==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
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 thing is that the value is not fully determined by the buffer, so I
 > think the name buffer-font-width is a little
 > misleading.  `frame-buffer-font-width' is more precise but also a little
 > unwieldy.

I've been confused enough already.  It would be nice to get this right
once and for all.

 > The other problem is that `default-font-height' is already a
 > standard Emacs function and renaming it will cause problems.

We would add an alias, obviously.

 >>   > I also added the bonus feature which lets you specify a specific face
 >>   > that should be used for the calculations.
 >>
 >> So are you now sure that we don't need a specific character ("M") any
 >> more?
 >
 > If I understand correctly, the returned value is based on the width of a
 > space.  In proportional fonts that will of course differ from the width
 > of other characters.  But I think this is not a big problem because the
 > notion of characters per line doesn't make sense for proportional fonts
 > and using proportional fonts in Emacs is a terrible idea
 > anyway.  But perhaps this issue should be mentioned in the doc string.

I forgot that it was Joe Corneli who asked for this in another thread.
But once we have a function like `window-max-characters-per-line' it
would make sense to have it consider the maximum width of a proportional
font character as well and we'd fix his problem as well

BTW, do we have some character or letter spacing which we should
consider as well?  IIRC somone asked here for an orthogonal function
that would consider line spacing.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 15:22:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 10:22:02 2014
Received: from localhost ([127.0.0.1]:53076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Lqz-0000Rf-QI
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 10:22:02 -0500
Received: from mx02.posteo.de ([89.146.194.165]:36980)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y2Lqx-0000RI-NY
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 10:22:00 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id E608425AF516;
 Sat, 20 Dec 2014 16:21:58 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k4VzV3nzWz5vN3;
 Sat, 20 Dec 2014 16:21:58 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN> <5495906D.7030800@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <5495906D.7030800@HIDDEN>
Date: Sat, 20 Dec 2014 16:21:57 +0100
Message-ID: <87k31mz6qy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
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.7 (/)

--=-=-=
Content-Type: text/plain


On 2014-12-20 Sat 16:06, martin rudalics wrote:
>  > (defun default-font-width ()
>  >    "Return the width in pixels of the current buffer's default face font.
>
> I profoundly dislike the "default-" prefix here.  `buffer-font-height'
> and `buffer-font-width' would be much better IMHO.

The thing is that the value is not fully determined by the buffer, so I
think the name buffer-font-width is a little
misleading.  `frame-buffer-font-width' is more precise but also a little
unwieldy.  The other problem is that `default-font-height' is already a
standard Emacs function and renaming it will cause problems.

>  > I also added the bonus feature which lets you specify a specific face
>  > that should be used for the calculations.
>
> So are you now sure that we don't need a specific character ("M") any
> more?

If I understand correctly, the returned value is based on the width of a
space.  In proportional fonts that will of course differ from the width
of other characters.  But I think this is not a big problem because the
notion of characters per line doesn't make sense for proportional fonts
and using proportional fonts in Emacs is a terrible idea
anyway.  But perhaps this issue should be mentioned in the doc string.

  Titus



--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUlZQVAAoJEK40WfPGE2idUmMIAIVIOLnI3uwOokLc8ueyH2b/
7/Bs0qMo3h+GLHbadxRN3CDMHLiIYxmUue9jr4KM1T9aECVE/GXcx1Nyf9xv1lhs
WbmAPcCUdVK26aaD0Gs9dQylQJ1N1Z17w3KYYIaSiuropo7sbRUUyBDgWp0x/gP/
ZcpSAaumyXFQHNXV+q/o4Bh3BBFVHM0CoE8XeuplqL137wlWeyHKbF6hJs4QsEG5
xx9p7F4u7grUrE8OHS7m2DM0jtLBro34f+L1ojH5Vd+XHLdQ8Fobuilk8YmRMhP/
QTvM8oAuBlU92CVxYTDnAE2LNTWZpfsJ2ROJkBOqNWZr6jrphFDAogQD7oDljZA=
=g/Y/
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 15:06:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 10:06:43 2014
Received: from localhost ([127.0.0.1]:53072 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2LcB-0008Vj-7W
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 10:06:43 -0500
Received: from mout.gmx.net ([212.227.15.19]:62302)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2Lc3-0008Vb-HC
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 10:06:36 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0M0xbD-1Xm4To1ckR-00v7u0; Sat, 20 Dec 2014 16:06:31
 +0100
Message-ID: <5495906D.7030800@HIDDEN>
Date: Sat, 20 Dec 2014 16:06:21 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Titus von der Malsburg <malsburg@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN>
 <83k31rwe55.fsf@HIDDEN>	<87lhm772o2.fsf@HIDDEN>
 <83h9wvwbux.fsf@HIDDEN>	<87bnn39cpe.fsf@HIDDEN>
 <83a92mwau9.fsf@HIDDEN>	<874msu9out.fsf@HIDDEN>
 <83vblauoh6.fsf@HIDDEN>	<87wq5q864m.fsf@HIDDEN>
 <83tx0uum88.fsf@HIDDEN>	<87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
 <87oaqyz85s.fsf@HIDDEN>
In-Reply-To: <87oaqyz85s.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:wI8fOUdZGNN9S49LyIsqerA7NUTvONTyOLrZQGfkoH3c3snshPL
 xuHS9UK7+L/6YnucYFCOytHrwPwHPxkT7Idp0f94rNKqhcouRTKEf0pYI0JBMdfggafsAVO
 5mRqZp+vu8MjUd0nJKOhbObwhGJ/qoopctF2xp0pX5AKxve+vK14SKN6V+5jniANaLgLc37
 0T+lMZzusce58dZcSfKog==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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 (/)

 > (defun window-char-width (&optional window face)
 >     "Return character width for WINDOW.
 > WINDOW must be a live window and defaults to the selected one.
 >
 > FACE is the face for which character width should be
 > returned.  Buffer-local face remappings are applied.  If nil, the
 > default face is used."
 >     (with-selected-window (window-normalize-window window t)
 >       (let* ((face (if face face 'default))
 > 	    (info (font-info (face-font face)))
 > 	    (width (aref info 11)))
 >         (if (> width 0)
 > 	  width
 > 	 (aref info 10)))))
 >
 > (defun window-max-characters-per-line (&optional window face)
 >    "Return the number of characters that can be displayed
 > on one line.
 > WINDOW must be a live window and defaults to the selected one.
 >
 > FACE is the face whose character width should be used for the
 > calculation.  Buffer-local face remappings are applied.  If nil,
 > the default face is used.
 >
 > This function is different from `window-body-width' in that it
 > accounts for fringes (when at least one fringe has zero width,
 > one column is reserved for continuation characters) and for the
 > size of the default font (which may have been adjusted using,
 > e.g., `text-scale-increase')."
 >    (with-selected-window (window-normalize-window window t)
 >      (let* ((window-width (window-body-width window t))
 >             (font-width (window-char-width window face))
 >             (ncols (/ window-width font-width)))
 >        (if (and (display-graphic-p)
 >                 overflow-newline-into-fringe
 >                 (/= (frame-parameter nil 'left-fringe) 0)
 >                 (/= (frame-parameter nil 'right-fringe) 0))
 >            ncols
 >          (1- ncols)))))
 >
 > Note that the first function is a variant of Martin's version which had
 > a bug: if the buffer in the specified window is displayed in two frames,
 > the returned character width was always the one used in the current
 > frame which is not necessarily the character width in the specified
 > window (the window may be in the other frame).  This is a problem
 > because character width can be different, if the two frames use
 > different default fonts.

So this what I've been trying to find out all the time.  The faces
apparently _get_ merged dependent on the buffer _and_ the frame.

I need a corresponding `window-char-height' as well, probably also with
a FACE argument.

 > For completeness, it probably also makes sense to include the following
 > function in simple.el, which already has a function
 > `default-font-height'.
 >
 > (defun default-font-width ()
 >    "Return the width in pixels of the current buffer's default face font.

I profoundly dislike the "default-" prefix here.  `buffer-font-height'
and `buffer-font-width' would be much better IMHO.

 > I also added the bonus feature which lets you specify a specific face
 > that should be used for the calculations.

So are you now sure that we don't need a specific character ("M") any
more?

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 14:51:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 09:51:36 2014
Received: from localhost ([127.0.0.1]:52259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2LNX-0007yG-Bn
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:51:35 -0500
Received: from mx02.posteo.de ([89.146.194.165]:58650)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y2LNU-0007y7-FE
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:51:33 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id 5B60625A3DD3;
 Sat, 20 Dec 2014 15:51:31 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k4VJM0sD5z5vN8;
 Sat, 20 Dec 2014 15:51:30 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <837fxpue6v.fsf@HIDDEN>
Date: Sat, 20 Dec 2014 15:51:27 +0100
Message-ID: <87oaqyz85s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


On 2014-12-18 Thu 17:15, Eli Zaretskii wrote:
>> From: Titus von der Malsburg <malsburg@HIDDEN>
>> Cc: 19395 <at> debbugs.gnu.org
>> Date: Wed, 17 Dec 2014 19:36:04 -0800
>>=20
>> > But if we want this function to be more generally useful, it
>> > shouldn't be limited to the frame's canonical character size, and
>> > should at least take the face-remapping into account.  Bonus points
>> > for accepting a face as an argument and using that face's font
>> > dimensions.
>>=20
>> This is more difficult than I thought.  Below is a first sketch.  Let me
>> know if you think this is going in the right direction and I'll polish
>> it and add the bonus feature.
>>=20
>> It appears that a font has to be rendered before Emacs can tell how wide
>> a character is.  That's why we need the temporary buffer.  Not elegant,
>> but I couldn't find a better way.  `default-font-width' complements
>> `default-font-height' in simple.el.  The other function would go into
>> window.el.
>
> Given the changes I pushed in commit b197822, you will no longer need
> all this complexity.  Just
>
>    (aref (font-info (face-font 'default)) 11)

Great, thanks for adding this.  Below the updated version of my solution
to the original problem:

(defun window-char-width (&optional window face)
   "Return character width for WINDOW.
WINDOW must be a live window and defaults to the selected one.

FACE is the face for which character width should be
returned.  Buffer-local face remappings are applied.  If nil, the
default face is used."
   (with-selected-window (window-normalize-window window t)
     (let* ((face (if face face 'default))
	    (info (font-info (face-font face)))
	    (width (aref info 11)))
       (if (> width 0)
	  width
	 (aref info 10)))))

(defun window-max-characters-per-line (&optional window face)
  "Return the number of characters that can be displayed
on one line.
WINDOW must be a live window and defaults to the selected one.

FACE is the face whose character width should be used for the
calculation.  Buffer-local face remappings are applied.  If nil,
the default face is used.

This function is different from `window-body-width' in that it
accounts for fringes (when at least one fringe has zero width,
one column is reserved for continuation characters) and for the
size of the default font (which may have been adjusted using,
e.g., `text-scale-increase')."
  (with-selected-window (window-normalize-window window t)
    (let* ((window-width (window-body-width window t))
           (font-width (window-char-width window face))
           (ncols (/ window-width font-width)))
      (if (and (display-graphic-p)
               overflow-newline-into-fringe
               (/=3D (frame-parameter nil 'left-fringe) 0)
               (/=3D (frame-parameter nil 'right-fringe) 0))
          ncols
        (1- ncols)))))

Note that the first function is a variant of Martin's version which had
a bug: if the buffer in the specified window is displayed in two frames,
the returned character width was always the one used in the current
frame which is not necessarily the character width in the specified
window (the window may be in the other frame).  This is a problem
because character width can be different, if the two frames use
different default fonts.

For completeness, it probably also makes sense to include the following
function in simple.el, which already has a function
`default-font-height'.

(defun default-font-width ()=20
  "Return the width in pixels of the current buffer's default face font.

Buffer-local face remappings are applied."
  (let* ((info (font-info (face-font 'default)))
	 (width (aref info 11)))
    (if (> width 0)
	width
      (aref info 10))))

> (For bullet-proof code, check that this is not zero, and if it is, use
> the 10th member instead; see the docs.)

This is checked.

> If we are going to put this in simple.el or subr.el, I don't think we
> need to worry about XEmacs.

I removed that part of the condition.

I also added the bonus feature which lets you specify a specific face
that should be used for the calculations.

  Titus


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUlYzwAAoJEK40WfPGE2idG7cIAIaSGHFatqgwpcM9x2he9tCX
bOofykFl+C1HmK4q8YJka1MLJdEV97e8LJqugnr8S1rXV78UMm2P1l7ofMroIvLk
EebNFrvEuwbqdlXKeN8SCRQdrPUCiKNoHVP75Elf2XmJkmt6F0SxCyZYOBvKW2bF
yQC2xxDEgE5OeYlIsmc7IOlc0MslG/Vq2blwDO6VphbG/ta2VeFcjkWMPSHUH0Zg
sdaEBAG5dzgxTrZJqKBsW/MH0ItgY9MNf2LDKYwt3uzvWAPxgnCGjTKQwa7SSb3b
xukK/d8+Bk4l515P8BF9GTtFGM6YbxPuHgftSZA/EHAcPEntCvKJbfC5D/j7zx4=
=9iLG
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 14:51:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 09:51:28 2014
Received: from localhost ([127.0.0.1]:52256 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2LNP-0007xv-Ta
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:51:28 -0500
Received: from mout.gmx.net ([212.227.15.18]:51735)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2LNN-0007xn-VA
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 09:51:26 -0500
Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx002)
 with ESMTPSA (Nemesis) id 0MhAAr-1YFM3W3geH-00MJSq; Sat, 20 Dec 2014 15:51:24
 +0100
Message-ID: <54958CE0.9060105@HIDDEN>
Date: Sat, 20 Dec 2014 15:51:12 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN> <838ui2sd54.fsf@HIDDEN>
In-Reply-To: <838ui2sd54.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:J/v3HN9LqCuv6Y/PXr5eejELu1SbZfZddKaxmZEITn59urf1RIZ
 BfXJz7qsB815k7NZiSNzN72XK1495pQoxZVnmHuUfeGSDGRjW2xTDWHcrIFZxHAXlrdte3Q
 17soDZLOlQtIMUr0AcvtgK4fe26l2UOgevx53tj3CrMriGBWYWt8NCYK8z4Mz+Yvn24MXpt
 ztAHKN58csNziWORWpCjA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 (/)

 > Ah, OK.  That probably wants you to use the Brave New World's
 >
 >     (face-attribute 'default :font)
 >
 > instead of using face-font.

OK.  So let's do without Huxley.

 >>   > How can the current buffer be not displayed in the selected frame?
 >>
 >> As in
 >>
 >> (with-selected-frame some-frame
 >>     (with-current-buffer a-buffer-not-displayed-on-some-frame
 >>       ...
 >
 > Which makes it "displayed", as far as Emacs is concerned, right?

You mean as far as the Emacs display engine is concerned, right?  But
the caller of `face-font' doesn't know that the display engine operates
on the current buffer regardless of whether it is displayed or not.

 > What do you want to understand?  In a nutshell, we go through the
 > face-remapping-alist, and if the face is there, use the remapped
 > face's attributes instead.

I can only guess - are the following statements correct wrt to display?

(1) When two characters have the same face they are identic in their
     appearance on screen.

(2) When two characters have a different appearance on screen they have
     different faces.

For me it's difficult to discriminate the usage of the term "face" when
programming Elisp from the usage of the term "face" when Emacs displays
a character.

 > face-remapping-alist is applied _after_ the frame-specific face is
 > retrieved.  Does that answer your problem?

What means "applied"?  Is it merged or does it replace the
frame-specific face?

 >> IIUC face remapping maps a default face (which may be frame specific or
 >> not) via a scaling value (which may be buffer local or not) to another
 >> face whose width I eventually want to retrieve via `face-font'.  Does
 >> the buffer/frame/window relationship affect that value and if so how?
 >
 > AFAIK, only the buffer matters, since face-remapping-alist is
 > buffer-local.

It's doc-string says

   If this variable is made buffer-local, the face remapping takes effect
   only in that buffer.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 12:45:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 07:45:50 2014
Received: from localhost ([127.0.0.1]:52216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2JPq-0004fA-38
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 07:45:50 -0500
Received: from mtaout24.012.net.il ([80.179.55.180]:38467)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2JPn-0004f1-Vg
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 07:45:49 -0500
Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il
 (HyperSendmail v2007.08) id <0NGV00300RRDVE00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 14:37:55 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGV004B5SF6UZ10@HIDDEN>; Sat, 20 Dec 2014 14:37:55 +0200 (IST)
Date: Sat, 20 Dec 2014 14:45:43 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <549560B9.5070308@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <838ui2sd54.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
 <549560B9.5070308@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 12:42:49 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  > AFAIU, it only says so about the set-face-FOO functions, which doesn't
>  > include face-font.
> 
> Here I see in "37.12.3 Face Attribute Functions"
> 
> ...
> 
>     The following functions examine the attributes of a face.  They
> mostly provide compatibility with old versions of Emacs.  If you don't
> specify FRAME, they refer to the selected frame; `t' refers to the
> default data for new frames.  They return `unspecified' if the face
> doesn't define any value for that attribute.  If INHERIT is `nil', only
> an attribute directly defined by the face is returned.  If INHERIT is
> non-`nil', any faces specified by its `:inherit' attribute are
> considered as well, and if INHERIT is a face or a list of faces, then
> they are also considered, until a specified attribute is found.  To
> ensure that the return value is always specified, use a value of
> `default' for INHERIT.
> 
>   -- Function: face-font face &optional frame
>       This function returns the name of the font of face FACE.

Ah, OK.  That probably wants you to use the Brave New World's

   (face-attribute 'default :font)

instead of using face-font.

>  > How can the current buffer be not displayed in the selected frame?
> 
> As in
> 
> (with-selected-frame some-frame
>    (with-current-buffer a-buffer-not-displayed-on-some-frame
>      ...

Which makes it "displayed", as far as Emacs is concerned, right?

IOW, for this purpose, the fact that the display engine didn't
actually display the buffer doesn't matter.  All we need is the frame
and access to face-remapping-alist.

>  >> I still don't
>  >> understand where and how text rescaling is applied.
>  >
>  > In face-remap.el, and then in xfaces.c (search for face_remapping in
>  > the latter).
> 
> This boils down to understanding the 200+ lines of merge_face_ref, at
> least.

What do you want to understand?  In a nutshell, we go through the
face-remapping-alist, and if the face is there, use the remapped
face's attributes instead.

> If I look at the doc-string of say `text-scale-adjust' I cannot see that
> some buffer local value is mentioned although C-x C-- clearly has only a
> buffer local effect here.  So I obviously have to delve into the doc of
> something like `face-remapping-alist' which, however, doesn't mention
> any relationship of faces to frames.

face-remapping-alist is applied _after_ the frame-specific face is
retrieved.  Does that answer your problem?

> IIUC face remapping maps a default face (which may be frame specific or
> not) via a scaling value (which may be buffer local or not) to another
> face whose width I eventually want to retrieve via `face-font'.  Does
> the buffer/frame/window relationship affect that value and if so how?

AFAIK, only the buffer matters, since face-remapping-alist is
buffer-local.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 11:43:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 06:43:06 2014
Received: from localhost ([127.0.0.1]:52173 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2IR7-0001nM-F0
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:43:05 -0500
Received: from mout.gmx.net ([212.227.15.18]:56350)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2IR3-0001mv-LF
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:43:02 -0500
Received: from [178.190.22.249] ([178.190.22.249]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0LxPNC-1XruP80eUM-016tTQ;
 Sat, 20 Dec 2014 12:43:00 +0100
Message-ID: <549560B9.5070308@HIDDEN>
Date: Sat, 20 Dec 2014 12:42:49 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN> <83bnmysi2n.fsf@HIDDEN>
In-Reply-To: <83bnmysi2n.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:OqW/AR8dX8nEa7zPjG8hcBuskLn4Vsg77/k1XELNjO0+rOZyxq2
 tCVjln7cz7CuONghxqkNt1PUiSIy1HgVEC6CpyuSd4N8gnegsTVyuQ8fXG8ht2rP5IHfM5z
 w5g9YmT3aSVARKhaPeTs6+3LEoVTPM5VpmkP4MnE79PRgzU96ap/bFwVjPRLko0zYhTYfwD
 909Go9Q6xRagkRCdvLB5g==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 (/)

 > AFAIU, it only says so about the set-face-FOO functions, which doesn't
 > include face-font.

Here I see in "37.12.3 Face Attribute Functions"

...

    The following functions examine the attributes of a face.  They
mostly provide compatibility with old versions of Emacs.  If you don't
specify FRAME, they refer to the selected frame; `t' refers to the
default data for new frames.  They return `unspecified' if the face
doesn't define any value for that attribute.  If INHERIT is `nil', only
an attribute directly defined by the face is returned.  If INHERIT is
non-`nil', any faces specified by its `:inherit' attribute are
considered as well, and if INHERIT is a face or a list of faces, then
they are also considered, until a specified attribute is found.  To
ensure that the return value is always specified, use a value of
`default' for INHERIT.

  -- Function: face-font face &optional frame
      This function returns the name of the font of face FACE.

...

Maybe "mostly" is special here.

 >> But we also should mention (and I still think `font-info' is the better
 >> place for that) what happens when the current buffer has rescaled text
 >> but is not displayed on the selected frame (or the frame denoted by the
 >> argument of `font-info').
 >
 > How can the current buffer be not displayed in the selected frame?

As in

(with-selected-frame some-frame
   (with-current-buffer a-buffer-not-displayed-on-some-frame
     ...

 >> I still don't
 >> understand where and how text rescaling is applied.
 >
 > In face-remap.el, and then in xfaces.c (search for face_remapping in
 > the latter).

This boils down to understanding the 200+ lines of merge_face_ref, at
least.

 > Assuming I understand correctly what is it that confused
 > you.

If I look at the doc-string of say `text-scale-adjust' I cannot see that
some buffer local value is mentioned although C-x C-- clearly has only a
buffer local effect here.  So I obviously have to delve into the doc of
something like `face-remapping-alist' which, however, doesn't mention
any relationship of faces to frames.

IIUC face remapping maps a default face (which may be frame specific or
not) via a scaling value (which may be buffer local or not) to another
face whose width I eventually want to retrieve via `face-font'.  Does
the buffer/frame/window relationship affect that value and if so how?

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 11:00:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 06:00:06 2014
Received: from localhost ([127.0.0.1]:52157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2HlV-0000f8-Fp
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:00:05 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:54365)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2HlR-0000e4-NP
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 06:00:03 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NGV00500NAQIP00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 13:00:00 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGV005JXNVZ4D80@HIDDEN>;
 Sat, 20 Dec 2014 13:00:00 +0200 (IST)
Date: Sat, 20 Dec 2014 13:00:00 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <54954AE8.10201@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83a92isi1b.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
 <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN> <83ppbhvd9s.fsf@HIDDEN>
 <jwv1tnxqbum.fsf-monnier+emacsbugs@HIDDEN> <83bnn1ufa9.fsf@HIDDEN>
 <54954AE8.10201@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN, monnier@HIDDEN
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 11:09:44 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
> 
>  > If someone wants to submit (an almost trivial) patch to add an option
>  > that would remove the continuation/truncation glyphs when there are no
>  > fringes, please go ahead.
> 
> I'm mising two trademarks: One for "someone" and another one for "almost
> trivial".

It's really almost trivial, I can provide hints if I see a volunteer
stepping forward.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 10:59:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 05:59:17 2014
Received: from localhost ([127.0.0.1]:52153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Hki-0000d6-Oq
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:59:17 -0500
Received: from mtaout23.012.net.il ([80.179.55.175]:38323)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y2Hkf-0000cu-Sg
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:59:15 -0500
Received: from conversion-daemon.a-mtaout23.012.net.il by
 a-mtaout23.012.net.il (HyperSendmail v2007.08) id
 <0NGV00E00NE9AT00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Sat, 20 Dec 2014 12:59:12 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGV00E7JNUN8650@HIDDEN>;
 Sat, 20 Dec 2014 12:59:12 +0200 (IST)
Date: Sat, 20 Dec 2014 12:59:12 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <54954ACE.7050204@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83bnmysi2n.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN> <54954ACE.7050204@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 11:09:18 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: malsburg@HIDDEN, 19395 <at> debbugs.gnu.org
> 
>  > I don't think the results of font-info depend on that.  It's the
>  > result of face-font that depend on the buffer and frame, but once you
>  > have the font's name, all the rest doesn't matter, since Emacs already
>  > have the font data structure set up and stored in memory.
> 
> Then we should mention the buffer for `face-font'.

I agree.  Feel free to add that (and please mention face remapping, as
I believe it is the only reason why the buffer, as opposed to the
frame, could be relevant).

> BTW, why does the Elisp manual say that it does "mostly provide
> compatibility with old versions of Emacs"?

AFAIU, it only says so about the set-face-FOO functions, which doesn't
include face-font.

> But we also should mention (and I still think `font-info' is the better
> place for that) what happens when the current buffer has rescaled text
> but is not displayed on the selected frame (or the frame denoted by the
> argument of `font-info').

How can the current buffer be not displayed in the selected frame?

> I would do that myself but I got lost in the code.  I still don't
> understand where and how text rescaling is applied.

In face-remap.el, and then in xfaces.c (search for face_remapping in
the latter).  Assuming I understand correctly what is it that confused
you.




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 10:09:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 05:09:59 2014
Received: from localhost ([127.0.0.1]:52126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Gz1-0007r5-CH
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:09:59 -0500
Received: from mout.gmx.net ([212.227.17.20]:62183)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2Gz0-0007qy-8t
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:09:58 -0500
Received: from [178.190.22.249] ([178.190.22.249]) by mail.gmx.com (mrgmx103)
 with ESMTPSA (Nemesis) id 0LgI0W-1XWZFf1tvI-00nl8D;
 Sat, 20 Dec 2014 11:09:55 +0100
Message-ID: <54954AE8.10201@HIDDEN>
Date: Sat, 20 Dec 2014 11:09:44 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>, 
 Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN>
 <83k31rwe55.fsf@HIDDEN>	<87lhm772o2.fsf@HIDDEN>
 <83h9wvwbux.fsf@HIDDEN>	<jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
 <83egrzvtb0.fsf@HIDDEN>	<jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN>
 <83388ewa4w.fsf@HIDDEN>	<jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
 <83ppbhvd9s.fsf@HIDDEN>	<jwv1tnxqbum.fsf-monnier+emacsbugs@HIDDEN>
 <83bnn1ufa9.fsf@HIDDEN>
In-Reply-To: <83bnn1ufa9.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:gDT0FMVt8N3gnSeTiDjkwPpKGfgOQjRwAlB+m7oIl7FjG+lojSu
 YDd2QD/JfC5KNwZFtLj9+N/CSP4U7iPjZEvbCP9BdBWP98QHqvBYEpZBMNwSBuNQ7q9yD3s
 ng7qJ0brJ1Cpn2C7Ada8M6y/YWp0j/ZfYdKQW6N8RK4SzfR4PrAVRcd6WtpZaGeVOt1kYvC
 7AuH7qplXZFiKA+hmVa9A==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 (/)

 > If someone wants to submit (an almost trivial) patch to add an option
 > that would remove the continuation/truncation glyphs when there are no
 > fringes, please go ahead.

I'm mising two trademarks: One for "someone" and another one for "almost
trivial".

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 20 Dec 2014 10:09:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 20 05:09:35 2014
Received: from localhost ([127.0.0.1]:52123 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y2Gyd-0007qM-2X
	for submit <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:09:35 -0500
Received: from mout.gmx.net ([212.227.17.21]:65463)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y2Gyb-0007qE-2j
 for 19395 <at> debbugs.gnu.org; Sat, 20 Dec 2014 05:09:33 -0500
Received: from [178.190.22.249] ([178.190.22.249]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0MBaDy-1YAYiS0ZJ0-00AS2e;
 Sat, 20 Dec 2014 11:09:30 +0100
Message-ID: <54954ACE.7050204@HIDDEN>
Date: Sat, 20 Dec 2014 11:09:18 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
 <83tx0rsa9e.fsf@HIDDEN>
In-Reply-To: <83tx0rsa9e.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:fGBaiBztmZlRYAvWavEcqxQNbYNcisD6Fw3k5av31C+mCLA5B+D
 aToD5kWOxXbJkkHe5OG55UN5ZVDk+4FuxgVrqVqSmtmX5SU5NGKr4Hi/R1rLss1mH9SRomX
 O57AfHilx11CU2g3As7wFBz5tNEBUqP3XQQd4obXYsIBx4I1PUeXk7kRCANxgsw3yVUk9VT
 gq92/xJF7idvSDQD8TvJA==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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 don't think the results of font-info depend on that.  It's the
 > result of face-font that depend on the buffer and frame, but once you
 > have the font's name, all the rest doesn't matter, since Emacs already
 > have the font data structure set up and stored in memory.

Then we should mention the buffer for `face-font'.  BTW, why does the
Elisp manual say that it does "mostly provide compatibility with old
versions of Emacs"?

But we also should mention (and I still think `font-info' is the better
place for that) what happens when the current buffer has rescaled text
but is not displayed on the selected frame (or the frame denoted by the
argument of `font-info').

I would do that myself but I got lost in the code.  I still don't
understand where and how text rescaling is applied.  Sorry.

martin




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

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


Received: (at 19395) by debbugs.gnu.org; 19 Dec 2014 19:35:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 19 14:35:49 2014
Received: from localhost ([127.0.0.1]:51803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y23L2-00064I-MK
	for submit <at> debbugs.gnu.org; Fri, 19 Dec 2014 14:35:48 -0500
Received: from mtaout29.012.net.il ([80.179.55.185]:40861)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y23Ky-000647-M6
 for 19395 <at> debbugs.gnu.org; Fri, 19 Dec 2014 14:35:46 -0500
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NGU00E00GKY7K00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Fri, 19 Dec 2014 21:33:08 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGU00FPHGZ82X10@HIDDEN>; Fri, 19 Dec 2014 21:33:08 +0200 (IST)
Date: Fri, 19 Dec 2014 21:35:41 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <54945BCB.8030506@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: martin rudalics <rudalics@HIDDEN>
Message-id: <83tx0rsa9e.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN> <54945BCB.8030506@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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, 19 Dec 2014 18:09:31 +0100
> From: martin rudalics <rudalics@HIDDEN>
> CC: 19395 <at> debbugs.gnu.org
> 
>  > Given the changes I pushed in commit b197822, you will no longer need
>  > all this complexity.  Just
>  >
>  >     (aref (font-info (face-font 'default)) 11)
>  >
>  > (For bullet-proof code, check that this is not zero, and if it is, use
>  > the 10th member instead; see the docs.)
> 
> Very good.  IIUC this means that I could use something like
> 
> (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)))))
> 
> (defun window-char-height (&optional window)
>    "Return default character height 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)
>      (aref (font-info (face-font 'default)) 3)))
> 
> in window.el.

Yes, that's the idea.

> If that is the case, then the doc of `font-info' should
> be somehow amended.  It currently says
> 
> Return information about a font named NAME on frame FRAME.
> 
> and nowhere mentions which buffer must be current or maybe even which
> window must be selected.

I don't think the results of font-info depend on that.  It's the
result of face-font that depend on the buffer and frame, but once you
have the font's name, all the rest doesn't matter, since Emacs already
have the font data structure set up and stored in memory.




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

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


Received: (at 19395) by debbugs.gnu.org; 19 Dec 2014 17:09:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 19 12:09:48 2014
Received: from localhost ([127.0.0.1]:51735 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y213j-00089A-VD
	for submit <at> debbugs.gnu.org; Fri, 19 Dec 2014 12:09:48 -0500
Received: from mout.gmx.net ([212.227.15.18]:53100)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1Y213h-000891-J0
 for 19395 <at> debbugs.gnu.org; Fri, 19 Dec 2014 12:09:46 -0500
Received: from [88.117.52.149] ([88.117.52.149]) by mail.gmx.com (mrgmx001)
 with ESMTPSA (Nemesis) id 0Llm5o-1XSxHv2HcO-00ZRuT; Fri, 19 Dec 2014 18:09:39
 +0100
Message-ID: <54945BCB.8030506@HIDDEN>
Date: Fri, 19 Dec 2014 18:09:31 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>, Titus von der Malsburg <malsburg@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
References: <87vblbnz2u.fsf@HIDDEN>
 <83k31rwe55.fsf@HIDDEN>	<87lhm772o2.fsf@HIDDEN>
 <83h9wvwbux.fsf@HIDDEN>	<87bnn39cpe.fsf@HIDDEN>
 <83a92mwau9.fsf@HIDDEN>	<874msu9out.fsf@HIDDEN>
 <83vblauoh6.fsf@HIDDEN>	<87wq5q864m.fsf@HIDDEN>
 <83tx0uum88.fsf@HIDDEN>	<87a92lmxy3.fsf@HIDDEN> <837fxpue6v.fsf@HIDDEN>
In-Reply-To: <837fxpue6v.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:hA6ccw3Va2PE4AR02Ephilmzs/5/YMYmtMoehhLTEGJ8QZk0bqF
 2pi5gSebH/VOlN0rCnubE6HhP/ECaULcv8VFzYhbJbcvjuwWlIHunpFRalM/lDOtsG0OwfF
 gMZIwXQkx+zEWW9zF8COLg6afj1WED3xVfmIt1ecGFfC1RrqC1bu+CpAwJP6YgTbzUBcuIN
 MJw5oYIzQ+iUj+6XRr4Lw==
X-UI-Out-Filterresults: notjunk:1;
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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 (/)

 > Given the changes I pushed in commit b197822, you will no longer need
 > all this complexity.  Just
 >
 >     (aref (font-info (face-font 'default)) 11)
 >
 > (For bullet-proof code, check that this is not zero, and if it is, use
 > the 10th member instead; see the docs.)

Very good.  IIUC this means that I could use something like

(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)))))

(defun window-char-height (&optional window)
   "Return default character height 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)
     (aref (font-info (face-font 'default)) 3)))

in window.el.  If that is the case, then the doc of `font-info' should
be somehow amended.  It currently says

Return information about a font named NAME on frame FRAME.

and nowhere mentions which buffer must be current or maybe even which
window must be selected.  I'm a bit too lazy to look into this myself.

Thanks a lot for this, martin




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 17:16:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 12:16:27 2014
Received: from localhost ([127.0.0.1]:50391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1egd-0004ju-DD
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 12:16:27 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:50588)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1egZ-0004jh-Pw
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 12:16:25 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NGS00100FTHCG00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Thu, 18 Dec 2014 19:16:22 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGS0016BFZ911C0@HIDDEN>;
 Thu, 18 Dec 2014 19:16:22 +0200 (IST)
Date: Thu, 18 Dec 2014 19:16:17 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87bnn39cpe.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83zjakubdq.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Tue, 16 Dec 2014 19:28:45 -0800
> 
> I see, thanks for explaining.  Perhaps it would make sense to amend the
> documentation of `window-width' because this is easy to misunderstand
> and I suspect that I'm not the only one who consults window-width in
> order to determine how much columns are available for text display.

Done.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 16:15:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 11:15:49 2014
Received: from localhost ([127.0.0.1]:50300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1djw-00037E-Un
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 11:15:49 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:40432)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1dju-000375-35
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 11:15:47 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NGS00000CYPZV00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Thu, 18 Dec 2014 18:15:45 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGS000PDD65T780@HIDDEN>;
 Thu, 18 Dec 2014 18:15:45 +0200 (IST)
Date: Thu, 18 Dec 2014 18:15:36 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87a92lmxy3.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <837fxpue6v.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
 <87a92lmxy3.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 19:36:04 -0800
> 
> > But if we want this function to be more generally useful, it
> > shouldn't be limited to the frame's canonical character size, and
> > should at least take the face-remapping into account.  Bonus points
> > for accepting a face as an argument and using that face's font
> > dimensions.
> 
> This is more difficult than I thought.  Below is a first sketch.  Let me
> know if you think this is going in the right direction and I'll polish
> it and add the bonus feature.
> 
> It appears that a font has to be rendered before Emacs can tell how wide
> a character is.  That's why we need the temporary buffer.  Not elegant,
> but I couldn't find a better way.  `default-font-width' complements
> `default-font-height' in simple.el.  The other function would go into
> window.el.

Given the changes I pushed in commit b197822, you will no longer need
all this complexity.  Just

   (aref (font-info (face-font 'default)) 11)

(For bullet-proof code, check that this is not zero, and if it is, use
the 10th member instead; see the docs.)

> (defun window-available-columns ()
>   "Return the maximal number of characters that can be displayed
> on one line.  This function is different from `window-body-width'
> in that it accounts for fringes (when at least one fringe has
> zero width, one column is reserved for continuation characters)
> and for the size of the default font (which may have been
> adjusted using, e.g., `text-scale-increase')."
>   (let* ((window-width (window-body-width nil t))
> 	 (font-width (default-font-width))
> 	 (ncols (/ window-width font-width)))
>     (if (and (not (featurep 'xemacs))
> 	     (display-graphic-p)
> 	     overflow-newline-into-fringe
> 	     (/= (frame-parameter nil 'left-fringe) 0)
> 	     (/= (frame-parameter nil 'right-fringe) 0))
>         ncols
>       (1- (ncols)))))

If we are going to put this in simple.el or subr.el, I don't think we
need to worry about XEmacs.

Thanks.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 15:52:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 10:52:30 2014
Received: from localhost ([127.0.0.1]:50274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1dNO-0002Te-Ck
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 10:52:30 -0500
Received: from mtaout24.012.net.il ([80.179.55.180]:48308)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1dNM-0002TV-HE
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 10:52:29 -0500
Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il
 (HyperSendmail v2007.08) id <0NGS00M00BECN700@HIDDEN> for
 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 17:44:36 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGS00J7MBQC7L50@HIDDEN>; Thu, 18 Dec 2014 17:44:36 +0200 (IST)
Date: Thu, 18 Dec 2014 17:52:22 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvvbl9ox2p.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83a92luf9l.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 8BIT
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <878ui79bv7.fsf@HIDDEN>
 <83d27iwazc.fsf@HIDDEN> <jwvegryezf6.fsf-monnier+emacsbugs@HIDDEN>
 <83oar1vd51.fsf@HIDDEN> <jwvvbl9ox2p.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: malsburg@HIDDEN,  19395 <at> debbugs.gnu.org
> Date: Thu, 18 Dec 2014 09:25:33 -0500
> 
> >> >   |left-to-right continued line |⤶
> >> >   |/RIGHT-TO-LEFT CONTINUED LINE|
> >> Why do you need the empty space at the end of the left-to-right line?
> > Because that empty space simply doesn't exist in the display line's
> > geometry, as far as the display engine is concerned.  Most of the
> > display engine is oblivious to the fact that an RTL line is reversed
> > on display, so it cannot do its job if some lines are longer than
> > others.
> 
> IOW, it's because it makes the implementation easier.

No, it makes it possible.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 15:52:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 10:52:08 2014
Received: from localhost ([127.0.0.1]:50271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1dN1-0002T1-Vl
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 10:52:08 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:36284)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1dMz-0002So-B4
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 10:52:06 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NGS00000BTSUQ00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Thu, 18 Dec 2014 17:52:03 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGS00071C2QIOA0@HIDDEN>;
 Thu, 18 Dec 2014 17:52:03 +0200 (IST)
Date: Thu, 18 Dec 2014 17:51:58 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwv1tnxqbum.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83bnn1ufa9.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
 <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN> <83ppbhvd9s.fsf@HIDDEN>
 <jwv1tnxqbum.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: malsburg@HIDDEN,  19395 <at> debbugs.gnu.org
> Date: Thu, 18 Dec 2014 09:24:05 -0500
> 
> >> So, it doesn't seem to be a request of terribly high importance.
> > But it's already done.
> 
> Yes, but your argument for not providing the "no fringe" behavior is
> that it would go against this request, so I'm pointing out that this is
> not a good enough reason.

If someone wants to submit (an almost trivial) patch to add an option
that would remove the continuation/truncation glyphs when there are no
fringes, please go ahead.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 14:25:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 09:25:53 2014
Received: from localhost ([127.0.0.1]:49583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1c1Y-0008Vh-MP
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 09:25:52 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:26079)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y1c1W-0008VZ-9S
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 09:25:50 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AmsPAOwQflTO+ILA/2dsb2JhbABbgweDYFCFCsI7gmIEAgKBJBcBAQEBAQF8hAMBAQQjMyMQCxoCGA4CAhQYDSSIU8AGllMBAQEBAQUBAQEBHoErj0QHgnWBUwWLAaQugXiEGSGCdwEBAQ
X-IPAS-Result: AmsPAOwQflTO+ILA/2dsb2JhbABbgweDYFCFCsI7gmIEAgKBJBcBAQEBAQF8hAMBAQQjMyMQCxoCGA4CAhQYDSSIU8AGllMBAQEBAQUBAQEBHoErj0QHgnWBUwWLAaQugXiEGSGCdwEBAQ
X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="102885950"
Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.130.192])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 18 Dec 2014 09:25:46 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 20A7D2D79; Thu, 18 Dec 2014 09:25:33 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwvvbl9ox2p.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <878ui79bv7.fsf@HIDDEN>
 <83d27iwazc.fsf@HIDDEN> <jwvegryezf6.fsf-monnier+emacsbugs@HIDDEN>
 <83oar1vd51.fsf@HIDDEN>
Date: Thu, 18 Dec 2014 09:25:33 -0500
In-Reply-To: <83oar1vd51.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 18 Dec
 2014 05:40:42 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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.3 (/)

>> >   |left-to-right continued line |=E2=A4=B6
>> >   |/RIGHT-TO-LEFT CONTINUED LINE|
>> Why do you need the empty space at the end of the left-to-right line?
> Because that empty space simply doesn't exist in the display line's
> geometry, as far as the display engine is concerned.  Most of the
> display engine is oblivious to the fact that an RTL line is reversed
> on display, so it cannot do its job if some lines are longer than
> others.

IOW, it's because it makes the implementation easier.  OK, that's
a good reason.


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 14:24:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 09:24:09 2014
Received: from localhost ([127.0.0.1]:49579 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1bzt-0008TJ-7U
	for submit <at> debbugs.gnu.org; Thu, 18 Dec 2014 09:24:09 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:44180)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y1bzq-0008T9-PL
 for 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 09:24:07 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Aj4PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIxALNBIUGA0kiEoJ1lkBAQEBAQEEAQEBAR6QbweESAWLAZIxj3OCCoF4hBkhgncBAQE
X-IPAS-Result: Aj4PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIxALNBIUGA0kiEoJ1lkBAQEBAQEEAQEBAR6QbweESAWLAZIxj3OCCoF4hBkhgncBAQE
X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="102885810"
Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.130.192])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 18 Dec 2014 09:24:05 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id C7C852D79; Thu, 18 Dec 2014 09:24:05 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwv1tnxqbum.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
 <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN> <83ppbhvd9s.fsf@HIDDEN>
Date: Thu, 18 Dec 2014 09:24:05 -0500
In-Reply-To: <83ppbhvd9s.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 18 Dec
 2014 05:37:51 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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.3 (/)

>> So, it doesn't seem to be a request of terribly high importance.
> But it's already done.

Yes, but your argument for not providing the "no fringe" behavior is
that it would go against this request, so I'm pointing out that this is
not a good enough reason.

Most of the non-Emacs editors I see (e.g. vi in a tty, or the god-awful
edit-boxes in Iceweasel) don't have anything like fringes or other forms
of continuation glyphs (IOW, there's simply no visual indication at all
distinguishing a line-wrap from a newline), so it would make sense for
Emacs to be able to provide this behavior somehow.


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 03:40:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 22:40:52 2014
Received: from localhost ([127.0.0.1]:49427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1RxL-0007q7-NY
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:40:52 -0500
Received: from mtaout24.012.net.il ([80.179.55.180]:53117)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1RxJ-0007py-Fq
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:40:50 -0500
Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il
 (HyperSendmail v2007.08) id <0NGR00600DONL400@HIDDEN> for
 19395 <at> debbugs.gnu.org; Thu, 18 Dec 2014 05:32:58 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGR007BPDUX1C00@HIDDEN>; Thu, 18 Dec 2014 05:32:58 +0200 (IST)
Date: Thu, 18 Dec 2014 05:40:42 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvegryezf6.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83oar1vd51.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 8BIT
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <878ui79bv7.fsf@HIDDEN>
 <83d27iwazc.fsf@HIDDEN> <jwvegryezf6.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: Titus von der Malsburg <malsburg@HIDDEN>,  19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 16:34:41 -0500
> 
> >   |left-to-right continued line |⤶
> >   |/RIGHT-TO-LEFT CONTINUED LINE|
> 
> Why do you need the empty space at the end of the left-to-right line?

Because that empty space simply doesn't exist in the display line's
geometry, as far as the display engine is concerned.  Most of the
display engine is oblivious to the fact that an RTL line is reversed
on display, so it cannot do its job if some lines are longer than
others.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 03:38:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 22:38:04 2014
Received: from localhost ([127.0.0.1]:49423 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1Rue-0007lR-3y
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:38:04 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:63917)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1RuZ-0007ky-R0
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:38:01 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NGR00K00DHFYX00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Thu, 18 Dec 2014 05:37:57 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGR00K5NE39NH90@HIDDEN>;
 Thu, 18 Dec 2014 05:37:57 +0200 (IST)
Date: Thu, 18 Dec 2014 05:37:51 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83ppbhvd9s.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
 <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: malsburg@HIDDEN,  19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 16:31:20 -0500
> 
> So, it doesn't seem to be a request of terribly high importance.

But it's already done.

> > As you can see from the above URL, that was an explicit feature
> > request, in response to which we provided the feature.
> 
> ..and removed the previous feature of letting users decide to have no
> fringe at all (neither of the regular "graphical" kind, nor of the
> "old-style tty" kind).

They can still have it if they give up 1 pixel for each fringe they
want to disable.




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

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


Received: (at 19395) by debbugs.gnu.org; 18 Dec 2014 03:36:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 22:36:15 2014
Received: from localhost ([127.0.0.1]:49419 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1Rss-0007h4-DC
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:36:14 -0500
Received: from mx02.posteo.de ([89.146.194.165]:42000)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y1Rso-0007gt-Ts
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 22:36:12 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id D0AE925A3DD1;
 Thu, 18 Dec 2014 04:36:09 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2zQ06NBNz5vMw;
 Thu, 18 Dec 2014 04:36:08 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN> <83tx0uum88.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83tx0uum88.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 19:36:04 -0800
Message-ID: <87a92lmxy3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


On 2014-12-17 Wed 11:09, Eli Zaretskii wrote:
>> From: Titus von der Malsburg <malsburg@HIDDEN>
>> Cc: 19395 <at> debbugs.gnu.org
>> Date: Wed, 17 Dec 2014 10:48:25 -0800
>>=20
>> The problem is that there may not be a clean solution to that
>> problem.  A buffer can contain text is several font sizes and as far as
>> I know there is no notion of a default size for a buffer, or is there?
>
> Yes, there is: the 'default' face.
>
>> In my special case, I have the font size under control and
>> `term-window-width' would be good enough.
>
> But if we want this function to be more generally useful, it
> shouldn't be limited to the frame's canonical character size, and
> should at least take the face-remapping into account.  Bonus points
> for accepting a face as an argument and using that face's font
> dimensions.

This is more difficult than I thought.  Below is a first sketch.  Let me
know if you think this is going in the right direction and I'll polish
it and add the bonus feature.

It appears that a font has to be rendered before Emacs can tell how wide
a character is.  That's why we need the temporary buffer.  Not elegant,
but I couldn't find a better way.  `default-font-width' complements
`default-font-height' in simple.el.  The other function would go into
window.el.

  Titus

(defun default-font-width ()=20
  "Return the width in pixels of the current buffer's default
face font.  More precisely, this returns the width of the letter
=E2=80=98m=E2=80=99.  If the font is mono-spaced, this will also be the wid=
th of
all other printable characters."
  (let ((window (selected-window))
        (remapping face-remapping-alist))
    (with-temp-buffer
      (make-local-variable 'face-remapping-alist)
      (setq face-remapping-alist remapping)
      (set-window-buffer window (current-buffer))
      (insert "m")
      (aref (aref (font-get-glyphs (font-at 1) 1 2) 0) 4))))

(defun window-available-columns ()
  "Return the maximal number of characters that can be displayed
on one line.  This function is different from `window-body-width'
in that it accounts for fringes (when at least one fringe has
zero width, one column is reserved for continuation characters)
and for the size of the default font (which may have been
adjusted using, e.g., `text-scale-increase')."
  (let* ((window-width (window-body-width nil t))
	 (font-width (default-font-width))
	 (ncols (/ window-width font-width)))
    (if (and (not (featurep 'xemacs))
	     (display-graphic-p)
	     overflow-newline-into-fringe
	     (/=3D (frame-parameter nil 'left-fringe) 0)
	     (/=3D (frame-parameter nil 'right-fringe) 0))
        ncols
      (1- (ncols)))))


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUkkulAAoJEK40WfPGE2iddfcH+gO4yYXf10UiAy63sG+rky4F
IkMzHa7N0VftlryQRL8bdss4wx9QoXpC5XphVzeD+dsYd3/QDOLKvdazXFFts1Gg
dDyPFU/hPKgd3GKdiDEtoV+f8iOgkWmDd6tXSiuUn5RD8Y+cM73w+t+43vcaNyOL
SA+1+1GQCka4iE109rbXRBkHHu96ef9b+pUHyg0RPvljF8ZSDIURtEO/kQVNhn2H
oCILUjZiJVri1kP9jQvnxVB7pBgjVW72NyMukcPyY1ifEP4shpkqQvf66APyZAoe
qEPG4/zbPQzPf/y0VJ5/QleZmo9o35IOPWRWCmXRuWNRmnktis8GqP7zNgHga74=
=Yq4y
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 22:57:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 17:57:45 2014
Received: from localhost ([127.0.0.1]:49334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1NXN-0000OL-4a
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 17:57:45 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:46620)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Y1NXL-0000OC-2a
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 17:57:43 -0500
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 sBHMvfWd026617
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Wed, 17 Dec 2014 22:57:41 GMT
Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86])
 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sBHMvdDJ005701
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Wed, 17 Dec 2014 22:57:40 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sBHMvdob018305;
 Wed, 17 Dec 2014 22:57:39 GMT
MIME-Version: 1.0
Message-ID: <531fdb8b-4e03-4100-a586-590a36af2d8d@default>
Date: Wed, 17 Dec 2014 14:57:38 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#19395: 25.0.50; Setting left fringe to 0 messes up
 window-width
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
 <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
In-Reply-To: <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2  (807160) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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.3 (--)

> >   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11832
>=20
> Note that this was a request from Drew who didn't even understand
> that the "$" signs used up just as much space as the fringe would.

Oooooh.  "Drew didn't even understand THAT"?!  You never miss an
opportunity, do you?  Try to see if you can convince people by
throwing in an ad hominem aspersion or two...

> IOW a typical "I don't understand what I say, but I want my old
> teddy bear back".

I guess we can see whose behavior is typical here.  A typical
bleating of "This doesn't count because it was reported by Drew!"

> So, it doesn't seem to be a request of terribly high importance.

Because it is from Drew.  Of course.  That follows.

Maybe some will read that bug thread for themselves and decide.
Maybe not.

I will repeat only this:

  Let me be clear BTW about my motivation: I use Emacs with fringes
  turned off.  And I use it with line truncation turned off (although
  it gets turned on automatically in contexts such as the debugger).

  I am not asking for a fix to this bug for myself but for Emacs.

  I simply recognize that something was lost for users in moving to
  Emacs 21.  It seems wrong that users who choose not to show fringe
  have no way of knowing which lines are truncated.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So much for this all being about ignorant, crybaby Drew just wanting
to have his teddy bear back.  Drew has little use for this teddy,
and he made that clear from the outset.

"No way of knowing which lines are truncated."  Did Drew know what
he was talking about there, or not?  You have only to compare Emacs
22 and Emacs 24 with fringe turned off and `truncate-lines' turned on.

That was the bug that Drew reported.  And the bug that Eli fixed.
The report simply asked to let users who choose to not show fringe be
able to tell which lines are truncated.  They had that ability before
the bug (regression).  And they had it again after Eli fixed it.

If you want to take that teddy bear away from non-Drew users then
no one will stop you.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 21:35:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 16:35:12 2014
Received: from localhost ([127.0.0.1]:49313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1MFT-0006q8-JT
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 16:35:12 -0500
Received: from mercure.iro.umontreal.ca ([132.204.24.67]:37695)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y1MFS-0006pz-9v
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 16:35:10 -0500
Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca
 [132.204.27.50])
 by mercure.iro.umontreal.ca (Postfix) with ESMTP id C691785A4C;
 Wed, 17 Dec 2014 16:35:09 -0500 (EST)
Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca
 [132.204.27.242])
 by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 36E241E5B8B;
 Wed, 17 Dec 2014 16:34:42 -0500 (EST)
Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848)
 id 1A862B40DF; Wed, 17 Dec 2014 16:34:42 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwvegryezf6.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <878ui79bv7.fsf@HIDDEN>
 <83d27iwazc.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 16:34:41 -0500
In-Reply-To: <83d27iwazc.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 17 Dec
 2014 17:29:43 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
 SpamAssassin (score=-2.82, requis 5, autolearn=not spam,
 ALL_TRUSTED -2.82, MC_TSTLAST 0.00)
X-DIRO-MailScanner-From: monnier@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, Titus von der Malsburg <malsburg@HIDDEN>
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.3 (--)

>   |left-to-right continued line\|
>   |/RIGHT-TO-LEFT CONTINUED LINE|

OK, makes sense.

>   |left-to-right continued line |=E2=A4=B6
>   |/RIGHT-TO-LEFT CONTINUED LINE|

Why do you need the empty space at the end of the left-to-right line?
The glyph in the right fringe already gives the corresponding
information about whether the line starts on the left or on the
right, AFAICT.


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 21:31:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 16:31:48 2014
Received: from localhost ([127.0.0.1]:49309 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1MCB-0006ku-O6
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 16:31:48 -0500
Received: from mercure.iro.umontreal.ca ([132.204.24.67]:34059)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y1MC9-0006kl-Qv
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 16:31:46 -0500
Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca
 [132.204.27.50])
 by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8BAC485A4C;
 Wed, 17 Dec 2014 16:31:43 -0500 (EST)
Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca
 [132.204.27.242])
 by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CB9AB1E5B8A;
 Wed, 17 Dec 2014 16:31:20 -0500 (EST)
Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848)
 id AE817B40DF; Wed, 17 Dec 2014 16:31:20 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwvk31qezy8.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN> <83388ewa4w.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 16:31:20 -0500
In-Reply-To: <83388ewa4w.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 17 Dec
 2014 17:47:59 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
 SpamAssassin (score=-2.49, requis 5, autolearn=not spam,
 ALL_TRUSTED -2.82, MC_REPONSE 0.33, MC_TSTLAST 0.00)
X-DIRO-MailScanner-From: monnier@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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.3 (--)

>   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11832

Note that this was a request from Drew who didn't even understand that
the "$" signs used up just as much space as the fringe would.

IOW a typical "I don't understand what I say, but I want my old teddy
bear back".

So, it doesn't seem to be a request of terribly high importance.

> As you can see from the above URL, that was an explicit feature
> request, in response to which we provided the feature.

..and removed the previous feature of letting users decide to have no
fringe at all (neither of the regular "graphical" kind, nor of the
"old-style tty" kind).


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 19:09:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 14:09:55 2014
Received: from localhost ([127.0.0.1]:49257 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1Jyt-0003Gs-4o
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 14:09:55 -0500
Received: from mtaout23.012.net.il ([80.179.55.175]:33353)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1Jyp-0003Gi-Up
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 14:09:53 -0500
Received: from conversion-daemon.a-mtaout23.012.net.il by
 a-mtaout23.012.net.il (HyperSendmail v2007.08) id
 <0NGQ00400PZIT000@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Wed, 17 Dec 2014 21:09:50 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGQ004U4QKDP680@HIDDEN>;
 Wed, 17 Dec 2014 21:09:50 +0200 (IST)
Date: Wed, 17 Dec 2014 21:09:43 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87wq5q864m.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83tx0uum88.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
 <87wq5q864m.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 10:48:25 -0800
> 
> The problem is that there may not be a clean solution to that
> problem.  A buffer can contain text is several font sizes and as far as
> I know there is no notion of a default size for a buffer, or is there?

Yes, there is: the 'default' face.

> In my special case, I have the font size under control and
> `term-window-width' would be good enough.

But if we want this function to be more generally useful, it
shouldn't be limited to the frame's canonical character size, and
should at least take the face-remapping into account.  Bonus points
for accepting a face as an argument and using that face's font
dimensions.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 18:48:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 13:48:38 2014
Received: from localhost ([127.0.0.1]:49250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1JeI-0002kr-6R
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 13:48:38 -0500
Received: from mx02.posteo.de ([89.146.194.165]:59711)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y1JeF-0002kh-3e
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 13:48:36 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id E937E25A2107;
 Wed, 17 Dec 2014 19:48:33 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2ljD0WSgz5vN5;
 Wed, 17 Dec 2014 19:48:31 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN> <83vblauoh6.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83vblauoh6.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 10:48:25 -0800
Message-ID: <87wq5q864m.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


On 2014-12-17 Wed 10:21, Eli Zaretskii wrote:
>> From: Titus von der Malsburg <malsburg@HIDDEN>
>> Cc: 19395 <at> debbugs.gnu.org
>> Date: Wed, 17 Dec 2014 09:18:34 -0800
>>=20
>> I want to use the full number of available columns for displaying data
>> but avoid line breaks at all cost because they would mess up the table
>> layout.  That's why I need a robust way to determine the maximal number
>> of characters that I can put on a line.  `term-window-width' is better
>> at doing that then `window-width' because it corrects (window-width) in
>> a number of special cases.  (It's not perfect, though, because like
>> `window-width' it ignores the size of the font in the window and
>> pretends the window is using the default size.)
>
> Exactly.  So perhaps we need a different function, one that returns
> exactly the result that you want here.

The problem is that there may not be a clean solution to that
problem.  A buffer can contain text is several font sizes and as far as
I know there is no notion of a default size for a buffer, or is there?
In my special case, I have the font size under control and
`term-window-width' would be good enough.

  Titus


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUkc/6AAoJEK40WfPGE2id+/MH/33e6NpesrUyRzzfLuaomBXa
Ph453OKGFxy31L2y9Y1CkhL9lFjSPWWxsDTxj2QJSVsE1hr60quN7rEqrNR3osCK
qtwpxm/xJ+yFe/dOrWRBkZG7DSUw2Ba3tU7bu6N6jz5AJV6ZdpBRPoM16t0XKmkm
ueBOmOtYmXvRTgloRmqhVSYdSW6w6RdX6h0G1NP8kv4MNkA6J87F4uh+I5Ll4T1h
kTnfzRORrUmceoB0v8rJx7cHTNWse+s12BQY1XVDWSlXMk5MwdylxLdlP2SA2+74
DRz4UNo2sJuwUrAn/LBdWCbr04jmLe+Uz5ZE8x3dbZT+FQszb3QSHbqaH61AfQ8=
=ZGX2
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 18:21:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 13:21:20 2014
Received: from localhost ([127.0.0.1]:49196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1JDs-0000hq-2Z
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 13:21:20 -0500
Received: from mtaout23.012.net.il ([80.179.55.175]:64567)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1JDq-0000hi-8i
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 13:21:19 -0500
Received: from conversion-daemon.a-mtaout23.012.net.il by
 a-mtaout23.012.net.il (HyperSendmail v2007.08) id
 <0NGQ00400O3KPK00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Wed, 17 Dec 2014 20:21:17 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGQ004FIOBGP610@HIDDEN>;
 Wed, 17 Dec 2014 20:21:17 +0200 (IST)
Date: Wed, 17 Dec 2014 20:21:09 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <874msu9out.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83vblauoh6.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
 <874msu9out.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 09:18:34 -0800
> 
> I want to use the full number of available columns for displaying data
> but avoid line breaks at all cost because they would mess up the table
> layout.  That's why I need a robust way to determine the maximal number
> of characters that I can put on a line.  `term-window-width' is better
> at doing that then `window-width' because it corrects (window-width) in
> a number of special cases.  (It's not perfect, though, because like
> `window-width' it ignores the size of the font in the window and
> pretends the window is using the default size.)

Exactly.  So perhaps we need a different function, one that returns
exactly the result that you want here.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 17:18:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 12:18:42 2014
Received: from localhost ([127.0.0.1]:49137 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1IFG-0004mI-JF
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 12:18:42 -0500
Received: from mx02.posteo.de ([89.146.194.165]:57371)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y1IFE-0004m8-JK
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 12:18:41 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id 659B525A3DD8;
 Wed, 17 Dec 2014 18:18:39 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2jjT46xtz5vN7;
 Wed, 17 Dec 2014 18:18:37 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN> <83a92mwau9.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83a92mwau9.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 09:18:34 -0800
Message-ID: <874msu9out.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)

--=-=-=
Content-Type: text/plain


On 2014-12-17 Wed 07:32, Eli Zaretskii wrote:
>> In term.el, I found a function that does what I want
>> (`term-window-width') but requiring term.el only to use this
>> function seems inappropriate.  Duplicating this function is not
>> perfect either.
>
> That function is in term.el because term.el is its only user.  We
> might consider moving it to a more general place, but please describe
> the use case where you needed it.

I'm the author of a number of extensions for Helm (helm-bibtex,
helm-dictionary, helm-mu).  These extensions display the results of a
search in the form of tables.  See here for an example:

  https://github.com/tmalsburg/helm-bibtex/raw/master/screenshot.png

I want to use the full number of available columns for displaying data
but avoid line breaks at all cost because they would mess up the table
layout.  That's why I need a robust way to determine the maximal number
of characters that I can put on a line.  `term-window-width' is better
at doing that then `window-width' because it corrects (window-width) in
a number of special cases.  (It's not perfect, though, because like
`window-width' it ignores the size of the font in the window and
pretends the window is using the default size.)

  Titus

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUkbrqAAoJEK40WfPGE2idyFYH/Ro4Rnb413F0bNBpiJKNizQ+
21GGJtuyHnJ4RLUVVz3F7JgVAFDNOSYRZ8EfOmOoHV0pn6jFQasTFofYWt9ZeNhM
xjHTnZfbNK0Luz+mw+xqgVzQ89XAZz5SeFoDz3cc+MMJEPPIT1RbCoa+tJuP2l+H
wKXgy+s8Y3y6ODKTZMPT58ZJyYfbQtOFIS4FFfuzUMF55tfCjNhZc0jx/bxAefVl
ZjlorSoyCyjiOwvNGX8ZcGOBhnyRpcSt5FtK76Kk16CfrrU3yXc+XqLjhpBHTfGH
l7CF7fN09XmusKXVcgwGCmX8i7obJizNfyGFNrEWPmfNwqzdLDH0LEMOi2axb7c=
=St/t
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 15:48:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 10:48:10 2014
Received: from localhost ([127.0.0.1]:49032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1Gpe-0000wS-9u
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:48:10 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:49270)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1Gpc-0000wK-Cb
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:48:09 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NGQ00E00H3E8W00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Wed, 17 Dec 2014 17:48:06 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGQ00D6EH86W2A0@HIDDEN>;
 Wed, 17 Dec 2014 17:48:06 +0200 (IST)
Date: Wed, 17 Dec 2014 17:47:59 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83388ewa4w.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
 <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: malsburg@HIDDEN,  19395 <at> debbugs.gnu.org
> Date: Wed, 17 Dec 2014 09:16:04 -0500
> 
> >> That sounds wrong: if the user decides to get rid of the left-fringe,
> >> she just shouldn't get any continuation glyph on the left.
> > That's how Emacs worked since v21.1.
> 
> Definitely not 21.1: in 21.1 the fringes could not be modified at all.

But they were the only way to show truncation and continuation
indicators on GUI frames.

> > But then users asked to have continuation and truncation glyphs in
> > that case,
> 
> I do remember users clamoring for the possibility to eliminate the
> fringes, which was indeed added (in the form of set-window-fringes)
> a few versions later (not sure exactly when, but >= 22.1 and <= 22.3).
> 
> I don't remember users asking for "no fringe, but still something where we
> can display the continuation glyphs" (and since the fringe is the thing
> where we display the continuation glyphs, I read this as "no fringe, yet
> with a fringe").
> 
> This said, I wouldn't be surprised if some users asked for that.

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11832

> > So what you are suggesting is going back and deleting a feature which
> > was added by users' request.
> 
> Not necessarily: I'm suggesting that maybe the Emacs-22 behavior where
> "continuation glyphs" are only ever displayed in the fringe (and hence
> aren't displayed if there's no fringe) is preferable.

As you can see from the above URL, that was an explicit feature
request, in response to which we provided the feature.  So going back
to Emacs 23 behavior is tantamount to removing the feature.

> Note also that in the OP's situation, there *is* a fringe on the right,
> so I don't see why we need to keep an extra empty space on the right
> since we'll never display a continuation glyph on the right elsewhere
> than in the fringe.

Because of RTL lines.  I explained that in more detail in my other
message.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 15:32:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 10:32:58 2014
Received: from localhost ([127.0.0.1]:48995 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1Gav-0000T2-P4
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:32:57 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:54105)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1Gat-0000St-7a
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:32:55 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NGQ00E00GEDPN00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Wed, 17 Dec 2014 17:32:53 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGQ00E1HGITI540@HIDDEN>;
 Wed, 17 Dec 2014 17:32:53 +0200 (IST)
Date: Wed, 17 Dec 2014 17:32:46 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87bnn39cpe.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83a92mwau9.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <87bnn39cpe.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Tue, 16 Dec 2014 19:28:45 -0800
> 
> I see, thanks for explaining.  Perhaps it would make sense to amend the
> documentation of `window-width' because this is easy to misunderstand

Will do.

> In term.el, I found a function that does what I want
> (`term-window-width') but requiring term.el only to use this
> function seems inappropriate.  Duplicating this function is not
> perfect either.

That function is in term.el because term.el is its only user.  We
might consider moving it to a more general place, but please describe
the use case where you needed it.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 15:29:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 10:29:56 2014
Received: from localhost ([127.0.0.1]:48991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1GY0-0000N0-1i
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:29:56 -0500
Received: from mtaout21.012.net.il ([80.179.55.169]:53286)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y1GXx-0000Ml-FT
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 10:29:54 -0500
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NGQ00500G3VPA00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Wed, 17 Dec 2014 17:29:51 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGQ0051XGDQOB30@HIDDEN>;
 Wed, 17 Dec 2014 17:29:51 +0200 (IST)
Date: Wed, 17 Dec 2014 17:29:43 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <878ui79bv7.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83d27iwazc.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 8BIT
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <878ui79bv7.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, monnier@HIDDEN
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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, 19395 <at> debbugs.gnu.org
> Date: Tue, 16 Dec 2014 19:46:52 -0800
> 
> On 2014-12-16 Tue 15:12, Stefan Monnier wrote:
> >> As long as the left fringe exists, we can display on it.  But once its
> >> width is zero, it no longer exists, and so we need to reserve space to
> >> display the continuation glyph "by other means".
> >
> > That sounds wrong: if the user decides to get rid of the left-fringe,
> > she just shouldn't get any continuation glyph on the left.
> 
> Strange, setting left-fringe to 0 apparently reserves a column for the
> continuation character even when the right fringe is non-zero and no
> such column is needed.

You are thinking only about left-to-right lines of text.  But Emacs
also supports right-to-left lines of text, which use the left fringe
to display the continuation bitmap.  Those right-to-left lines need
the extra column for the continuation glyph when the left fringe is
not available.

And because Emacs supports mixed directions of text lines in the same
buffer, and because the line geometry needs to be symmetrical in both
cases, we reserve one column in left-to-right lines as well, even
though the right fringe is available (and so that column will be left
unused, i.e. empty, in left-to-right lines).

This all is so, when neither the left nor the right fringe are
available, we display mixed-direction lines like this (where "|"
denotes the window edge):

  |left-to-right continued line\|
  |/RIGHT-TO-LEFT CONTINUED LINE|

IOW, no matter what the direction, the text always begins at the
window edge, and its last (in logical order) column is used for the
continuation glyph.

When the right fringe is available, but the left one isn't, you will
see this instead (with "⤶" standing for the fringe bitmap:

  |left-to-right continued line |⤶
  |/RIGHT-TO-LEFT CONTINUED LINE|




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 14:16:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 09:16:09 2014
Received: from localhost ([127.0.0.1]:48578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1FOa-0005JU-VU
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 09:16:09 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40150)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y1FOX-0005Fp-U3
 for 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 09:16:06 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJIhKCdZZAQEBAQEBBAEBAQEekG8HhEgFiwGSMYZRiyyBeIQZIYJ3AQEB
X-IPAS-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJIhKCdZZAQEBAQEBBAEBAQEekG8HhEgFiwGSMYZRiyyBeIQZIYJ3AQEB
X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="102787982"
Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.130.192])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 17 Dec 2014 09:16:05 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id DAAE525DC; Wed, 17 Dec 2014 09:16:04 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwvy4q6qsn3.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN> <83egrzvtb0.fsf@HIDDEN>
Date: Wed, 17 Dec 2014 09:16:04 -0500
In-Reply-To: <83egrzvtb0.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 17 Dec
 2014 05:39:15 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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.3 (/)

>> That sounds wrong: if the user decides to get rid of the left-fringe,
>> she just shouldn't get any continuation glyph on the left.
> That's how Emacs worked since v21.1.

Definitely not 21.1: in 21.1 the fringes could not be modified at all.

> But then users asked to have continuation and truncation glyphs in
> that case,

I do remember users clamoring for the possibility to eliminate the
fringes, which was indeed added (in the form of set-window-fringes)
a few versions later (not sure exactly when, but >= 22.1 and <= 22.3).

I don't remember users asking for "no fringe, but still something where we
can display the continuation glyphs" (and since the fringe is the thing
where we display the continuation glyphs, I read this as "no fringe, yet
with a fringe").

This said, I wouldn't be surprised if some users asked for that.

> So what you are suggesting is going back and deleting a feature which
> was added by users' request.

Not necessarily: I'm suggesting that maybe the Emacs-22 behavior where
"continuation glyphs" are only ever displayed in the fringe (and hence
aren't displayed if there's no fringe) is preferable.

Note also that in the OP's situation, there *is* a fringe on the right,
so I don't see why we need to keep an extra empty space on the right
since we'll never display a continuation glyph on the right elsewhere
than in the fringe.


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 03:47:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 22:47:11 2014
Received: from localhost ([127.0.0.1]:48312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y15Zv-0002UE-0Q
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:47:11 -0500
Received: from mx02.posteo.de ([89.146.194.165]:53216)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y15Zt-0002U7-Bt
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:47:09 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id 6E78025AF527;
 Wed, 17 Dec 2014 04:46:58 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2Mhx2FX5z5vMr;
 Wed, 17 Dec 2014 04:46:57 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
Date: Tue, 16 Dec 2014 19:46:52 -0800
Message-ID: <878ui79bv7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
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.7 (/)

--=-=-=
Content-Type: text/plain


On 2014-12-16 Tue 15:12, Stefan Monnier wrote:
>> As long as the left fringe exists, we can display on it.  But once its
>> width is zero, it no longer exists, and so we need to reserve space to
>> display the continuation glyph "by other means".
>
> That sounds wrong: if the user decides to get rid of the left-fringe,
> she just shouldn't get any continuation glyph on the left.

Strange, setting left-fringe to 0 apparently reserves a column for the
continuation character even when the right fringe is non-zero and no
such column is needed.  Just tested it.

  Titus


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUkPytAAoJEK40WfPGE2idSvAIAJkG8eAx2yZOaYtSFYKD3wYM
4Nsf2cjSpPOmoLmRVRgY6j6qe9VYCwDBDUX+8FPzeDl9mP5/mYbIoq/LW+Bnmh43
xa+dBpelXHft019/d/do0TzR4H0/CGqNxhj6fvp4C51KZbWLiyvO1RZW8p7jNIYa
xXrWrNEThuFJC9c4biAzV9yNzkq0UWOZeDmPkcPNfbPrNCPWlMAOX9TsVuUWDwvP
/CcUNPwDVod7PIFlB3TVcUbN5K0LONzQ31tcUT59rYgnGgfBWUsLkcNL8XLKSdNa
KTqR7sFkSw+YDPz54/MCe7vBn0hGdM4W5L1MSlDGl+85WvQHCPuuCyeEP4V18cY=
=wUFe
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 03:39:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 22:39:28 2014
Received: from localhost ([127.0.0.1]:48307 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y15SS-0002IF-46
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:39:28 -0500
Received: from mtaout27.012.net.il ([80.179.55.183]:37775)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y15SP-0002I1-Q1
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:39:27 -0500
Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il
 (HyperSendmail v2007.08) id <0NGP00K00IVD6G00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Wed, 17 Dec 2014 05:35:23 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGP00FRSJAZ3T50@HIDDEN>; Wed, 17 Dec 2014 05:35:23 +0200 (IST)
Date: Wed, 17 Dec 2014 05:39:15 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Message-id: <83egrzvtb0.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
 <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, malsburg@HIDDEN
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: Stefan Monnier <monnier@HIDDEN>
> Cc: Titus von der Malsburg <malsburg@HIDDEN>,  19395 <at> debbugs.gnu.org
> Date: Tue, 16 Dec 2014 18:12:51 -0500
> 
> > As long as the left fringe exists, we can display on it.  But once its
> > width is zero, it no longer exists, and so we need to reserve space to
> > display the continuation glyph "by other means".
> 
> That sounds wrong: if the user decides to get rid of the left-fringe,
> she just shouldn't get any continuation glyph on the left.

That's how Emacs worked since v21.1.  But then users asked to have
continuation and truncation glyphs in that case, and we introduced
this feature a few versions ago.

So what you are suggesting is going back and deleting a feature which
was added by users' request.




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

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


Received: (at 19395) by debbugs.gnu.org; 17 Dec 2014 03:29:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 22:29:09 2014
Received: from localhost ([127.0.0.1]:48299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y15IS-0001zt-Co
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:29:08 -0500
Received: from mx02.posteo.de ([89.146.194.165]:47046)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y15IC-0001zD-6K
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:29:06 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id E0F1625A2100;
 Wed, 17 Dec 2014 04:28:50 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2MJ20NKSz5vN3;
 Wed, 17 Dec 2014 04:28:49 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83h9wvwbux.fsf@HIDDEN>
Date: Tue, 16 Dec 2014 19:28:45 -0800
Message-ID: <87bnn39cpe.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)


On 2014-12-16 Tue 12:58, Eli Zaretskii wrote:
>> From: Titus von der Malsburg <malsburg@HIDDEN>
>> Cc: 19395 <at> debbugs.gnu.org
>> Date: Tue, 16 Dec 2014 12:36:13 -0800
>> 
>> > The n+1st character is usurped for the continuation glyph.  This is
>> > not a bug.
>> 
>> Sorry, but I don't understand that.  If (window-width) says there is
>> space for 50 characters and I put 50 characters on a line, there
>> shouldn't be a continuation character in the first place.
>
> window-width doesn't report the number of characters a window's line
> can hold without continuation.  It reports the window width in
> character units.  When there's no fringe to display the continuation
> bitmap, that width includes the space reserved for the continuation
> glyph, which is the backslash character produced by the display engine
> on the last column of the line.
>
>> Also, I don't see why I should get different behaviour for different
>> values of left-fringe.  When left-fringe is > 0, I get as many
>> characters on a line as (window-width) reports.  But if left-fringe
>> is 0, I get one character less on the line.
>
> As long as the left fringe exists, we can display on it.  But once its
> width is zero, it no longer exists, and so we need to reserve space to
> display the continuation glyph "by other means".

I see, thanks for explaining.  Perhaps it would make sense to amend the
documentation of `window-width' because this is easy to misunderstand
and I suspect that I'm not the only one who consults window-width in
order to determine how much columns are available for text display.  In
term.el, I found a function that does what I want (`term-window-width')
but requiring term.el only to use this function seems
inappropriate.  Duplicating this function is not perfect either.

  Titus

>> This behaviour doesn't seem to be consistent with the documentation
>> of window-width.  Quote:
>> 
>>   The return value does not include any vertical dividers, fringes or
>>   marginal areas, or scroll bars.
>
> This doesn't say anything about continuation and truncation glyphs, so
> I see no inconsistency here, perhaps just missing details.
>
>> My understanding of this is that the fringes should not matter at
>> all.  If window-with reports n, I should be able to fit n characters on
>> a line irrespective of what the fringes are.
>
> I tried to explain above why this interpretation is incorrect:
> window-width does not return the number of characters of buffer text
> that can be displayed on a line.
>
>> Moreover, why is this specific to the left-fringe?  The value of
>> right-fringe does not affect influence whether I can get
>> (window-width) or (window-width) -1 characters on a line.
>
> That's not what I see here.  Setting any of the fringes' width to zero
> causes window-width to report 1 more character than you can put on a
> line without going to a continuation line.  IOW, the "penalty" is
> symmetrical, at least on my machine.





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

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


Received: (at 19395) by debbugs.gnu.org; 16 Dec 2014 23:12:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 18:12:53 2014
Received: from localhost ([127.0.0.1]:48224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y11IS-0002go-QY
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 18:12:52 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:56987)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Y11IR-0002gg-Ql
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 18:12:52 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJIhKCdZZAQEBAQEBBAEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE
X-IPAS-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJIhKCdZZAQEBAQEBBAEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE
X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="102727203"
Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.130.192])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 16 Dec 2014 18:12:51 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 1EE1912E5; Tue, 16 Dec 2014 18:12:51 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
Message-ID: <jwvegrztcju.fsf-monnier+emacsbugs@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN> <83h9wvwbux.fsf@HIDDEN>
Date: Tue, 16 Dec 2014 18:12:51 -0500
In-Reply-To: <83h9wvwbux.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 16 Dec
 2014 22:58:30 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <at> debbugs.gnu.org, Titus von der Malsburg <malsburg@HIDDEN>
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.3 (/)

> As long as the left fringe exists, we can display on it.  But once its
> width is zero, it no longer exists, and so we need to reserve space to
> display the continuation glyph "by other means".

That sounds wrong: if the user decides to get rid of the left-fringe,
she just shouldn't get any continuation glyph on the left.


        Stefan




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

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


Received: (at 19395) by debbugs.gnu.org; 16 Dec 2014 20:58:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 15:58:45 2014
Received: from localhost ([127.0.0.1]:48194 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0zCe-0007l2-Vb
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:58:45 -0500
Received: from mtaout26.012.net.il ([80.179.55.182]:58062)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y0zCb-0007kr-LR
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:58:43 -0500
Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il
 (HyperSendmail v2007.08) id <0NGP00B00064PP00@HIDDEN> for
 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 22:57:47 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGP00B3O0WBCT30@HIDDEN>; Tue, 16 Dec 2014 22:57:47 +0200 (IST)
Date: Tue, 16 Dec 2014 22:58:30 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87lhm772o2.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83h9wvwbux.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
 <87lhm772o2.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Cc: 19395 <at> debbugs.gnu.org
> Date: Tue, 16 Dec 2014 12:36:13 -0800
> 
> > The n+1st character is usurped for the continuation glyph.  This is
> > not a bug.
> 
> Sorry, but I don't understand that.  If (window-width) says there is
> space for 50 characters and I put 50 characters on a line, there
> shouldn't be a continuation character in the first place.

window-width doesn't report the number of characters a window's line
can hold without continuation.  It reports the window width in
character units.  When there's no fringe to display the continuation
bitmap, that width includes the space reserved for the continuation
glyph, which is the backslash character produced by the display engine
on the last column of the line.

> Also, I don't see why I should get different behaviour for different
> values of left-fringe.  When left-fringe is > 0, I get as many
> characters on a line as (window-width) reports.  But if left-fringe
> is 0, I get one character less on the line.

As long as the left fringe exists, we can display on it.  But once its
width is zero, it no longer exists, and so we need to reserve space to
display the continuation glyph "by other means".

> This behaviour doesn't seem to be consistent with the documentation
> of window-width.  Quote:
> 
>   The return value does not include any vertical dividers, fringes or
>   marginal areas, or scroll bars.

This doesn't say anything about continuation and truncation glyphs, so
I see no inconsistency here, perhaps just missing details.

> My understanding of this is that the fringes should not matter at
> all.  If window-with reports n, I should be able to fit n characters on
> a line irrespective of what the fringes are.

I tried to explain above why this interpretation is incorrect:
window-width does not return the number of characters of buffer text
that can be displayed on a line.

> Moreover, why is this specific to the left-fringe?  The value of
> right-fringe does not affect influence whether I can get
> (window-width) or (window-width) -1 characters on a line.

That's not what I see here.  Setting any of the fringes' width to zero
causes window-width to report 1 more character than you can put on a
line without going to a continuation line.  IOW, the "penalty" is
symmetrical, at least on my machine.




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

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


Received: (at 19395) by debbugs.gnu.org; 16 Dec 2014 20:36:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 15:36:34 2014
Received: from localhost ([127.0.0.1]:48180 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0yrB-0007DA-UU
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:36:34 -0500
Received: from mx02.posteo.de ([89.146.194.165]:38266)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yqz-0007Cq-A6
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:36:32 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id 23F1E25A211D;
 Tue, 16 Dec 2014 21:36:20 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k2B831JkVz5vN2;
 Tue, 16 Dec 2014 21:36:18 +0100 (CET)
References: <87vblbnz2u.fsf@HIDDEN> <83k31rwe55.fsf@HIDDEN>
From: Titus von der Malsburg <malsburg@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <83k31rwe55.fsf@HIDDEN>
Date: Tue, 16 Dec 2014 12:36:13 -0800
Message-ID: <87lhm772o2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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.7 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


On 2014-12-16 Tue 12:09, Eli Zaretskii wrote:
>> From: Titus von der Malsburg <malsburg@HIDDEN>
>> Date: Tue, 16 Dec 2014 12:01:45 -0800
>>=20
>>=20
>> - emacs -Q
>> - (set-fringe-mode '(0 . 2))
>>   The left fringe has to be zero, the right fringe doesn't seem to matte=
r.
>> - Fill a line completely with n characters such that it doesn't break.
>> - (window-width) reports n+1 characters instead of n.
>
> The n+1st character is usurped for the continuation glyph.  This is
> not a bug.

Sorry, but I don't understand that.  If (window-width) says there is
space for 50 characters and I put 50 characters on a line, there
shouldn't be a continuation character in the first place.  Also, I don't
see why I should get different behaviour for different values of
left-fringe.  When left-fringe is > 0, I get as many characters on a
line as (window-width) reports.  But if left-fringe is 0, I get one
character less on the line.  This behaviour doesn't seem to be
consistent with the documentation of window-width.  Quote:

  The return value does not include any vertical dividers, fringes or
  marginal areas, or scroll bars.

My understanding of this is that the fringes should not matter at
all.  If window-with reports n, I should be able to fit n characters on
a line irrespective of what the fringes are.  Moreover, why is this
specific to the left-fringe?  The value of right-fringe does not affect
influence whether I can get (window-width) or (window-width) -1
characters on a line.

  Titus

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUkJe+AAoJEK40WfPGE2id3SYH/3Vn5F3yOuxuUEACj/93odfB
ZpV9/I4VIDhOShPiUG+Qojq6A6KyJjbJSNOmMZG4yHf39VpZ4gRxt0b9QhnygFnw
XbVlwUpwze2xZFYXA/rJcweHqSky/0v23sm3g/KGYrz0aKjuEHO3Ah9kwBxXaph5
nZ6HD5eoyGLhZZxieUQ4aBmwQgygJjBYi2sjC8ZvCXgHcoaQnWV5Z2ldWgfNFjPw
HNCBJ+Tva1MhLrf+/KKkc1ek79jS180xE2bHBtnFVz02doXfzyi5cWrRkEQWB8SB
N4lVDVJIQgDiC5RxpdVh2TwgZNcY8wtB7tgW5iDNhErSoK8svlgoo5EKI6pRL2A=
=scpG
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 19395) by debbugs.gnu.org; 16 Dec 2014 20:09:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 15:09:24 2014
Received: from localhost ([127.0.0.1]:48165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0yQt-0005BV-L9
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:09:24 -0500
Received: from mtaout23.012.net.il ([80.179.55.175]:45386)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y0yQr-0005BM-Dj
 for 19395 <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:09:22 -0500
Received: from conversion-daemon.a-mtaout23.012.net.il by
 a-mtaout23.012.net.il (HyperSendmail v2007.08) id
 <0NGO00000YH2WO00@HIDDEN> for 19395 <at> debbugs.gnu.org;
 Tue, 16 Dec 2014 22:09:19 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGO000SLYNJUX30@HIDDEN>;
 Tue, 16 Dec 2014 22:09:19 +0200 (IST)
Date: Tue, 16 Dec 2014 22:09:10 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19395: 25.0.50;
 Setting left fringe to 0 messes up window-width
In-reply-to: <87vblbnz2u.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Titus von der Malsburg <malsburg@HIDDEN>
Message-id: <83k31rwe55.fsf@HIDDEN>
References: <87vblbnz2u.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19395
Cc: 19395 <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: Titus von der Malsburg <malsburg@HIDDEN>
> Date: Tue, 16 Dec 2014 12:01:45 -0800
> 
> 
> - emacs -Q
> - (set-fringe-mode '(0 . 2))
>   The left fringe has to be zero, the right fringe doesn't seem to matter.
> - Fill a line completely with n characters such that it doesn't break.
> - (window-width) reports n+1 characters instead of n.

The n+1st character is usurped for the continuation glyph.  This is
not a bug.





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

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


Received: (at submit) by debbugs.gnu.org; 16 Dec 2014 20:02:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 15:02:27 2014
Received: from localhost ([127.0.0.1]:48160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0yKA-000517-AA
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:02:26 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50188)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yK7-00050y-Ra
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:02:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yK1-00070D-ES
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:02:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35110)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yK1-000707-Bx
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 15:02:17 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51838)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yJv-0008Ei-S7
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 15:02:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yJq-0006xD-Ey
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 15:02:11 -0500
Received: from mx02.posteo.de ([89.146.194.165]:46670)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <malsburg@HIDDEN>) id 1Y0yJq-0006wx-1Q
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 15:02:06 -0500
Received: from dovecot03.posteo.de (unknown [185.67.36.28])
 by mx02.posteo.de (Postfix) with ESMTPS id 1D95725A3DC9
 for <bug-gnu-emacs@HIDDEN>; Tue, 16 Dec 2014 21:02:04 +0100 (CET)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by dovecot03.posteo.de (Postfix) with ESMTPSA id 3k29NW3KxPz5vNF
 for <bug-gnu-emacs@HIDDEN>; Tue, 16 Dec 2014 21:02:03 +0100 (CET)
From: Titus von der Malsburg <malsburg@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.0.50; Setting left fringe to 0 messes up window-width
Date: Tue, 16 Dec 2014 12:01:45 -0800
Message-ID: <87vblbnz2u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
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: -4.3 (----)
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: -4.3 (----)


- emacs -Q
- (set-fringe-mode '(0 . 2))
  The left fringe has to be zero, the right fringe doesn't seem to matter.
- Fill a line completely with n characters such that it doesn't break.
- (window-width) reports n+1 characters instead of n.

This bug is potentially related to this one: https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-10/msg00061.html



In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-12-13 on montana
Repository revision: 49daed60510a073062b41fa39fd7c010cb0a315e
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS

Configured using:
 `configure --prefix=/home/malsburg/usr/
 PKG_CONFIG_PATH=/usr/local/X11R6.8/lib/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS 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_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
scroll-up-command: End of buffer
ESC <mouse-1> is undefined
Mark set [7 times]
((left-fringe . 0) (right-fringe . 2))
50 (#o62, #x32, ?2)

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils mule-util time-date
tooltip eldoc 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 elisp-mode 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 dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 77284 9243)
 (symbols 48 18162 1)
 (miscs 40 53 174)
 (strings 32 11417 4672)
 (string-bytes 1 307454)
 (vectors 16 10084)
 (vector-slots 8 394429 11468)
 (floats 8 73 226)
 (intervals 56 215 0)
 (buffers 976 11)
 (heap 1024 31835 1054))




Acknowledgement sent to Titus von der Malsburg <malsburg@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#19395; 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: Sun, 21 Dec 2014 12:30:02 UTC

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