l...@phdk.org writes: >> According to >> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f58201b1e1b0788098b1bbca45e06e015f5b0b7b >> the current behavior is intentional. So, I believe that the bug is in >> the docstring that has not been updated in that commit. > > That would explain it.
I now updated the docstring to reflect what the commit did. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a9455543df >> Note that indenting region and a single line are not the same. >> Indenting a single line should ideally not touch any other lines, which >> puts limitations on the allowed logic. > > Is there a reason for `org-indent-region' and `org-indent-line' to > have separate behaviors in src-blocks in this case? I'm not sure I > understand the reason that disabling `org-src-tab-acts-natively' > should disable `org-indent-region' but not `org-indent-line'. Wouldn't > it make more sense to have marking a region and running > `org-indent-region' result in the same indentation as going top to > bottom pressing TAB on each line individually? What do you mean by "disable `org-indent-region'"? >> I am not 100% sure what exactly is the problem in the docstring of >> `org-src-tab-acts-natively'. > > From a user perspective, `org-src-tab-acts-natively' is currently > enabled by default but the docstring doesn't itself give any clear > indication of how indentation will behave if it is disabled (or why > one might do this). You need to go to `org-indent-line' to find out. Well. If it is disabled, we do not use native language indentation and instead use Org's defaults. > From a maintenance perspective, I was going through the behavior after > disabling it and had no real idea which of the current behaviors were > intended. The intended behavior is what is documented in the docstring. We have no separate description of how the indentation should look like other than the docstring and the code. In case of discrepancies, we should use common sense and document the decision in docstrings for future reference. -- 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>