|
@@ -728,6 +728,16 @@ captured item after finalizing."
|
|
|
|
|
|
(run-hooks 'org-capture-prepare-finalize-hook)
|
|
|
|
|
|
+ ;; Fix missing final newline, as it may have been deleted by accident
|
|
|
+ (when (eq (org-capture-get :type 'local) 'entry)
|
|
|
+ (save-excursion
|
|
|
+ (goto-char (point-max))
|
|
|
+ (and (not (looking-at-p "^"))
|
|
|
+ (org-with-wide-buffer
|
|
|
+ (and (not (looking-at-p org-heading-regexp))
|
|
|
+ (not (eobp))))
|
|
|
+ (insert "\n"))))
|
|
|
+
|
|
|
;; Did we start the clock in this capture buffer?
|
|
|
(when (and org-capture-clock-was-started
|
|
|
org-clock-marker
|