From 428f989c6e9f846cf6a1bbb25ada56146789a2c6 Mon Sep 17 00:00:00 2001 From: Lin Sun Date: Fri, 2 Dec 2022 07:31:05 +0000 Subject: [PATCH] org-table.el: fix match-data changed in org-table-clean-line --- lisp/org-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index b160dc97c..6e6835fba 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1699,7 +1699,7 @@ In particular, this does handle wide and invisible characters." (setq s (mapconcat (lambda (x) (if (member x '(?| ?+)) "|" " ")) s "")) (while (string-match "|\\([ \t]*?[^ \t\r\n|][^\r\n|]*\\)|" s) (setq s (replace-match - (concat "|" (make-string (org-string-width (match-string 1 s)) + (concat "|" (make-string (save-match-data (org-string-width (match-string 1 s))) ?\ ) "|") t t s))) s)) -- 2.20.5