So, org-update-dblock or org-dblock-write:columnview is adding trailing
spaces in the org file. These spaces change the behavior of subsequent
calls which will add even more spaces.
Here is a minimal example:
* Table
#+BEGIN: columnview :format "%a %b %c %d %e %f %g"
#+END:
This works as expected. But for each field you add, one trailing space
is appended to the heading when the org-dblock-update is called.
In larger files, I cannot see any logic behind the added spaces so far.
I tested in Emacs 29.1 and org-mode 9.6.6. (Don't know how to use latest
version from git repo.)
The function org-dblock-write:columnview is mostly by Nicolas Goaziou
(from 2016 and 2018). Hello Nicolas, I've added you here. Maybe you have
an idea what this could be?
Anyway, I'm afraid I can't contribute and fix it. I have no experience
with elisp, tooling, debugging, and the org-mode code base. I need this
export feature and will write a org2csv extraction script in Haskell.
I'm aware that it would be much more helpful in org-mode itself – but
sorry...