I have an issue with unwanted spacing when I'm adding entries to datetree. This is the template I'm using, stripped to simplest for the purpose of testing:
("p" "Progress" entry (file+olp+datetree "~/org/progress.org") "* %?" :tree-type week))
What I'm getting as a result is this:
* 2022
** 2022-W52
*** 2022-12-28 Wednesday
**** something
and what I would like to get is this:
* 2022
** 2022-W52
*** 2022-12-28 Wednesday
**** something
I have to stress that this spacing or empty lines are still there even if I replace entry for plain or tree-type for any other option. Also, :empty-lines
, empty-lines-before
or empty-lines-after
are not making any change as far as I can tell along with few other variables I tried setting following some advice I gathered reading similar questions.
I'm not sure why this is happening to begin with, why would anyone want so much spacing and wasted lines in org file and I would bet that I had datetrees without it earlier but I have no idea what changed. Any help much appreciated, I tried every idea that came to my mind.
org-blank-before-new-entry
? You can check withC-h v org-blank-before-new-entry
. Please update your question with that value.heading
andplain-list-item
areauto
, but I did change them to nil and nothing was different.auto
setting: that seems to work for me (although there might be interactions with other settings). I thinkauto
uses the surrounding context to figure out whether to add newlines, so you might get misleading results if your existing files already has empty lines where you don't want them. I would also start withemacs -Q -l /path/to/minimal/init.el
with only the setting oforg-blank-before-new-entry
to make sure there are no interactions with other settings. I haven't tried with thenil
setting yet.auto
setting but with no luck. I even deleted the file and it got recreated automatically but I'm getting the same result. Even if I create older entries, manually remove empty lines and then add entry with capure, it still makes them. Something is really strange here and I have no idea what to do.