Remove trailing whitespace when copying templates for periodic tasks

This commit is contained in:
Daniel - 2020-07-18 19:13:04 +02:00
parent ac815a06f1
commit b49018129b
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 3 additions and 2 deletions

View File

@ -540,8 +540,9 @@ drawers, will be copied to point."
;; looking for; this feels hackish, there must be a better way to do it. ;; looking for; this feels hackish, there must be a better way to do it.
(goto-char (org-element-property :contents-end template-element)) (goto-char (org-element-property :contents-end template-element))
(org-mark-element) (org-mark-element)
(buffer-substring-no-properties (region-beginning) (string-trim-right
(region-end))))))) (buffer-substring-no-properties (region-beginning)
(region-end))))))))
(insert template) (insert template)
(org-update-statistics-cookies nil))) (org-update-statistics-cookies nil)))