From ab82d6ae254666ffe605234d4f512ebdd37a9c0c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 2 May 2021 17:48:47 +0200 Subject: [PATCH] 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 --- 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 70bd1c4df..0dfa3b4e1 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)))