I had similar issue. I managed to solve it with help of @parsnip from #emacs channel on freenode IRC.
It's all because of of org-mode-hook
with (org-next-visible-heading 1)
(defun setup-org-log-buffer () (org-next-visible-heading 1))
(add-hook 'org-mode-hook 'setup-org-buffer)
After removing it everything works as expected. Maybe in your case it's something different. Just try to remove all your custom hooks.
I figured this out by running fresh Emacs without config (emacs -q
). Then you can enable capture templates with new line characters. Try it and if it's ok then you probably have something nasty in config. Try to evaluate config piece by piece until capture template will be broken.
This was my test setup:
(global-set-key (kbd "C-c k") 'org-capture)
(setq org-capture-templates
'(("n" "new-line-test")
("n1" "without new line" plain (file "~/new-line-test.org")
"test %T %?") ; without new line
("n2" "with new line after 'test'" plain (file "~/new-line-test.org")
"test\n %T %?") ; with new line
("n3" "with new line after timestamp" plain (file "~/new-line-test.org")
"test %T\n %?") ; with new line
))