>From c94c86fdac09a933337267c29f7e3d4dcf5c3398 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 22 Feb 2019 18:17:35 +0100 Subject: [PATCH 2/3] org-store-log-note: Fix drawer-less logging * lisp/org.el (org-log-beginning): Ensure insertion in current restriction. This commit ensures that drawer-less state-changes and notes are created within the current restriction. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index f22f8b807..27cd2bbd7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13263,7 +13263,7 @@ EXTRA is additional text that will be inserted into the notes buffer." ;; Note associated to a clock is to be located right after ;; the clock. Do not move point. (unless (eq org-log-note-purpose 'clock-out) - (goto-char (org-log-beginning t))) + (goto-char (1- (org-log-beginning t)))) ;; Make sure point is at the beginning of an empty line. (cond ((not (bolp)) (let ((inhibit-read-only t)) (insert "\n"))) ((looking-at "[ \t]*\\S-") (save-excursion (insert "\n")))) -- 2.20.1