GNU bug report logs - #48149
27.2; Wrong underline width when the line char has a width of 2

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: org-mode; Reported by: Shingo Tanaka <shingo.fg8@HIDDEN>; dated Sun, 2 May 2021 01:13:02 UTC; Maintainer for org-mode is emacs-orgmode@HIDDEN.
bug reassigned from package 'org-mode,emacs' to 'org-mode'. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 48149) by debbugs.gnu.org; 9 May 2021 13:58:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 09:58:00 2021
Received: from localhost ([127.0.0.1]:55444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfjwW-00063o-3R
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 09:58:00 -0400
Received: from mail-pf1-f176.google.com ([209.85.210.176]:34605)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shingo.fg8@HIDDEN>) id 1lfjwP-00063T-Ev
 for 48149 <at> debbugs.gnu.org; Sun, 09 May 2021 09:57:55 -0400
Received: by mail-pf1-f176.google.com with SMTP id 10so11963716pfl.1
 for <48149 <at> debbugs.gnu.org>; Sun, 09 May 2021 06:57:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:message-id:from:to:cc:subject:in-reply-to:references
 :user-agent:mime-version;
 bh=xy4JIk1MI8Y45axuEJilXN4v6VHkYgogSV4xnQzyMrY=;
 b=KM+HqAMRhaLZ34gyBoSv8votlwI2TeVtx/ohelWQyMqDbhaqXqTXDLBnn3Ac4CzYYn
 WZpDJuSu6LPJO1OjeRGXtdHDepdjFdpiy3r/VlRfLHofQnv03dftTxSWFa+yCZyutwRb
 IRtN87FcOf9bRdA/5gLh+xS0H7EqraGr34wG+hBhb08bcZHxghNjM/u6ORpDAlGPoIKj
 16XDfZFKo8dak1foKYK5EX7c71Zu+C1/OXzI0oT92brgrHgjwGMcmBWwExkUGA4mU++K
 b9C24SvcL5QzaD5JfpMak8d/Y2GZbWvgZNQuvWZ0mdaYNTSh388Zra+EUXdxIkIg174K
 +yUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to
 :references:user-agent:mime-version;
 bh=xy4JIk1MI8Y45axuEJilXN4v6VHkYgogSV4xnQzyMrY=;
 b=a6Lg8HnVD449Th/Z4TkD+M9XFq5bLBbBmuRDBN8GxOZssCgJ4JUesXoORTPxwlfCLG
 vfOH61MVHQM1IGTeg/d/UbL56nInXcoE+ksyV76w4q4w+RAcZhs+5he9D0ae/k8MgmtX
 faAZzIEW3D98neloiDI+FRgqVuwV0XYAGTym3LuNQOGlJft0xUycuAtvvqId88UEeFUq
 6nA3jFBYOf2rj95Dhe0Ah0+jLnISdsVFdbvTL6+7gzRzYBozwZ1il8E2xd1+huhGWwzj
 KB1OtUuXQSbh7ZdpAo0C8+H7Zrmlwpe9i2aVoPY7ux0yX4iPF2/KM+q0CG5lOKz05oAY
 +vCg==
X-Gm-Message-State: AOAM532ZMRvIGrQPTRZmEziaD58qnNkp4LqHhGna4hvwW/1SH/hgmAsX
 dbwU0cMnxXSWPgUj+OIUwFs=
X-Google-Smtp-Source: ABdhPJyy9vuDB6XCqGXjz9dXNmXS+XQpfP0qvNzn0T5d75ITCX70B/tZNbwCBWTOteXNC5BABudITw==
X-Received: by 2002:a63:5fc5:: with SMTP id
 t188mr20364480pgb.228.1620568667489; 
 Sun, 09 May 2021 06:57:47 -0700 (PDT)
Received: from shingo-desktop.gmail.com
 ([240d:1a:6f4:6b00:5514:ce7d:f5f9:375b])
 by smtp.gmail.com with ESMTPSA id mr3sm16790713pjb.20.2021.05.09.06.57.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 09 May 2021 06:57:46 -0700 (PDT)
Date: Sun, 09 May 2021 22:57:43 +0900
Message-ID: <87eeegc8mg.wl-shingo.fg8@HIDDEN>
From: Shingo Tanaka <shingo.fg8@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
In-Reply-To: <83im416r6h.fsf@HIDDEN>
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
 <87a6pd86el.fsf@HIDDEN> <83im416r6h.fsf@HIDDEN>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
 FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0
 Emacs/27.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Sun_May__9_22:57:41_2021-1"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 48149
Cc: bug-gnu-emacs@HIDDEN, shingo.fg8@HIDDEN,
 Nicolas Goaziou <mail@HIDDEN>, 48149 <at> debbugs.gnu.org
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: -0.8 (/)

--Multipart_Sun_May__9_22:57:41_2021-1
Content-Type: text/plain; charset=ISO-2022-JP

Hi,

> Please note that using char-width cannot solve the problem of a
> character whose width depends on the font, because char-width is
> oblivious to fonts, it only knows about the character's codepoint.

I updated my patch proposal as attached to use window-text-pixel-size based
on Eli's advice.  Could you check it to see if it meets the expectation?  It
works good in my environment with some fonts of different char widths.

Here are some comments:

- New internal functions org-ascii--make-string and org-ascii--pixel-width
  are introduced just to improve code readability of this modification
  
- Line width is decided by org-ascii--make-string, which is a pixel width
  based make-string

- org-ascii--make-string uses org-ascii--pixel-width, which returns
  actual pixel width of characters and strings by using
  window-text-pixel-size with frame default font

- Line justification is also modified to be a pixel width basis

Since this is not a simple modification, I think we might need further
improvement, so any feedback is appreciated.  Especially, we could do better
for table alignment, as that is not very easy because the pixel width of line
character and that of space character is not always the same.

Anyway, I appreciate it if you can give it a try.  I am doing FSF signing
process in parallel just in case.

---
Shingo Tanaka


