emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: Jae Hee Lee <jaehee@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Automatic title generation for capture mode
Date: Sun, 26 Jun 2011 20:46:05 +0200	[thread overview]
Message-ID: <871uygmnwy.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <8982FC73-8D15-4B0A-9298-DE7B3F448C1C@gmx.de>

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

      reply	other threads:[~2011-06-26 18:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 20:25 Automatic title generation for capture mode Jae Hee Lee
2011-06-26 18:46 ` David Maus [this message]

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=871uygmnwy.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=jaehee@gmx.de \
    /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).