From f095cfc3c0c0905fdfb95ad2485e4a7b9f5a1a47 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Wed, 27 Jul 2022 11:30:19 +0800 Subject: [PATCH] * lisp/org.el (org-store-log-note): Do not indent empty lines in notes See https://orgmode.org/list/m235eo9d8b.fsf@ntnu.no --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index aae8ac82e1..c12b691eb2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10397,8 +10397,9 @@ EXTRA is additional text that will be inserted into the notes buffer." (let ((ind (org-list-item-body-column (line-beginning-position)))) (dolist (line lines) (insert-and-inherit "\n") - (indent-line-to ind) - (insert-and-inherit line))) + (unless (string-empty-p line) + (indent-line-to ind) + (insert-and-inherit line)))) (message "Note stored") (org-back-to-heading t)))))) ;; Don't add undo information when called from `org-agenda-todo'.