On Mon, 03 May 2021 01:23:02 +0900,
Eli Zaretskii wrote:
> 
> > From: Nicolas Goaziou <mail@HIDDEN>
> > Date: Sun, 02 May 2021 18:08:50 +0200
> > Cc: 48149 <at> debbugs.gnu.org
> > 
> > > In case of 1), it correctly takes account of the case in which the character
> > > has a width of 2 in `org-ascii--build-title', by dividing the line width by
> > > `(char-width under-char)' (line 700-701), maybe because the character is user
> > > configurable and its width in unknown.  However, in case of 2) and
> > > 3), maybe because the characters is embedded in the code, it looks like only
> > > considering the character always has a width of 1.  But the reality is
> > > character ?$B(!(B or ?$B(,(B can have a width of 2 in the screen displayed with some
> > > fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
> > > doubled of the expected width.
> > >
> > > Attached one is a potential patch.  The basic concepts are:
> > >
> > > a) Do the same in case of 2) and 3) as in case of 1)
> > >    (dividing the line width by `(char-width under-char)',
> > >     assuming `char-width-table' is correctly set)
> > >     
> > > b) Prefer the longer line width if the width is odd, even in case of 1)
> > >    (adding `(1- (char-width under-char))' to dividend,
> > >     just because it should be more beautiful ;-) )
> > 
> > Thank you. This looks good. I cannot apply it on "maint" branch,
> > however. Also, a proper commit message would be nice. Could you send an
> > updated patch?
> 
> Please note that using char-width cannot solve the problem of a
> character whose width depends on the font, because char-width is
> oblivious to fonts, it only knows about the character's codepoint.

--Multipart_Sun_May__9_22:57:41_2021-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="ox-ascii.el.patch"
Content-Transfer-Encoding: base64

LS0tIG94LWFzY2lpLmVsLm9yZwkyMDIxLTAzLTI2IDA5OjI4OjQ0LjAwMDAwMDAwMCArMDkwMAor
Kysgb3gtYXNjaWkuZWwJMjAyMS0wNS0wOSAxNzoyMzo0MC40MjE5MTI5MzEgKzA5MDAKQEAgLTQ0
MCw4ICs0NDAsMTEgQEAKIDs7IGBvcmctYXNjaWktLWRlc2NyaWJlLWxpbmtzJyBjcmVhdGVzIG5v
dGVzIGFib3V0IGxpbmtzIGZvcgogOzsgaW5zZXJ0aW9uIGF0IHRoZSBlbmQgb2YgYSBzZWN0aW9u
LiAgSXQgdXNlcwogOzsgYG9yZy1hc2NpaS0tdW5pcXVlLWxpbmtzJyB0byBnZXQgdGhlIGxpc3Qg
b2YgbGlua3MgdG8gZGVzY3JpYmUuCi07OyBFdmVudHVhbGx5LCBgb3JnLWFzY2lpLS10cmFuc2xh
dGUnIHRyYW5zbGF0ZXMgYSBzdHJpbmcgYWNjb3JkaW5nCis7OyBgb3JnLWFzY2lpLS10cmFuc2xh
dGUnIHRyYW5zbGF0ZXMgYSBzdHJpbmcgYWNjb3JkaW5nCiA7OyB0byBsYW5ndWFnZSBhbmQgY2hh
cnNldCBzcGVjaWZpY2F0aW9uLgorOzsgYG9yZy1hc2NpaS0tbWFrZS1zdHJpbmcnIHByb3ZpZGV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KG9yZy1hc2NpaS0tbWFrZS1zdHJpbmcgKHBjYXNlIGhvdworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGBsZWZ0IDApCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYGNlbnRlciAoLyBwd2lkdGggMikpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYHJpZ2h0IHB3aWR0aCkp
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP1xzIDAgKC0gdGV4dC13
aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChz
dHJpbmctd2lkdGggbGluZXN0cikpKSkKIAkoZm9yd2FyZC1saW5lKSkpCiAgICAgKGJ1ZmZlci1z
dHJpbmcpKSkKIApAQCAtNjk3LDkgKzcxMCw4IEBACiAJCQkgICAgICAocGxpc3QtZ2V0IGluZm8g
OmFzY2lpLXVuZGVybGluZSkpKSkpKQogCSAoYW5kIHVuZGVyLWNoYXIKIAkgICAgICAoY29uY2F0
ICJcbiIKLQkJICAgICAgKG1ha2Utc3RyaW5nICgvIChzdHJpbmctd2lkdGggZmlyc3QtcGFydCkK
LQkJCQkgICAgICAoY2hhci13aWR0aCB1bmRlci1jaGFyKSkKLQkJCQkgICB1bmRlci1jaGFyKSkp
KSkpKSkKKwkJICAgICAgKG9yZy1hc2NpaS0tbWFrZS1zdHJpbmcKKyAgICAgICAgICAgICAgICAg
ICAgICAgKG9yZy1hc2NpaS0tcGl4ZWwtd2lkdGggZmlyc3QtcGFydCkgdW5kZXItY2hhcikpKSkp
KSkpCiAKIChkZWZ1biBvcmctYXNjaWktLWhhcy1jYXB0aW9uLXAgKGVsZW1lbnQgX2luZm8pCiAg
ICJOb24tbmlsIHdoZW4gRUxFTUVOVCBoYXMgYSBjYXB0aW9uIGFmZmlsaWF0ZWQga2V5d29yZC4K
QEAgLTc1MCw5IC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BsaXQtc3RyaW5nCiAJCQkJCSAgICAgKGNvbmNhdCB0aXRsZSAiXG4iIHN1YnRp
dGxlKSAiXG4iKSkpCiAJCQkgICAgICgvICgqIDIgdGV4dC13aWR0aCkgMykpKQpAQCAtMTA0MSwx
MiArMTA1NSwxOSBAQAogCSAgICAgKGZvcm1hdHRlZC1zdWJ0aXRsZSAod2hlbiAob3JnLXN0cmlu
Zy1udy1wIHN1YnRpdGxlKQogCQkJCSAgIChvcmctYXNjaWktLWZpbGwtc3RyaW5nIHN1YnRpdGxl
IHRpdGxlLWxlbiBpbmZvKSkpCiAJICAgICAobGluZQotCSAgICAgIChtYWtlLXN0cmluZwotCSAg
ICAgICAobWluICgrIChtYXggdGl0bGUtbGVuCi0JCQkgICAgKHN0cmluZy13aWR0aCAob3IgYXV0
aG9yICIiKSkKLQkJCSAgICAoc3RyaW5nLXdpZHRoIChvciBlbWFpbCAiIikpKQotCQkgICAgICAg
MikKLQkJICAgIHRleHQtd2lkdGgpIChpZiB1dGY4cCA/4pSBID9fKSkpKQorICAgICAgICAgICAg
ICAob3JnLWFzY2lpLS1tYWtlLXN0cmluZworICAgICAgICAgICAgICAgKGFwcGx5ICMnbWF4Cisg
ICAgICAgICAgICAgICAgICAgICAgKG1hcGNhciAjJ29yZy1hc2NpaS0tcGl4ZWwtd2lkdGgKKwkg
ICAgICAgICAgICAgICAgICAgICAgKG9yZy1zcGxpdC1zdHJpbmcKKwkJICAgICAgICAgICAgICAg
KGNvbmNhdCBmb3JtYXR0ZWQtdGl0bGUgIlxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgZm9ybWF0dGVkLXN1YnRpdGxlICJcbiIKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIChpZiBhdXRob3IgKGNvbmNhdCBhdXRob3IgIlxuIikgIiIpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgZW1haWwgKGNvbmNhdCBl
bWFpbCAiXG4iKSAiIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlxuIikpKQor
ICAgICAgICAgICAgICAgKGlmIHV0ZjhwID/ilIEgP18pCisgICAgICAgICAgICAgICAyIHRleHQt
d2lkdGgpKSkKKyAgICAgICAgKG1lc3NhZ2UgIiVzIiBsaW5lKQorICAgICAgICAobWVzc2FnZSAi
JXMiIGZvcm1hdHRlZC10aXRsZSkKIAkob3JnLWFzY2lpLS1qdXN0aWZ5LWxpbmVzCiAJIChjb25j
YXQgbGluZSAiXG4iCiAJCSAodW5sZXNzIHV0ZjhwICJcbiIpCkBAIC0xMDgyLDkgKzExMDMsOSBA
QAogCSAgICAobGV0ICgodGl0bGUgKG9yZy1hc2NpaS0tdHJhbnNsYXRlICJGb290bm90ZXMiIGlu
Zm8pKSkKIAkgICAgICAoY29uY2F0CiAJICAgICAgIHRpdGxlICJcbiIKLQkgICAgICAgKG1ha2Ut
c3RyaW5nCi0JCShzdHJpbmctd2lkdGggdGl0bGUpCi0JCShpZiAoZXEgKHBsaXN0LWdldCBpbmZv
IDphc2NpaS1jaGFyc2V0KSAndXRmLTgpID/ilIAgP18pKSkpCisgICAgICAgICAgICAgICAob3Jn
LWFzY2lpLS1tYWtlLXN0cmluZworICAgICAgICAgICAgICAgIChvcmctYXNjaWktLXBpeGVsLXdp
ZHRoIHRpdGxlKQorICAgICAgICAgICAgICAgIChpZiAoZXEgKHBsaXN0LWdldCBpbmZvIDphc2Np
aS1jaGFyc2V0KSAndXRmLTgpID/ilIAgP18pKSkpCiAJICAgICJcblxuIgogCSAgICAobGV0ICgo
dGV4dC13aWR0aCAoLSAocGxpc3QtZ2V0IGluZm8gOmFzY2lpLXRleHQtd2lkdGgpCiAJCQkJIGds
b2JhbC1tYXJnaW4pKSkKQEAgLTExNTAsNiArMTE3MSwyOSBAQAogICAobGV0ICgoY2hhcnNldCAo
aW50ZXJuIChmb3JtYXQgIjolcyIgKHBsaXN0LWdldCBpbmZvIDphc2Np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zY2lpLS1waXhlbC13
aWR0aCAob2JqKQorICAiUmV0dXJuIE9CSiBwaXhlbCB3aWR0aCBpbiBkaXNwbGF5LgorT0JKIGlz
IHN1cHBvc2VkIHRvIGJlIGEgY2hhcmFjdGVyIG9yIGEgc3RyaW5nLiAgUmV0dXJuZWQgcGl4ZWwK
K3dpZHRoIGlzIGJhc2VkIG9uIGZyYW1lIGRlZmF1bHQgZm9udC4iCisgICh3aXRoLXRlbXAtYnVm
ZmVyCisgICAgKGluc2VydCBvYmopCisgICAgKHN3aXRjaC10by1idWZmZXIgKGN1cnJlbnQtYnVm
ZmVyKSkKKyAgICAoY2FyICh3aW5kb3ctdGV4dC1waXhlbC1zaXplCisgICAgICAgICAgbmlsIDEg
KDErIChpZiAoc2VxdWVuY2VwIG9iaikgKGxlbmd0aCBvYmopIDEpKSkpKSkKKwogCiAMCiA7Ozsg
VHJhbnNjb2RlIEZ1bmN0aW9ucwpAQCAtMTk2MCw3ICsyMDA0LDkgQEAKIAkJCQkJJ2lkZW50aXR5
IGluZm8gdCkKIAkJCQkgICAgICBjZWxsKSkKIAkJCSBsY29ybmVyKQotCQkgICAgICAgKG1ha2Ut
c3RyaW5nICgrIDIgd2lkdGgpIChzdHJpbmctdG8tY2hhciBob3JpeikpCisgICAgICAgICAgICAg
ICAgICAgICAgIChvcmctYXNjaWktLW1ha2Utc3RyaW5nCisgICAgICAgICAgICAgICAgICAgICAg
ICAoKiAoKyAyIHdpZHRoKSAob3JnLWFzY2lpLS1waXhlbC13aWR0aCA/XHMpKQorICAgICAgICAg
ICAgICAgICAgICAgICAgKHN0cmluZy10by1jaGFyIGhvcml6KSkKIAkJICAgICAgIChjb25kCiAJ
CQkoKG5vdCAobWVtcSAncmlnaHQgYm9yZGVycykpIG5pbCkKIAkJCSgoZXEgKGNhciAobGFzdCAo
b3JnLWVsZW1lbnQtY29udGVudHMgdGFibGUtcm93KSkpIGNlbGwpCg==

--Multipart_Sun_May__9_22:57:41_2021-1--




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 9 May 2021 13:57:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 09:57:56 2021
Received: from localhost ([127.0.0.1]:55442 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfjwR-00063b-Mj
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 09:57:56 -0400
Received: from lists.gnu.org ([209.51.188.17]:46054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shingo.fg8@HIDDEN>) id 1lfjwO-00063U-DE
 for submit <at> debbugs.gnu.org; Sun, 09 May 2021 09:57:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59386)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <shingo.fg8@HIDDEN>)
 id 1lfjwO-0005WO-4x
 for bug-gnu-emacs@HIDDEN; Sun, 09 May 2021 09:57:52 -0400
Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:35821)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <shingo.fg8@HIDDEN>)
 id 1lfjwM-000134-Cx; Sun, 09 May 2021 09:57:51 -0400
Received: by mail-pf1-x430.google.com with SMTP id i13so11943642pfu.2;
 Sun, 09 May 2021 06:57:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:message-id:from:to:cc:subject:in-reply-to:references
 :user-agent:mime-version;
 bh=xy4JIk1MI8Y45axuEJilXN4v6VHkYgogSV4xnQzyMrY=;
 b=KM+HqAMRhaLZ34gyBoSv8votlwI2TeVtx/ohelWQyMqDbhaqXqTXDLBnn3Ac4CzYYn
 WZpDJuSu6LPJO1OjeRGXtdHDepdjFdpiy3r/VlRfLHofQnv03dftTxSWFa+yCZyutwRb
 IRtN87FcOf9bRdA/5gLh+xS0H7EqraGr34wG+hBhb08bcZHxghNjM/u6ORpDAlGPoIKj
 16XDfZFKo8dak1foKYK5EX7c71Zu+C1/OXzI0oT92brgrHgjwGMcmBWwExkUGA4mU++K
 b9C24SvcL5QzaD5JfpMak8d/Y2GZbWvgZNQuvWZ0mdaYNTSh388Zra+EUXdxIkIg174K
 +yUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to
 :references:user-agent:mime-version;
 bh=xy4JIk1MI8Y45axuEJilXN4v6VHkYgogSV4xnQzyMrY=;
 b=mZS01x9wnxB2sscahGYajlykF30Bm17WjR+IKR0y5TF3wb4q7T73kS6xgR7LvcAEoq
 25Na2QmR/NzPnxD7l2hFgChJtLJeyGTUDRTh9ymV1xpfAls6jI2C1kklxqBD2/aZ6wJp
 YaMbFQX+wWibKwrFqAblYmaOhYzStWC0AugprAJPgusn7rcQwTtYl3POJmxwWBq+LHCL
 8lrGxzRdGLGsf/c9P+zO/g1qeqF96Zv+jXurYbhIjs9jVZkiHNkr2Qpo9wglwoEiDb9e
 cFibFrCIen703bBsI5K46KJDhuM7so2g2Mk/y+897LAIzDY3XOuYknTyOBLvcMRICzvH
 YARg==
X-Gm-Message-State: AOAM5332anEsfFg6CKgaT30tgC7Jd2Pf+3B617OFYJ+CCnmlImnPMPFP
 z2w+lNUFUzOjTZx4bAW8BZmk3HhozEcVVw==
X-Google-Smtp-Source: ABdhPJyy9vuDB6XCqGXjz9dXNmXS+XQpfP0qvNzn0T5d75ITCX70B/tZNbwCBWTOteXNC5BABudITw==
X-Received: by 2002:a63:5fc5:: with SMTP id
 t188mr20364480pgb.228.1620568667489; 
 Sun, 09 May 2021 06:57:47 -0700 (PDT)
Received: from shingo-desktop.gmail.com
 ([240d:1a:6f4:6b00:5514:ce7d:f5f9:375b])
 by smtp.gmail.com with ESMTPSA id mr3sm16790713pjb.20.2021.05.09.06.57.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 09 May 2021 06:57:46 -0700 (PDT)
Date: Sun, 09 May 2021 22:57:43 +0900
Message-ID: <87eeegc8mg.wl-shingo.fg8@HIDDEN>
From: Shingo Tanaka <shingo.fg8@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
In-Reply-To: <83im416r6h.fsf@HIDDEN>
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
 <87a6pd86el.fsf@HIDDEN> <83im416r6h.fsf@HIDDEN>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
 FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0
 Emacs/27.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Sun_May__9_22:57:41_2021-1"
Received-SPF: pass client-ip=2607:f8b0:4864:20::430;
 envelope-from=shingo.fg8@HIDDEN; helo=mail-pf1-x430.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, shingo.fg8@HIDDEN,
 Nicolas Goaziou <mail@HIDDEN>, 48149 <at> debbugs.gnu.org
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: -2.1 (--)

--Multipart_Sun_May__9_22:57:41_2021-1
Content-Type: text/plain; charset=ISO-2022-JP

Hi,

> Please note that using char-width cannot solve the problem of a
> character whose width depends on the font, because char-width is
> oblivious to fonts, it only knows about the character's codepoint.

I updated my patch proposal as attached to use window-text-pixel-size based
on Eli's advice.  Could you check it to see if it meets the expectation?  It
works good in my environment with some fonts of different char widths.

Here are some comments:

- New internal functions org-ascii--make-string and org-ascii--pixel-width
  are introduced just to improve code readability of this modification
  
- Line width is decided by org-ascii--make-string, which is a pixel width
  based make-string

- org-ascii--make-string uses org-ascii--pixel-width, which returns
  actual pixel width of characters and strings by using
  window-text-pixel-size with frame default font

- Line justification is also modified to be a pixel width basis

Since this is not a simple modification, I think we might need further
improvement, so any feedback is appreciated.  Especially, we could do better
for table alignment, as that is not very easy because the pixel width of line
character and that of space character is not always the same.

Anyway, I appreciate it if you can give it a try.  I am doing FSF signing
process in parallel just in case.

---
Shingo Tanaka


On Mon, 03 May 2021 01:23:02 +0900,
Eli Zaretskii wrote:
> 
> > From: Nicolas Goaziou <mail@HIDDEN>
> > Date: Sun, 02 May 2021 18:08:50 +0200
> > Cc: 48149 <at> debbugs.gnu.org
> > 
> > > In case of 1), it correctly takes account of the case in which the character
> > > has a width of 2 in `org-ascii--build-title', by dividing the line width by
> > > `(char-width under-char)' (line 700-701), maybe because the character is user
> > > configurable and its width in unknown.  However, in case of 2) and
> > > 3), maybe because the characters is embedded in the code, it looks like only
> > > considering the character always has a width of 1.  But the reality is
> > > character ?$B(!(B or ?$B(,(B can have a width of 2 in the screen displayed with some
> > > fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
> > > doubled of the expected width.
> > >
> > > Attached one is a potential patch.  The basic concepts are:
> > >
> > > a) Do the same in case of 2) and 3) as in case of 1)
> > >    (dividing the line width by `(char-width under-char)',
> > >     assuming `char-width-table' is correctly set)
> > >     
> > > b) Prefer the longer line width if the width is odd, even in case of 1)
> > >    (adding `(1- (char-width under-char))' to dividend,
> > >     just because it should be more beautiful ;-) )
> > 
> > Thank you. This looks good. I cannot apply it on "maint" branch,
> > however. Also, a proper commit message would be nice. Could you send an
> > updated patch?
> 
> Please note that using char-width cannot solve the problem of a
> character whose width depends on the font, because char-width is
> oblivious to fonts, it only knows about the character's codepoint.

