* org-capture: how to unindent %i?
@ 2018-07-07 17:15 Shuguang Sun
0 siblings, 0 replies; only message in thread
From: Shuguang Sun @ 2018-07-07 17:15 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1457 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-07 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07 17:15 org-capture: how to unindent %i? Shuguang Sun
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).