From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#33232: `gnus-summary-line-format' padding =?UTF-8?Q?doesn=E2=80=99t?= work in gui when there are multiple-column-width characters Date: Fri, 02 Nov 2018 12:15:50 -0700 Message-ID: <87va5fgujd.fsf@ericabrahamsen.net> References: <87wopw8np3.fsf@portable.galex-713.eu> <87lg6cjtr5.fsf@ericabrahamsen.net> <87efc4idm4.fsf@gmail.com> <87d0rojqyn.fsf@ericabrahamsen.net> <83a7msgf44.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1541186116 21878 195.159.176.226 (2 Nov 2018 19:15:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2018 19:15:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 33232@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 02 20:15:12 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIeuU-0005XK-Ri for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Nov 2018 20:15:11 +0100 Original-Received: from localhost ([::1]:53142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIewb-0004xi-5n for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Nov 2018 15:17:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIewQ-0004wu-Jm for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:17:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIewM-0006Pm-Kj for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:17:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56141) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIewI-0006Ls-Lu for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gIewH-0002Wq-TJ; Fri, 02 Nov 2018 15:17:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87wopw8np3.fsf@portable.galex-713.eu> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 02 Nov 2018 19:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33232 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15411861999689 (code B ref -1); Fri, 02 Nov 2018 19:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Nov 2018 19:16:39 +0000 Original-Received: from localhost ([127.0.0.1]:60399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIevv-0002WD-Fz for submit@debbugs.gnu.org; Fri, 02 Nov 2018 15:16:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIevu-0002W2-Ha for submit@debbugs.gnu.org; Fri, 02 Nov 2018 15:16:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIeve-0005iG-EL for submit@debbugs.gnu.org; Fri, 02 Nov 2018 15:16:25 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41981) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gIeva-0005en-9b for submit@debbugs.gnu.org; Fri, 02 Nov 2018 15:16:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIevW-0004s6-SI for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:16:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIevM-0005Rb-Ve for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:16:10 -0400 Original-Received: from [195.159.176.226] (port=52969 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIevI-0005MT-IJ for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 15:16:00 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gIet7-0003sW-UW for bug-gnu-emacs@gnu.org; Fri, 02 Nov 2018 20:13:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:ygrxHWVmll3OlPAuXWO2e+9IH6k= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151961 Archived-At: Eli Zaretskii writes: >> From: Eric Abrahamsen >> Date: Thu, 01 Nov 2018 16:52:32 -0700 >> Cc: 33232@debbugs.gnu.org >> >> >>> Given this (rectangular) excerpt from my bug-gnu-emacs summary: >> >>>> …01-nov…[-> 33224@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. >> > >> > See Bug#31588, the width of these characters depends on the font, so >> > string-width (which works only on a string) can't give the right answer. >> > Or, from another point of view, it's the font's fault for being too >> > narrow on these characters. >> >> Yeah, I figured it was probably a font issue, but still it's kind of >> misleading to have a function that *sounds* like it's going to handle >> the font issue, but doesn't. > > The only reliable way of getting pixelwise alignment in GUI frames is > to use the :align-to display spec, or other related display property > specs that provide pixelwise width and alignment. Interesting, maybe that's something that Org tables should be using. Eli Zaretskii writes: >> From: Eric Abrahamsen >> Date: Thu, 01 Nov 2018 16:52:32 -0700 >> Cc: 33232@debbugs.gnu.org >> >> > See Bug#31588, the width of these characters depends on the font, so >> > string-width (which works only on a string) can't give the right answer. >> > Or, from another point of view, it's the font's fault for being too >> > narrow on these characters. >> >> Yeah, I figured it was probably a font issue, but still it's kind of >> misleading to have a function that *sounds* like it's going to handle >> the font issue, but doesn't. > > What part of "string-width" tells you that it handles fonts? No, I know that wasn't a reasonable expectation, but I think it's an easy mistake to make.