Variable: org-src-preserve-indentation
org-src-preserve-indentation is a customizable variable defined in
org-src.el.gz.
Value
nil
Documentation
If non-nil preserve leading whitespace characters on export.
If non-nil leading whitespace characters in source code blocks are preserved on export, or adjusted while indenting or when switching between the org buffer and the language mode edit buffer.
When this variable is nil, while indenting with M-x org-indent-block (org-indent-block)
or after editing with M-x org-edit-src-code (org-edit-src-code), the minimum (across-lines)
number of leading whitespace characters are removed from all lines,
and the code block is uniformly indented according to the value of
org-edit-src-content-indentation.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-src.el.gz
(defcustom org-src-preserve-indentation nil
"If non-nil preserve leading whitespace characters on export.
If non-nil leading whitespace characters in source code blocks are
preserved on export, or adjusted while indenting or when switching
between the org buffer and the language mode edit buffer.
When this variable is nil, while indenting with `\\[org-indent-block]'
or after editing with `\\[org-edit-src-code]', the minimum (across-lines)
number of leading whitespace characters are removed from all lines,
and the code block is uniformly indented according to the value of
`org-edit-src-content-indentation'."
:group 'org-edit-structure
:type 'boolean)