Hello,

Derek Feichtinger <derek.feichtin...@psi.ch> writes:

> I think that the current way of indenting source blocks
> (with org-src-preserve-indentation is set to nil) is not ideal in regard
> to languages that dislike mixing of tabs and spaces.

For such languages, there is `org-src-preserve-indentation'...
>
> I'm currently switching to python3 and this forbids the mixing.
> Setting org-src-preserve-indentation to t would basically create
> problems with many of my older files,

You can set it locally, for every new Python block, with "-i" switch.

> and I also dislike the reduced readability resulting from the code
> block contents being aligned at column 0.

I cannot see any other way around.

> I just tested it also with some tangled files, and it seems to work
> nicely for my test cases. Still, I may have overlooked something, and
> there is a deeper reason for the original implementation.

Org removes indentation automatically, e.g., when editing a source block
or when exporting a document. If you indent lines in an indentation
preserved block, there is no more way to tell if the indentation is
added by Org -- and could be removed -- or required by the block. This
is why we also need to indent them from column 0.

Regards,

-- 
Nicolas Goaziou

Reply via email to