summaryrefslogtreecommitdiff
path: root/lisp/org/ox-ascii.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-01-16 06:51:09 +0100
committerStefan Kangas <stefan@marxist.se>2022-01-16 06:51:09 +0100
commit19d681d24bce0bcff1417c73035d1f9e34fbcc4a (patch)
treea3a5c6f501176c26041592014e523c19b9844b13 /lisp/org/ox-ascii.el
parent5cdee3a9970838b6943b58c6f25bbae37d4e4695 (diff)
parente488601849627c53b1638fbab1d115518e0ee794 (diff)
downloademacs-19d681d24bce0bcff1417c73035d1f9e34fbcc4a.tar.gz
emacs-19d681d24bce0bcff1417c73035d1f9e34fbcc4a.tar.bz2
emacs-19d681d24bce0bcff1417c73035d1f9e34fbcc4a.zip
Merge from origin/emacs-28
e488601849 Update to Org 9.5.2-9-g7ba24c 95640360f0 * lisp/net/dictionary.el (dictionary-context-menu): Use pa...
Diffstat (limited to 'lisp/org/ox-ascii.el')
-rw-r--r--lisp/org/ox-ascii.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el
index c22bb13b6dd..38b2a5772c1 100644
--- a/lisp/org/ox-ascii.el
+++ b/lisp/org/ox-ascii.el
@@ -1929,7 +1929,11 @@ a communication channel."
(org-export-table-cell-alignment table-cell info)))))
(setq contents
(concat data
- (make-string (- width (string-width (or data ""))) ?\s))))
+ ;; FIXME: If CONTENTS was transformed by filters,
+ ;; the whole width calculation can be wrong.
+ ;; At least, make sure that we do not throw error
+ ;; when CONTENTS is larger than width.
+ (make-string (max 0 (- width (string-width (or data "")))) ?\s))))
;; Return cell.
(concat (format " %s " contents)
(when (memq 'right (org-export-table-cell-borders table-cell info))