GNU bug report logs -
#78178
30.1; org-capture-templates datetree does not respect org-blank-before-new-entry
Previous Next
Full log
View this message in rfc822 format
> Date: Wed, 30 Apr 2025 21:40:09 -0400
> From: "critbase" <critbase <at> critbase.net>
>
> --text follows this line--
>
> The relevant parts of my configuration are as follows:
> (setq org-blank-before-new-entry '((heading . nil)
> (plain-list-item . nil)))
> (setq org-capture-templates
> '(("t" "todo" entry (file+olp+datetree "~/org/superbug.org")
> "* TODO %?\n%U\n%a")
> ("n" "note" entry (file+olp+datetree "~/org/superbug.org")
> "* %?\n%U\n%a")))
>
> When I capture to a new date, creating the first entry for that day,
> there is a blank line inserted after the deepest datetree headline and
> the headline being captured to, like so:
>
> * 2025
> ...
> ** 2025-05 May
> *** 2025-05-01 Thursday
>
> **** TODO Testing date tree
> [2025-05-01 Thu 00:00]
> [[file:~/org/superbug.org::*redacted][redacted]]
>
> However, when org-blank-before-new-entry is set like so:
> (setq org-blank-before-new-entry '((heading . auto)
> (plain-list-item . auto)))
>
> The errant blank line is not created, and the datetree is captured as
> expected:
>
> * 2025
> ...
> ** 2025-05 May
> *** 2025-05-01 Thursday
> **** TODO Testing date tree
> [2025-05-01 Thu 00:00]
> [[file:~/org/superbug.org::*redacted][redacted]]
>
> To my understanding, setting heading to nil in the
> org-blank-before-new-entry list should also capture this way.
>
> Help appreciated.
Thanks, but please report this to the Org developers first. If they
say this is an issue with Emacs core, please come back here with the
details.
This bug report was last modified 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.