From 5b6268c29ecb388d1cf4fd677108f2a8cc439543 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 17 Jul 2023 12:57:35 +0300 Subject: [PATCH] org-columns--truncate-below-width: Fix Emacs 27 compatibility * lisp/org-colview.el (org-columns--truncate-below-width): Do not use extra optional arguments that are only available since Emacs 28. --- lisp/org-colview.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 8d8d8954d..ef42f9e23 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -459,7 +459,7 @@ substring whose `string-width' does not exceed WIDTH." (declare (side-effect-free t)) (let ((end (min width (length string))) res) (while (and end (>= end 0)) - (let* ((curr (string-width string 0 end)) + (let* ((curr (string-width (substring string 0 end))) (excess (- curr width))) (if (> excess 0) (cl-decf end (max 1 (/ excess 2)))