[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Automatic title generation for capture mode

From: David Maus
Subject: Re: [O] Automatic title generation for capture mode
Date: Sun, 26 Jun 2011 20:46:05 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Tue, 12 Apr 2011 22:25:53 +0200,
Jae Hee Lee wrote:
> Hi all,
> the default remember-mode generates a title automatically from the text input.
> For example, if I enter the command M-x org-remember
> and input the content of this e-mail followed by C-c C-c,
> the title "(Hi all)" is automatically generated.
> I think this feature is really nice, because sometimes you don't have any 
> specific title for your text or you are just too lazy to think of a title.
> Unfortunately, I have no idea how to realize this using the capture-mode 
> templates.
> Is there a way to make a capture-mode template having this feature?

You might check out C-h v org-capture-templates RET

org-capture-templates is a variable defined in `org-capture.el'.
Its value is shown below.

Templates for the creation of new entries.

Each entry is a list with the following items:


template     The template for creating the capture item.  If you leave this
             empty, an appropriate default template will be used.  See below
             for more details.  Instead of a string, this may also be one of

                 (file "/path/to/template-file")
                 (function function-returning-the-template)

             in order to get a template from a file, or dynamically
             from a function.

So something like

(setq org-capture-templates
      '(("x" "TEMPLATE NAME" entry (file "~/org/inbox.org"))

Should work. `my-template-function' would create the template; the
buffer that was visitied when the template was called can be get by

(org-capture-get :original-buffer)

  -- David
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpqXa_tfjSFp.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]