emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Automatic title generation for capture mode
@ 2011-04-12 20:25 Jae Hee Lee
  2011-06-26 18:46 ` David Maus
  0 siblings, 1 reply; 2+ messages in thread
From: Jae Hee Lee @ 2011-04-12 20:25 UTC (permalink / raw)
  To: emacs-orgmode

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?

Regards,

Jae

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Automatic title generation for capture mode
  2011-04-12 20:25 Automatic title generation for capture mode Jae Hee Lee
@ 2011-06-26 18:46 ` David Maus
  0 siblings, 0 replies; 2+ messages in thread
From: David Maus @ 2011-06-26 18:46 UTC (permalink / raw)
  To: Jae Hee Lee; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

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.

Documentation:
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"))
        (my-template-function)))

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)

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-26 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 20:25 Automatic title generation for capture mode Jae Hee Lee
2011-06-26 18:46 ` David Maus

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).