Prevent unintented expansion of % in conversion from item to heading

This commit is contained in:
Daniel Borchmann 2025-08-17 19:50:50 +02:00
parent fcb340ad81
commit a0bcceaf8c
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -450,8 +450,10 @@ Via %%(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-
%s
%%?"
first-line-of-body
rest-of-body)))
;; Quote % to prevent unintented expansion by
;; `org-capture-fill-template'.
(replace-regexp-in-string "%" "\\\\%" first-line-of-body)
(replace-regexp-in-string "%" "\\\\%" rest-of-body))))
(org-capture-set-target-location)
(org-capture-place-template)