--Multipart_Sun_May__9_22:57:41_2021-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="ox-ascii.el.patch"
Content-Transfer-Encoding: base64

LS0tIG94LWFzY2lpLmVsLm9yZwkyMDIxLTAzLTI2IDA5OjI4OjQ0LjAwMDAwMDAwMCArMDkwMAor
Kysgb3gtYXNjaWkuZWwJMjAyMS0wNS0wOSAxNzoyMzo0MC40MjE5MTI5MzEgKzA5MDAKQEAgLTQ0
MCw4ICs0NDAsMTEgQEAKIDs7IGBvcmctYXNjaWktLWRlc2NyaWJlLWxpbmtzJyBjcmVhdGVzIG5v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YXB0aXZlLWZpbGwtbW9k
ZSBuaWwpCisgICAgICAgICAgbGluZXN0ciBwd2lkdGgpCiAgICAgICAod2hpbGUgKDwgKHBvaW50
KSAocG9pbnQtbWF4KSkKLQkoanVzdGlmeS1jdXJyZW50LWxpbmUgaG93KQorICAgICAgICAoc2V0
cSBsaW5lc3RyIChidWZmZXItc3Vic3RyaW5nIChwb2ludCkgKGxpbmUtZW5kLXBvc2l0aW9uKSkK
KyAgICAgICAgICAgICAgcHdpZHRoIChtYXggKC0gKCogKG9yZy1hc2NpaS0tcGl4ZWwtd2lkdGgg
P1xzKSB0ZXh0LXdpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3JnLWFzY2lp
LS1waXhlbC13aWR0aCBsaW5lc3RyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgMCkpCisg
ICAgICAgIChpbnNlcnQgKG9yZy1hc2NpaS0tbWFrZS1zdHJpbmcgKHBjYXNlIGhvdworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGBsZWZ0IDApCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYGNlbnRlciAoLyBwd2lkdGggMikpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYHJpZ2h0IHB3aWR0aCkp
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP1xzIDAgKC0gdGV4dC13
aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChz
dHJpbmctd2lkdGggbGluZXN0cikpKSkKIAkoZm9yd2FyZC1saW5lKSkpCiAgICAgKGJ1ZmZlci1z
dHJpbmcpKSkKIApAQCAtNjk3LDkgKzcxMCw4IEBACiAJCQkgICAgICAocGxpc3QtZ2V0IGluZm8g
OmFzY2lpLXVuZGVybGluZSkpKSkpKQogCSAoYW5kIHVuZGVyLWNoYXIKIAkgICAgICAoY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tlLXN0cmluZworICAgICAgICAgICAgICAgKGFwcGx5ICMnbWF4Cisg
ICAgICAgICAgICAgICAgICAgICAgKG1hcGNhciAjJ29yZy1hc2NpaS0tcGl4ZWwtd2lkdGgKKwkg
ICAgICAgICAgICAgICAgICAgICAgKG9yZy1zcGxpdC1zdHJpbmcKKwkJICAgICAgICAgICAgICAg
KGNvbmNhdCBmb3JtYXR0ZWQtdGl0bGUgIlxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgZm9ybWF0dGVkLXN1YnRpdGxlICJcbiIKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIChpZiBhdXRob3IgKGNvbmNhdCBhdXRob3IgIlxuIikgIiIpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgZW1haWwgKGNvbmNhdCBl
bWFpbCAiXG4iKSAiIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlxuIikpKQor
ICAgICAgICAgICAgICAgKGlmIHV0ZjhwID/ilIEgP18pCisgICAgICAgICAgICAgICAyIHRleHQt
d2lkdGgpKSkKKyAgICAgICAgKG1lc3NhZ2UgIiVzIiBsaW5lKQorICAgICAgICAobWVzc2FnZSAi
JXMiIGZvcm1hdHRlZC10aXRsZSkKIAkob3JnLWFzY2lpLS1qdXN0aWZ5LWxpbmVzCiAJIChjb25j
YXQgbGluZSAiXG4iCiAJCSAodW5sZXNzIHV0ZjhwICJcbiIpCkBAIC0xMDgyLDkgKzExMDMsOSBA
QAogCSAgICAobGV0ICgodGl0bGUgKG9yZy1hc2NpaS0tdHJhbnNsYXRlICJGb290bm90ZXMiIGlu
Zm8pKSkKIAkgICAgICAoY29uY2F0CiAJICAgICAgIHRpdGxlICJcbiIKLQkgICAgICAgKG1ha2Ut
c3RyaW5nCi0JCShzdHJpbmctd2lkdGggdGl0bGUpCi0JCShpZiAoZXEgKHBsaXN0LWdldCBpbmZv
IDphc2NpaS1jaGF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29ybmVyKQotCQkgICAgICAgKG1ha2Ut
c3RyaW5nICgrIDIgd2lkdGgpIChzdHJpbmctdG8tY2hhciBob3JpeikpCisgICAgICAgICAgICAg
ICAgICAgICAgIChvcmctYXNjaWktLW1ha2Utc3RyaW5nCisgICAgICAgICAgICAgICAgICAgICAg
ICAoKiAoKyAyIHdpZHRoKSAob3JnLWFzY2lpLS1waXhlbC13aWR0aCA/XHMpKQorICAgICAgICAg
ICAgICAgICAgICAgICAgKHN0cmluZy10by1jaGFyIGhvcml6KSkKIAkJICAgICAgIChjb25kCiAJ
CQkoKG5vdCAobWVtcSAncmlnaHQgYm9yZGVycykpIG5pbCkKIAkJCSgoZXEgKGNhciAobGFzdCAo
b3JnLWVsZW1lbnQtY29udGVudHMgdGFibGUtcm93KSkpIGNlbGwpCg==

