For the record, the original issue is that with
`org-src-tab-acts-natively' set
to t (which is the new default) you couldn't use tab to indent an empty
line, and
electric-indent-mode wouldn't work properly.
Greg Minshall writes:
i don't know what
would be involved to keep the fix for the original problem (which i was
also seeing), without adding these extra spaces. but, i suspect it
would be worth it, if feasible.
I think the only way would be to change
`org-src--contents-for-write-back' to
keep track of where the point was in the edit buffer, and clean up spaces in
other lines. Doesn't seem difficult ; maybe you could replace the
`buffer-string`
call by two calls, to get the part before point and the one after, then work
with that.
it's long-term emacs behavior to eliminate spaces
at the end of lines, at least in programming modes.
As for the `org-src--content-indentation' spaces, they are quite
peculiar. Note
that they are removed when you call =C-c '= and when you tangle (they
should,
but I haven't tested it), so strictly speaking, they are removed in
programming
modes. What if your org block itself is indented, do you also expect
blank lines
to be entirely empty ?
As for additional indentation in a blank line, it will indeed never get
cleaned
up by org, which isn't ideal. But then, spaces at the end of non blank lines
don't get cleaned up either (I think) and never were. It's up to the user to
remove them, in the appropriate language mode.
Despite these arguments, I have no opinion on the matter.
Regards,
--
Sébastien Miquel