lisp/org-colview.el: Move cleanup code to cleanup function

* lisp/org-colview.el (org-columns--clean-item): Additionally process
the result with `org-quote-vert'.
(org-columns--capture-view): Remove call to `org-quote-vert'.

`org-columns--clean-item' is used when formatting and inserting column
view dynamic blocks.  By moving the call to `org-quote-vert' to this
function, it can be used by all formatting functions, including
user-supplied ones, to format content to be safe for inclusion in a
table.
This commit is contained in:
Alexander Adolf 2024-04-23 17:43:08 +02:00 committed by Ihor Radchenko
parent 4e6fa96e26
commit fbf613ece9
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 6 deletions

View File

@ -1467,11 +1467,10 @@ the columns according to FORMAT."
(dotimes (i columns)
(let* ((col (+ (line-beginning-position) i))
(p (get-char-property col 'org-columns-key)))
(push (org-quote-vert
(get-char-property col
(if (string= p "ITEM")
'org-columns-value
'org-columns-value-modified)))
(push (get-char-property col
(if (string= p "ITEM")
'org-columns-value
'org-columns-value-modified))
row)))
(unless (or
(and skip-empty
@ -1503,7 +1502,9 @@ an inline src-block."
'(footnote-reference inline-babel-call inline-src-block target
radio-target statistics-cookie)
#'org-element-extract)
(org-no-properties (org-element-interpret-data data))))
(org-quote-vert
(org-no-properties
(org-element-interpret-data data)))))
;;;###autoload
(defun org-dblock-write:columnview (params)