--Multipart_Sun_May__9_22:57:41_2021-1--




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at 48149) by debbugs.gnu.org; 2 May 2021 16:23:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 12:23:30 2021
Received: from localhost ([127.0.0.1]:43569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldEsU-0004b0-Lg
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 12:23:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ldEsT-0004au-1f
 for 48149 <at> debbugs.gnu.org; Sun, 02 May 2021 12:23:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34343)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ldEsN-0001Dh-D2; Sun, 02 May 2021 12:23:23 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4573
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ldEsM-0003fo-GU; Sun, 02 May 2021 12:23:22 -0400
Date: Sun, 02 May 2021 19:23:02 +0300
Message-Id: <83im416r6h.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Nicolas Goaziou <mail@HIDDEN>
In-Reply-To: <87a6pd86el.fsf@HIDDEN> (message from Nicolas Goaziou
 on Sun, 02 May 2021 18:08:50 +0200)
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
 <87a6pd86el.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48149
Cc: shingo.fg8@HIDDEN, 48149 <at> debbugs.gnu.org
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: -3.3 (---)

> From: Nicolas Goaziou <mail@HIDDEN>
> Date: Sun, 02 May 2021 18:08:50 +0200
> Cc: 48149 <at> debbugs.gnu.org
> 
> > In case of 1), it correctly takes account of the case in which the character
> > has a width of 2 in `org-ascii--build-title', by dividing the line width by
> > `(char-width under-char)' (line 700-701), maybe because the character is user
> > configurable and its width in unknown.  However, in case of 2) and
> > 3), maybe because the characters is embedded in the code, it looks like only
> > considering the character always has a width of 1.  But the reality is
> > character ?─ or ?━ can have a width of 2 in the screen displayed with some
> > fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
> > doubled of the expected width.
> >
> > Attached one is a potential patch.  The basic concepts are:
> >
> > a) Do the same in case of 2) and 3) as in case of 1)
> >    (dividing the line width by `(char-width under-char)',
> >     assuming `char-width-table' is correctly set)
> >     
> > b) Prefer the longer line width if the width is odd, even in case of 1)
> >    (adding `(1- (char-width under-char))' to dividend,
> >     just because it should be more beautiful ;-) )
> 
> Thank you. This looks good. I cannot apply it on "maint" branch,
> however. Also, a proper commit message would be nice. Could you send an
> updated patch?

Please note that using char-width cannot solve the problem of a
character whose width depends on the font, because char-width is
oblivious to fonts, it only knows about the character's codepoint.




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at 48149) by debbugs.gnu.org; 2 May 2021 16:09:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 12:09:05 2021
Received: from localhost ([127.0.0.1]:43491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldEeU-0004S6-4h
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 12:09:05 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46247)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1ldEeQ-0004Rs-Je
 for 48149 <at> debbugs.gnu.org; Sun, 02 May 2021 12:09:01 -0400
X-Originating-IP: 185.131.40.67
Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67])
 (Authenticated sender: admin@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7277F1C0007;
 Sun,  2 May 2021 16:08:51 +0000 (UTC)
From: Nicolas Goaziou <mail@HIDDEN>
To: Shingo Tanaka <shingo.fg8@HIDDEN>
Subject: Re: bug#48149: 27.2; Wrong underline width when the line char has a
 width of 2
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
Date: Sun, 02 May 2021 18:08:50 +0200
In-Reply-To: <87fsz62b1w.wl-shingo.fg8@HIDDEN> (Shingo Tanaka's message of
 "Sun, 02 May 2021 10:12:43 +0900")
Message-ID: <87a6pd86el.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48149
Cc: 48149 <at> debbugs.gnu.org
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.7 (-)

Hello,

Shingo Tanaka <shingo.fg8@HIDDEN> writes:

> When exporting org-mode document to plain text (either ascii/unicode/utf-=
8)
> with `org-export-dispatch', Emacs inserts lines under headlines, inline
> tasks, table rows and titles of the document, TOC, list of listings, list=
 of
> tables and footnotes.  The problem is it inserts too long (double width) =
line
> when the line character has a width of 2.
>
> Those lines are made of 3 types of characters below (in ox-ascii.el):
> 1) org-ascii-underline
> 2) (if (eq (plist-get info :ascii-charset) 'utf-8) ?=E2=94=80 ?_)
> 3) (if utf8p ?=E2=94=81 ?_)
>
> In case of 1), it correctly takes account of the case in which the charac=
ter
> has a width of 2 in `org-ascii--build-title', by dividing the line width =
by
> `(char-width under-char)' (line 700-701), maybe because the character is =
user
> configurable and its width in unknown.  However, in case of 2) and
> 3), maybe because the characters is embedded in the code, it looks like o=
nly
> considering the character always has a width of 1.  But the reality is
> character ?=E2=94=80 or ?=E2=94=81 can have a width of 2 in the screen di=
splayed with some
> fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
> doubled of the expected width.
>
> Attached one is a potential patch.  The basic concepts are:
>
> a) Do the same in case of 2) and 3) as in case of 1)
>    (dividing the line width by `(char-width under-char)',
>     assuming `char-width-table' is correctly set)
>=20=20=20=20=20
> b) Prefer the longer line width if the width is odd, even in case of 1)
>    (adding `(1- (char-width under-char))' to dividend,
>     just because it should be more beautiful ;-) )

Thank you. This looks good. I cannot apply it on "maint" branch,
however. Also, a proper commit message would be nice. Could you send an
updated patch?

Moreover, have you signed FSF papers already? This is above limit for
tiny changes.

Regards,
--=20
Nicolas Goaziou




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at 48149) by debbugs.gnu.org; 2 May 2021 09:17:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 05:17:01 2021
Received: from localhost ([127.0.0.1]:41741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld8Dl-0004Be-5d
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 05:17:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ld8Dj-00046u-SO
 for 48149 <at> debbugs.gnu.org; Sun, 02 May 2021 05:17:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58378)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ld8Dd-0002mB-3i; Sun, 02 May 2021 05:16:54 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2010
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ld8Dc-0002Ba-HZ; Sun, 02 May 2021 05:16:52 -0400
Date: Sun, 02 May 2021 12:16:32 +0300
Message-Id: <831rap8phr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Rudolf Schlatte <rudi@HIDDEN>
In-Reply-To: <m2r1ip8rcx.fsf@HIDDEN> (message from Rudolf Schlatte on
 Sun, 02 May 2021 10:36:14 +0200)
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
 <837dkh8uzi.fsf__22492.4155323365$1619940077$gmane$org@HIDDEN>
 <m2r1ip8rcx.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48149
Cc: 48149 <at> debbugs.gnu.org
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: -3.3 (---)

> From: Rudolf Schlatte <rudi@HIDDEN>
> Date: Sun, 02 May 2021 10:36:14 +0200
> 
> > You reported a similar bug already, and I replied there that TRT in
> > these cases is to use window-text-pixel-size, which will automatically
> > account for the actual width on display of any characters and any
> > fonts specified for displaying them.  char-width is an approximation,
> > and is accurate only on TTY frames.
> 
> Isn't the primary result of org-export a plain (UTF-8) text file,
> instead of an emacs buffer to be displayed in a GUI or TTY frame?
> 
> If so, maybe the criterion for correctness should be that "cat
> filename.txt" looks as expected in a terminal, even if opening that file
> in Emacs shows lines of different lengths due to variable-pitch faces
> etc.

If the result is supposed to be displayed only on text-mode terminals,
then indeed string-width is the way to go (assuming that the terminal
in question will use fonts that will not break the alignment).
However, if the result is supposed to be displayed by a GUI program
such as Emacs, then string-width will not produce accurate results.

Maybe this is not important in this kind of export, in which case I
apologize for the noise.




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 2 May 2021 08:39:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 04:39:10 2021
Received: from localhost ([127.0.0.1]:41510 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld7d7-0008OL-NG
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 04:39:10 -0400
Received: from lists.gnu.org ([209.51.188.17]:55412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1ld7d5-0008OE-Cp
 for submit <at> debbugs.gnu.org; Sun, 02 May 2021 04:39:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34940)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1ld7d5-0007se-3I
 for bug-gnu-emacs@HIDDEN; Sun, 02 May 2021 04:39:07 -0400
Received: from ciao.gmane.io ([116.202.254.214]:55592)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1ld7d3-000759-8n
 for bug-gnu-emacs@HIDDEN; Sun, 02 May 2021 04:39:06 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1ld7cz-0005lJ-Ah
 for bug-gnu-emacs@HIDDEN; Sun, 02 May 2021 10:39:01 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Rudolf Schlatte <rudi@HIDDEN>
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
Date: Sun, 02 May 2021 10:36:14 +0200
Message-ID: <m2r1ip8rcx.fsf@HIDDEN>
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
 <837dkh8uzi.fsf__22492.4155323365$1619940077$gmane$org@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)
Cancel-Lock: sha1:A9/Fs2ExA5c5KofSF+d0kMFXOac=
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: -15
X-Spam_score: -1.6
X-Spam_bar: -
X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
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: -2.1 (--)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Sun, 02 May 2021 10:12:43 +0900
>> From: Shingo Tanaka <shingo.fg8@HIDDEN>
>> 
>> When exporting org-mode document to plain text (either ascii/unicode/utf-8)
>> with `org-export-dispatch', Emacs inserts lines under headlines, inline
>> tasks, table rows and titles of the document, TOC, list of listings, list of
>> tables and footnotes.  The problem is it inserts too long (double width) line
>> when the line character has a width of 2.
>> 
>> Those lines are made of 3 types of characters below (in ox-ascii.el):
>> 1) org-ascii-underline
>> 2) (if (eq (plist-get info :ascii-charset) 'utf-8) ?─ ?_)
>> 3) (if utf8p ?━ ?_)
>> 
>> In case of 1), it correctly takes account of the case in which the character
>> has a width of 2 in `org-ascii--build-title', by dividing the line width by
>> `(char-width under-char)' (line 700-701), maybe because the character is user
>> configurable and its width in unknown.  However, in case of 2) and
>> 3), maybe because the characters is embedded in the code, it looks like only
>> considering the character always has a width of 1.  But the reality is
>> character ?─ or ?━ can have a width of 2 in the screen displayed with some
>> fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
>> doubled of the expected width.
>> 
>> Attached one is a potential patch.  The basic concepts are:
>> 
>> a) Do the same in case of 2) and 3) as in case of 1)
>>    (dividing the line width by `(char-width under-char)',
>>     assuming `char-width-table' is correctly set)
>>     
>> b) Prefer the longer line width if the width is odd, even in case of 1)
>>    (adding `(1- (char-width under-char))' to dividend,
>>     just because it should be more beautiful ;-) )
>
> You reported a similar bug already, and I replied there that TRT in
> these cases is to use window-text-pixel-size, which will automatically
> account for the actual width on display of any characters and any
> fonts specified for displaying them.  char-width is an approximation,
> and is accurate only on TTY frames.

Isn't the primary result of org-export a plain (UTF-8) text file,
instead of an emacs buffer to be displayed in a GUI or TTY frame?

If so, maybe the criterion for correctness should be that "cat
filename.txt" looks as expected in a terminal, even if opening that file
in Emacs shows lines of different lengths due to variable-pitch faces
etc.





Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.

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


Received: (at 48149) by debbugs.gnu.org; 2 May 2021 07:18:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 02 03:18:21 2021
Received: from localhost ([127.0.0.1]:41069 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld6Mv-0007JH-Ko
	for submit <at> debbugs.gnu.org; Sun, 02 May 2021 03:18:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ld6Mt-0007J9-Tz
 for 48149 <at> debbugs.gnu.org; Sun, 02 May 2021 03:18:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57273)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ld6Mo-00010C-OB; Sun, 02 May 2021 03:18:14 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2429
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ld6Mn-0001zH-4S; Sun, 02 May 2021 03:18:14 -0400
Date: Sun, 02 May 2021 10:17:53 +0300
Message-Id: <837dkh8uzi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Shingo Tanaka <shingo.fg8@HIDDEN>
In-Reply-To: <87fsz62b1w.wl-shingo.fg8@HIDDEN> (message from Shingo Tanaka
 on Sun, 02 May 2021 10:12:43 +0900)
Subject: Re: bug#48149: 27.2;
 Wrong underline width when the line char has a width of 2
References: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48149
Cc: 48149 <at> debbugs.gnu.org
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: -3.3 (---)

> Date: Sun, 02 May 2021 10:12:43 +0900
> From: Shingo Tanaka <shingo.fg8@HIDDEN>
> 
> When exporting org-mode document to plain text (either ascii/unicode/utf-8)
> with `org-export-dispatch', Emacs inserts lines under headlines, inline
> tasks, table rows and titles of the document, TOC, list of listings, list of
> tables and footnotes.  The problem is it inserts too long (double width) line
> when the line character has a width of 2.
> 
> Those lines are made of 3 types of characters below (in ox-ascii.el):
> 1) org-ascii-underline
> 2) (if (eq (plist-get info :ascii-charset) 'utf-8) ?$B(!(B ?_)
> 3) (if utf8p ?$B(,(B ?_)
> 
> In case of 1), it correctly takes account of the case in which the character
> has a width of 2 in `org-ascii--build-title', by dividing the line width by
> `(char-width under-char)' (line 700-701), maybe because the character is user
> configurable and its width in unknown.  However, in case of 2) and
> 3), maybe because the characters is embedded in the code, it looks like only
> considering the character always has a width of 1.  But the reality is
> character ?$B(!(B or ?$B(,(B can have a width of 2 in the screen displayed with some
> fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
> doubled of the expected width.
> 
> Attached one is a potential patch.  The basic concepts are:
> 
> a) Do the same in case of 2) and 3) as in case of 1)
>    (dividing the line width by `(char-width under-char)',
>     assuming `char-width-table' is correctly set)
>     
> b) Prefer the longer line width if the width is odd, even in case of 1)
>    (adding `(1- (char-width under-char))' to dividend,
>     just because it should be more beautiful ;-) )

You reported a similar bug already, and I replied there that TRT in
these cases is to use window-text-pixel-size, which will automatically
account for the actual width on display of any characters and any
fonts specified for displaying them.  char-width is an approximation,
and is accurate only on TTY frames.




Information forwarded to emacs-orgmode@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#48149; Package org-mode,emacs. Full text available.
bug No longer marked as found in versions 27.2. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package 'emacs' to 'org-mode,emacs'. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 2 May 2021 01:12:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 01 21:12:51 2021
Received: from localhost ([127.0.0.1]:39492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ld0fD-0007xc-NE
	for submit <at> debbugs.gnu.org; Sat, 01 May 2021 21:12:51 -0400
Received: from lists.gnu.org ([209.51.188.17]:56382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shingo.fg8@HIDDEN>) id 1ld0fB-0007xW-QH
 for submit <at> debbugs.gnu.org; Sat, 01 May 2021 21:12:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39462)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <shingo.fg8@HIDDEN>)
 id 1ld0fB-000745-LM
 for bug-gnu-emacs@HIDDEN; Sat, 01 May 2021 21:12:49 -0400
Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:44991)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <shingo.fg8@HIDDEN>)
 id 1ld0fA-00073H-0M
 for bug-gnu-emacs@HIDDEN; Sat, 01 May 2021 21:12:49 -0400
Received: by mail-pj1-x102a.google.com with SMTP id
 m6-20020a17090a8586b02901507e1acf0fso1334271pjn.3
 for <bug-gnu-emacs@HIDDEN>; Sat, 01 May 2021 18:12:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:message-id:from:to:subject:user-agent:mime-version;
 bh=dTJ7NKgFq5zWxVtXRdTJ1EMz2t0/9GG1McRxJFzWA8U=;
 b=SztKbeJT6Lvcd7rUCnXxRe1brhIf4z0wxYnVUJueew8dvfeFbbOjGnyMC3C6uQlFfy
 FQ3WaIabPzvsYDKzGo2v/pvMnvH9yxZA7EJTDAwOMiHA62TgHVOZagmrVA0yn5B/1FDg
 HtQWlkRvXnyNly35RQRT6qonVH1ELkQxJke0fDuhi/PqqQF6FTkS+4UpUXGJmHvstN75
 LY6ONjtNkP8qkTO0fCq/AuZ87sPCaNrU8bHYJ3191l8vWHACYPPlEueo2obwN5O/gcIg
 yV7JZnuocnLdD/HJYOAF3Ko7z68DkecfdgwR91uhM0nzkMTEv/medJBTs23PH4bcbfET
 Bz3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:message-id:from:to:subject:user-agent
 :mime-version;
 bh=dTJ7NKgFq5zWxVtXRdTJ1EMz2t0/9GG1McRxJFzWA8U=;
 b=RB1Ni5VoD50pVAkx/RX1aZ1RI8R6k2KOcXHCVaCtun8Yh4Zpk8TswVS6O12KkmqwRg
 L0QQp5KdUeCAyLuTmMlzXF57Ss/D3q9SGXn2GyWEQgmVeHHt+tP9C+pz3eSMURsVUNPs
 vUKp/5ToBWYcTDQpWpNr1fuhlU9hyWCrmlFcqOTiAJ6/YAU3q2g+NxOIvKRiz2ROm5/B
 edl3GxT8hkdBRzxHnJcSLRR+AkPc9Ez27I6mX4abvp4WnkOnz2fVQ0Tg5MV4U58rKlPE
 9QYl+6Zvk2PC3EBImYLR4luv5Jf4wdB1ZR28YLfE58od6OWzPEhVLpPX/Ae0Mt3bxY85
 4Kfw==
X-Gm-Message-State: AOAM533yWF9yaMryLgTLESiobcJ01sl+GIfaHPbYibpNc/3X1qE2R/Ip
 u3irZ0YFdvFAbs4b5DkzCnbTke5NSKzFGQ==
X-Google-Smtp-Source: ABdhPJyYjPVCv1M2LJUDpa6XoGEGFRLpdXmLAg1RNADwSQeJtMEuKLcHqTxsVRIoENhJwWMcyQ4e1A==
X-Received: by 2002:a17:902:d70f:b029:ec:b679:f122 with SMTP id
 w15-20020a170902d70fb02900ecb679f122mr13348984ply.38.1619917965959; 
 Sat, 01 May 2021 18:12:45 -0700 (PDT)
Received: from shingo-desktop.gmail.com
 ([240d:1a:6f4:6b00:5514:ce7d:f5f9:375b])
 by smtp.gmail.com with ESMTPSA id m9sm6159316pgt.65.2021.05.01.18.12.44
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 01 May 2021 18:12:45 -0700 (PDT)
Date: Sun, 02 May 2021 10:12:43 +0900
Message-ID: <87fsz62b1w.wl-shingo.fg8@HIDDEN>
From: Shingo Tanaka <shingo.fg8@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.2; Wrong underline width when the line char has a width of 2
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
 FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0
 Emacs/27.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Sun_May__2_10:12:43_2021-1"
Received-SPF: pass client-ip=2607:f8b0:4864:20::102a;
 envelope-from=shingo.fg8@HIDDEN; helo=mail-pj1-x102a.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
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: -2.1 (--)

--Multipart_Sun_May__2_10:12:43_2021-1
Content-Type: text/plain; charset=ISO-2022-JP

Hi,

When exporting org-mode document to plain text (either ascii/unicode/utf-8)
with `org-export-dispatch', Emacs inserts lines under headlines, inline
tasks, table rows and titles of the document, TOC, list of listings, list of
tables and footnotes.  The problem is it inserts too long (double width) line
when the line character has a width of 2.

Those lines are made of 3 types of characters below (in ox-ascii.el):
1) org-ascii-underline
2) (if (eq (plist-get info :ascii-charset) 'utf-8) ?$B(!(B ?_)
3) (if utf8p ?$B(,(B ?_)

In case of 1), it correctly takes account of the case in which the character
has a width of 2 in `org-ascii--build-title', by dividing the line width by
`(char-width under-char)' (line 700-701), maybe because the character is user
configurable and its width in unknown.  However, in case of 2) and
3), maybe because the characters is embedded in the code, it looks like only
considering the character always has a width of 1.  But the reality is
character ?$B(!(B or ?$B(,(B can have a width of 2 in the screen displayed with some
fonts (ex. "Noto Sans Mono CJK JP"), and in that case the line width gets
doubled of the expected width.

Attached one is a potential patch.  The basic concepts are:

a) Do the same in case of 2) and 3) as in case of 1)
   (dividing the line width by `(char-width under-char)',
    assuming `char-width-table' is correctly set)
    
b) Prefer the longer line width if the width is odd, even in case of 1)
   (adding `(1- (char-width under-char))' to dividend,
    just because it should be more beautiful ;-) )

Regards,
---
Shingo Tanaka

--Multipart_Sun_May__2_10:12:43_2021-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="ox-ascii.el.patch"
Content-Transfer-Encoding: base64

LS0tIG94LWFzY2lpLmVsLm9yZwkyMDIxLTAzLTI2IDA5OjI4OjQ0LjAwMDAwMDAwMCArMDkwMAor
Kysgb3gtYXNjaWkuZWwJMjAyMS0wNS0wMiAwOTowMjo0MS4xNjg1NjUzNjIgKzA5MDAKQEAgLTY5
Nyw3ICs2OTcsOCBAQAogCQkJICAgICAgKHBsaXN0LWdldCBpbmZvIDphc2NpaS11bmRlcmxpbmUp
KSkpKSkKIAkgKGFuZCB1bmRlci1jaGFyCiAJICAgICAgKGNvbmNhdCAiXG4iCi0JCSAgICAgICht
YWtlLXN0cmluZyAoLyAoc3RyaW5nLXdpZHRoIGZpcnN0LXBhcnQpCisJCSAgICAgIChtYWtlLXN0
cmluZyAoLyAoKyAoc3RyaW5nLXdpZHRoIGZpcnN0LXBhcnQpCisgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICgxLSAoY2hhci13aWR0aCB1bmRlci1jaGFyKSkpCiAJCQkJ
ICAgICAgKGNoYXItd2lkdGggdW5kZXItY2hhcikpCiAJCQkJICAgdW5kZXItY2hhcikpKSkpKSkp
CiAKQEAgLTc0OCwxMSArNzQ5LDEzIEBACiBjb250ZW50cyBhY2NvcmRpbmcgdG8gdGhlIHNwZWNp
ZmllZCB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lk
dGguCiAJICAgICAodGl0bGUtbGVuIChtaW4gKGFwcGx5ICMnbWF4CkBAIC0xMDQyLDExICsxMDUw
LDE0IEBACiAJCQkJICAgKG9yZy1hc2NpaS0tZmlsbC1zdHJpbmcgc3VidGl0bGUgdGl0bGUtbGVu
IGluZm8pKSkKIAkgICAgIChsaW5lCiAJICAgICAgKG1ha2Utc3RyaW5nCi0JICAgICAgIChtaW4g
KCsgKG1heCB0aXRsZS1sZW4KLQkJCSAgICAoc3RyaW5nLXdpZHRoIChvciBhdXRob3IgIiIpKQot
CQkJICAgIChzdHJpbmctd2lkdGggKG9yIGVtYWlsICIiKSkpCi0JCSAgICAgICAyKQotCQkgICAg
dGV4dC13aWR0aCkgKGlmIHV0ZjhwID/ilIEgP18pKSkpCisJICAgICAgICgvICgrIChtaW4gKCsg
KG1heCB0aXRsZS1sZW4KKwkJCSAgICAgICAoc3RyaW5nLXdpZHRoIChvciBhdXRob3IgIiIpKQor
CQkJICAgICAgIChzdHJpbmctd2lkdGggKG9yIGVtYWlsICIiKSkpCisJCSAgICAgICAgICAyKQor
CQkgICAgICAgICAgdGV4dC13aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICgxLSAoY2hhci13
aWR0aCBsaW5lLWNoYXIpKSkKKyAgICAgICAgICAgICAgICAgIChjaGFyLXdpZHRoIGxpbmUtY2hh
cikpCisgICAgICAgICAgICAgICBsaW5lLWNoYXIpKSkKIAkob3JnLWFzY2lpLS1qdXN0aWZ5LWxp
bmVzCiAJIChjb25jYXQgbGluZSAiXG4iCiAJCSAodW5sZXNzIHV0ZjhwICJcbiIpCkBAIC0xMDc5
LDEyICsxMDkwLDE1IEBACiAJICh3aGVuIGRlZmluaXRpb25zCiAJICAgKGNvbmNhdAogCSAgICAi
XG5cblxuIgotCSAgICAobGV0ICgodGl0bGUgKG9yZy1hc2NpaS0tdHJhbnNsYXRlICJGb290bm90
ZXMiIGluZm8pKSkKKwkgICAgKGxldCAoKHRpdGxlIChvcmctYXNja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gICAgICAgICh1bmRlci1jaGFyIChpZiB1dGY4cCA/4pSBID9fKSkpCiAgICAgKG9yZy1h
c2NpaS0taW5kZW50LXN0cmluZwogICAgICAoY29uY2F0CiAgICAgICA7OyBUb3AgbGluZSwgd2l0
aCBhbiBhZGRpdGlvbmFsIGJsYW5rIGxpbmUgaWYgbm90IGluIFVURi04LgotICAgICAgKG1ha2Ut
c3RyaW5nIHdpZHRoIChpZiB1dGY4cCA/4pSBID9fKSkgIlxuIgorICAgICAgKG1ha2Utc3RyaW5n
ICgvICgrIHdpZHRoICgxLSAoY2hhci13aWR0aCB1bmRlci1jaGFyKSkpCisgICAgICAgICAgICAg
ICAgICAgICAgKGNoYXItd2lkdGggdW5kZXItY2hhcikpCisgICAgICAgICAgICAgICAgICAgdW5k
ZXItY2hhcikgIlxuIgogICAgICAgKHVubGVzcyB1dGY4cCAoY29uY2F0IChtYWtlLXN0cmluZyB3
aWR0aCA/ICkgIlxuIikpCiAgICAgICA7OyBBZGQgdGl0bGUuICBGaWxsIGl0IGlmIHdpZGVyIHRo
YW4gaW5saW5ldGFzay4KICAgICAgIChsZXQgKCh0aXRsZSAob3JnLWFzY2lpLS1idWlsZC10aXRs
ZSBpbmxpbmV0YXNrIGluZm8gd2lkdGgpKSkKQEAgLTEzOTUsOSArMTQxMiwxNCBAQAogICAgICAg
OzsgSWYgQ09OVEVOVFMgaXMgbm90IGVtcHR5LCBpbnNlcnQgaXQgYWxvbmcgd2l0aAogICAgICAg
OzsgYSBzZXBhcmF0b3IuCiAgICAgICAod2hlbiAob3JnLXN0cmluZy1udy1wIGNvbnRlbnRzKQot
ICAgICAgICAoY29uY2F0IChtYWtlLXN0cmluZyB3aWR0aCAoaWYgdXRmOHAgP+KUgCA/LSkpICJc
biIgY29udGVudHMpKQorICAgICAgICAoY29uY2F0IChtYWtlLXN0cmluZyAoLyAoKyB3aWR0aCAo
MS0gKGNoYXItd2lkdGggdW5kZXItY2hhcikpKQorICAgICAgICAgICAgICAgICAgICAg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opKSkKIAkJICAgICAgKGNvbmNhdAogCQkgICAgICAg
OzsgSW4gb3JkZXIgdG8ga25vdyBpZiBDRUxMIHN0YXJ0cyB0aGUgcm93LCBkbwogCQkgICAgICAg
Ozsgbm90IGNvbXBhcmUgaXQgd2l0aCB0aGUgZmlyc3QgY2VsbCBpbiB0aGUKQEAgLTE5NjAsNyAr
MTk4Myw5IEBACiAJCQkJCSdpZGVudGl0eSBpbmZvIHQpCiAJCQkJICAgICAgY2VsbCkpCiAJCQkg
bGNvcm5lcikKLQkJICAgICAgIChtYWtlLXN0cmluZyAoKyAyIHdpZHRoKSAoc3RyaW5nLXRvLWNo
YXIgaG9yaXopKQorCQkgICAgICAgKG1ha2Utc3RyaW5nICgvICgrIDIgd2lkdGggKDEtIChjaGFy
LXdpZHRoIGhvcml6LWNoYXIpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIChjaGFyLXdpZHRoIGhvcml6LWNoYXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgaG9yaXotY2hhcikKIAkJICAgICAgIChjb25kCiAJCQkoKG5vdCAobWVtcSAncmln
aHQgYm9yZGVycykpIG5pbCkKIAkJCSgoZXEgKGNhciAobGFzdCAob3JnLWVsZW1lbnQtY29udGVu
dHMgdGFibGUtcm93KSkpIGNlbGwpCg==

--Multipart_Sun_May__2_10:12:43_2021-1--




Acknowledgement sent to Shingo Tanaka <shingo.fg8@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#48149; 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: Fri, 1 Jul 2022 11:30:02 UTC

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