emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting document from hard whitespace indentation to org-indent-mode


From: Max Brieiev
Subject: Converting document from hard whitespace indentation to org-indent-mode
Date: Wed, 12 Jan 2022 17:47:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Several of my documents use indentation to line up with the headings,
like below:

* Top level headline
  paragraph
  + list item lorem ipsum
    dolor sit amet
** Second level
   some text
*** Third level
    more text

I would like to strip leading whitespace, so that I could switch to
=org-indent-mode= to have a nice view of the document instead of using
hard whitespace indentation.

Basically I want to:
- strip leading whitespace,
- but preserve the indentation of lists and src blocks
- refill all paragraphs according to what =org-fill-paragragh= would do.

How would I do it programmatically? My current Elisp knowledge is poor.

Thanks in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]