简体   繁体   中英

When exporting to text in org-mode: Insert blank lines between headings

As I often collect lists of open question in org-mode, I want to be able to easily export the subtree to text with some space between the single headings (such that there is some space for note-taking on a printed copy).

Org-structure looks like this:

* topic xyz
** question 1
** question 2
** question 3

Expected layout of the text export containing configurable number of blank lines between (or after) headings:

━━━━━━━━━━
topic xyz
━━━━━━━━━━

question 1
══════════





question 2
══════════





question 3
══════════

I don't think there is a way to add newlines to your export without formatting your org file. You can enforce newlines by using \\\\ on each line where you want an empty line to appear.

In your case:

* topic xyz
** Question 1
\\
\\
\\
** Question 2...

Execute a regex replacement in the exported text file:

replace-regex RET ^[═]+$ RET \\& Co Co Co

Co inserts the newlines. cp How to replace a character with a newline in Emacs?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM