MT <[email protected]> writes: > Guess I made some mistake in the fix... but here's the idea: > In the first two patches, the main change is that we removed =org-trim= > (which removes all the trailing empty lines in tangled blocks blindly) since > it > 1) eats all the intentionally left blank lines > 2) leads to incorrect/ambiguous tangling behavior that makes it > non-revertible for detangling (cuz detangling needs to infer the body content > from the tangled result). > > Then, this will have a series of impacts on tests written on top of the > assumption that they can carelessly add surrounding blank lines as the > =org-trim= will do the cleanup. Also, some of the tangling functions for > each language also add trailing blank lines, e.g., via string joining with > "\n". What I'm trying to do is to fix these reckless implementations to not > add the incorrect new lines. > > Hope this explains.
Sure. I am ok with it. We could also alter the tests, since the changes are anticipated, but fixing the built-in backends to avoid unexpected extra blank lines is indeed better. Could you update the patch to fix the test failures though? Ideally, it would be nice to go through each babel backend and check if there are any extra blank lines that should not be there, but that's optional. At minimum, we need to not break the tests. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
