GNU bug report logs - #33232
`gnus-summary-line-format' padding doesn’t work in gui when there are multiple-column-width characters

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,gnus; Reported by: "Garreau\, Alexandre" <galex-713@HIDDEN>; dated Thu, 1 Nov 2018 21:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 1 Nov 2018 22:54:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 01 18:54:21 2018
Received: from localhost ([127.0.0.1]:59036 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gILr3-0006kb-DK
	for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 18:54:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gILr1-0006kG-MX
 for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 18:54:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gILqv-0001VG-La
 for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 18:54:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55155)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1gILqv-0001Uz-Fi
 for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 18:54:13 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59279)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gILqs-00025g-Nh
 for bug-gnu-emacs@HIDDEN; Thu, 01 Nov 2018 18:54:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gILpQ-0000y5-VB
 for bug-gnu-emacs@HIDDEN; Thu, 01 Nov 2018 18:52:43 -0400
Received: from [195.159.176.226] (port=58478 helo=blaine.gmane.org)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1gILpQ-0000tB-8V
 for bug-gnu-emacs@HIDDEN; Thu, 01 Nov 2018 18:52:40 -0400
Received: from list by blaine.gmane.org with local (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gILn4-0004JA-GG
 for bug-gnu-emacs@HIDDEN; Thu, 01 Nov 2018 23:50:14 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#33232: `gnus-summary-line-format' padding =?utf-8?Q?doesn?=
 =?utf-8?Q?=E2=80=99t?= work in gui when there are multiple-column-width
 characters
Date: Thu, 01 Nov 2018 15:52:14 -0700
Lines: 21
Message-ID: <87lg6cjtr5.fsf@HIDDEN>
References: <87wopw8np3.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: usenet@HIDDEN
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Cancel-Lock: sha1:MrB3Ig+5EiIcE7uZSPYZ/jHr9rg=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
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: -5.8 (-----)

"Garreau, Alexandre" <galex-713@HIDDEN> writes:

> Given this (rectangular) excerpt from my bug-gnu-emacs summary:
>> …01-nov…[-> 33224 <at> debbugs.gnu.org        ] bug#33224: `message-simpli…
>> …01-nov…[Noam Postavsky                  ] bug#33225: [debbugs.el] Do…
>> …01-nov…[-> Noam Postavsky               ]  bug#33225: [debbugs.el] D…
>> …01-nov…[積丹尼 Dan Jacobson             ] bug#33226: chromium, firef…
>
> On my system (Debian, with Xorg, i3, GUI Emacs), the last line has its
> “]” sooner than the others.  This is because `gnus-correct-length'
> (along with `char-width') says each of the first three characters is
> two-columns wide: but under GUI, this is untrue, as these three
> collectively form exactely 5 columns (and not six, as would calculate
> `gnus-correct-length').

Someone just reported something similar on the org list, that
`string-width' doesn't return the actual width occupied by the string,
which you'd think would be the whole point.

(BTW, it looks like `gnus-correct-length' can be replaced by
`string-width'.)





Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#33232; Package emacs,gnus. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 1 Nov 2018 21:58:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 01 17:58:36 2018
Received: from localhost ([127.0.0.1]:58991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gIKz5-0005GB-Ul
	for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 17:58:36 -0400
Received: from portable.galex-713.eu ([89.234.186.82]:48464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <galex-713@HIDDEN>) id 1gIKz4-0005G3-In
 for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 17:58:35 -0400
Received: from localhost ([::1] helo=portable.galex-713.eu)
 by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <galex-713@HIDDEN>)
 id 1gIKz2-0000Lt-GZ
 for submit <at> debbugs.gnu.org; Thu, 01 Nov 2018 22:58:32 +0100
From: "Garreau\, Alexandre" <galex-713@HIDDEN>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: `gnus-summary-line-format' padding =?utf-8?Q?doesn=E2=80=99t?= work
 in gui when there are multiple-column-width characters
User-Agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu,
 GTK+ Version 3.22.11) of 2017-09-15, modified by Debian
X-Debbugs-Version: 5.13
X-Debbugs-Package: emacs,gnus
PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F
Accept-Language: fr, en, eo, it, br
Date: Thu, 01 Nov 2018 22:58:32 +0100
Message-ID: <87wopw8np3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Given this (rectangular) excerpt from my bug-gnu-emacs summary:
> =E2=80=A601-nov=E2=80=A6[-> 33224 <at> debbugs.gnu.org        ] bug#33224: `me=
ssage-simpli=E2=80=A6
> =E2=80=A601-nov=E2=80=A6[Noam Postavsky                  ] bug#33225: [de=
bbugs.el] Do=E2=80=A6
> =E2=80=A601-nov=E2=80=A6[-> Noam Postavsky               ]  bug#33225: [d=
ebbugs.el] D=E2=80=A6
> =E2=80=A601-nov=E2=80=A6[=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson        =
     ] bug#33226: chromium, firef=E2=80=A6

On my system (Debian, with Xorg, i3, GUI Emacs), the last line has its
=E2=80=9C]=E2=80=9D sooner than the others.  This is because `gnus-correct-=
length'
(along with `char-width') says each of the first three characters is
two-columns wide: but under GUI, this is untrue, as these three
collectively form exactely 5 columns (and not six, as would calculate
`gnus-correct-length').

You can check that by eval=E2=80=99ing:
> (window-text-pixel-size nil (- (point) 593) (- (point) 588))
> (window-text-pixel-size nil (- (point) 583) (- (point) 580))
which return the width of the three first characters after =E2=80=9C[=E2=80=
=9D in the
two last summary lines.

According `gnus-correct-length' they=E2=80=99r the same size:
> (gnus-correct-length "[=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson          =
   ]")
> (gnus-correct-length "[-> Noam Postavsky               ]")

According `char-width' the fact each character is considered to have a
width which is a multiple of the others makes them the same size:
> (mapcar #'char-width "[=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson          =
   ]")
> (mapcar #'char-width "[-> Noam Postavsky               ]")

So would it be better to get gnus-correct-length keep returning a column
number but as a float to be somewhat compatible? or working with pixels
when operating in a GUI frame? but how would padding, which is said to
be in numbers of column, operate then?

or should it stay with a behavior that works in terminal but breaks in
gui?

I=E2=80=99m reporting this at least for archive, in case someone have an id=
ea.
But I=E2=80=99m not sure the solution is that trivial.

Gnus v5.13
GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian




Acknowledgement sent to "Garreau\, Alexandre" <galex-713@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN, bugs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#33232; Package emacs,gnus. 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: Thu, 1 Nov 2018 23:00:02 UTC

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