Previous: , Up: Clean View   [Contents][Index]

16.4.2 Hard indentation

It is possible to use hard spaces to achieve the indentation instead, if the bare ASCII file should have the indented look also outside Emacs150. With Org’s support, you have to indent all lines to line up with the outline headers. You would use these settings151:

(setq org-adapt-indentation t
      org-hide-leading-stars t
      org-odd-levels-only t)
Indentation of text below headlines (org-adapt-indentation)

The first setting modifies paragraph filling, line wrapping, and structure editing commands to preserving or adapting the indentation as appropriate.

Hiding leading stars (org-hide-leading-stars)

The second setting makes leading stars invisible by applying the face org-hide to them. For per-file preference, use these file ‘STARTUP’ options:

#+STARTUP: hidestars
#+STARTUP: showstars
Odd levels (org-odd-levels-only)

The third setting makes Org use only odd levels, 1, 3, 5, …, in the outline to create more indentation. On a per-file level, control this with:

#+STARTUP: odd
#+STARTUP: oddeven

To convert a file between single and double stars layouts, use M-x org-convert-to-odd-levels and M-x org-convert-to-oddeven-levels.



This works, but requires extra effort. Org Indent mode is more convenient for most applications.


org-adapt-indentation can also be set to ‘'headline-data’, in which case only data lines below the headline will be indented.