emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Shuguang Sun" <shuguang79@qq.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: org-capture: how to unindent %i?
Date: Sun, 8 Jul 2018 01:15:53 +0800	[thread overview]
Message-ID: <tencent_A8FAD1F5F02B9D1FAFF373AE6461027B980A@qq.com> (raw)

[-- 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 --]

                 reply	other threads:[~2018-07-07 17:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=tencent_A8FAD1F5F02B9D1FAFF373AE6461027B980A@qq.com \
    --to=shuguang79@qq.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).