emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] (no subject)


From: Michael Welle
Subject: Re: [O] (no subject)
Date: Fri, 04 May 2018 07:38:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3.50 (gnu/linux)

Hello,

Bastien <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]