branch: externals-release/org
commit 157a0559e5c253ed3e927037292b2c78c32746db
Author: Raffael Stocker <r.stoc...@mnet-mail.de>
Commit: Ihor Radchenko <yanta...@posteo.net>

    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....@mnet-mail.de/
    
    TINYCHANGE
---
 lisp/org-colview.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 961ae0fbe5..bc93941e47 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -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)

Reply via email to