From b49018129b84cd8006b6e80dc79081412c07ac60 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 18 Jul 2020 19:13:04 +0200 Subject: [PATCH] Remove trailing whitespace when copying templates for periodic tasks --- site-lisp/db-org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 2777ff4..be521fb 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -540,8 +540,9 @@ drawers, will be copied to point." ;; looking for; this feels hackish, there must be a better way to do it. (goto-char (org-element-property :contents-end template-element)) (org-mark-element) - (buffer-substring-no-properties (region-beginning) - (region-end))))))) + (string-trim-right + (buffer-substring-no-properties (region-beginning) + (region-end)))))))) (insert template) (org-update-statistics-cookies nil)))