emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org ab82d6a: ox-ascii: Fix title when 2 width c


From: ELPA Syncer
Subject: [elpa] externals-release/org ab82d6a: ox-ascii: Fix title when 2 width char is used
Date: Sun, 2 May 2021 11:57:11 -0400 (EDT)

branch: externals-release/org
commit ab82d6ae254666ffe605234d4f512ebdd37a9c0c
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    ox-ascii: Fix title when 2 width char is used
    
    * lisp/ox-ascii.el (org-ascii-template--document-title): Find width of
    title with `string-width' instead of counting characters.
    
    Fixes: #48148
    
    Reported-by: Shingo Tanaka <shingo.fg8@gmail.com>
---
 lisp/ox-ascii.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 70bd1c4..0dfa3b4 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -1033,7 +1033,7 @@ INFO is a plist used as a communication channel."
             ;; Format TITLE.  It may be filled if it is too wide,
             ;; that is wider than the two thirds of the total width.
             (title-len (min (apply #'max
-                                   (mapcar #'length
+                                   (mapcar #'string-width
                                            (org-split-string
                                             (concat title "\n" subtitle) 
"\n")))
                             (/ (* 2 text-width) 3)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]