Hello,

Bastien <b...@gnu.org> writes:

> Dear Arne,
>
> there was a temporary glitch in earlier version of Org about this,
> please upgrade Org to 9.1.12 through the package system and let us
> know if you still have this issue.
oh, i thought that is a feature of some kind. Let me upgrade... Hm, the
feature|issue still exist in 9.1.12.

The issue occurs if the capture buffer isn't finished with a newline. My
workaround:

;;
;; Since some time Org does not prepend a \n after inserting
;; a capture template. We fix this ;).
;;
(defun hmw/org-insert-newline-after-template ()
  (goto-char (point-max))
  (if (not (re-search-backward "\\(^$\\)" (point-at-bol) t))
      (progn
        (goto-char (point-max))
        (insert "\n"))))

(setq org-capture-prepare-finalize-hook
      'hmw/org-insert-newline-after-template)

Regards
hmw

Reply via email to