emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Brieiev <max.brieiev@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Converting document from hard whitespace indentation to org-indent-mode
Date: Wed, 12 Jan 2022 17:47:11 +0200	[thread overview]
Message-ID: <878rvl9csg.fsf@gmail.com> (raw)


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	other threads:[~2022-01-12 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 15:47 Max Brieiev [this message]
2022-01-13  0:23 ` Converting document from hard whitespace indentation to org-indent-mode Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rvl9csg.fsf@gmail.com \
    --to=max.brieiev@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).