lisp/org-colview.el: Prevent repeated indentation of keyword lines

* org-colview.el (org-columns-dblock-write-default): Left trim keyword
and TBLFM lines to prevent repeated indentation.

Link: https://list.orgmode.org/orgmode/yplmfrtchs0u.fsf@mnet-mail.de/

TINYCHANGE
This commit is contained in:
Raffael Stocker 2024-06-17 21:09:45 +02:00 committed by Ihor Radchenko
parent e666660c7d
commit 157a0559e5
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 2 deletions

View File

@ -1662,7 +1662,7 @@ definition."
;; Insert affiliated keywords before the table.
(when content-lines
(while (string-match-p "\\`[ \t]*#\\+" (car content-lines))
(insert (pop content-lines) "\n")))
(insert (string-trim-left (pop content-lines)) "\n")))
(save-excursion
;; Insert table at point.
(insert
@ -1675,7 +1675,7 @@ definition."
(let ((case-fold-search t))
(dolist (line content-lines)
(when (string-match-p "\\`[ \t]*#\\+TBLFM:" line)
(insert "\n" line)
(insert "\n" (string-trim-left line))
(unless recalc (setq recalc t))))))
(when recalc (org-table-recalculate 'all t))
(org-table-align)