[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-capture: how to unindent %i?
From: |
Shuguang Sun |
Subject: |
[O] org-capture: how to unindent %i? |
Date: |
Sun, 8 Jul 2018 01:15:53 +0800 |
Hi,
I'm using the org-caputre with a org-capture-templates which I want to use capture a region. "%i" will apply the indent. Is there a %-escapes which will not indent the content but just make a proper level header?
(add-to-list 'org-capture-templates
'("R" "check indent" entry
(file+headline "~/.emacs.d/.notes/.notes.org" "Notes")
"* %?\n%i\n\n%l\n%:type %:url\n%F\nAdded: %U" :empty-lines-before 1 :empty-lines-after 1))
1. "Notes" is the level 1 header, and captured content will become level 2 header under it, which means a "*" will be added at the begining, like "** [cursor]"
2. %i is the indedted initial content. If I capture a marked region, e.g., "a marked region" in a buffer, it will be caputred as initial content, and it becomes:
** [cursor]
[space]a marked region
A space is added automatically as indentation because a "*" added to the header. What I need is just to make a level 2 header, but not add a space to the content, e.g.:
** [cursor]
a marked region
Best Regards,
Shuguang
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] org-capture: how to unindent %i?,
Shuguang Sun <=