emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Belohrad <david@belohrad.ch>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: org-capture-templates - any way how to call function for template?
Date: Wed, 21 Jan 2015 16:16:21 +0100	[thread overview]
Message-ID: <87lhkwuptm.fsf@pcbe13433.cern.ch> (raw)
In-Reply-To: <87oapsur79.fsf@pcbe13433.cern.ch>

ok, i've found the magic behind:

("E" "Microsoft Exchange diary entry" entry (file+datetree (concat my-org-files "diary.org"))
(function testme))

(defun testme ()
"* %? :event:\n%a\n%^T\n\nEntered on %U"

it took me some time to find out the correct syntax


David Belohrad <david@belohrad.ch> writes:

> Dear All,
> i want to make a capture template, which will call a function to feed
> that template. Is there any way how to do it?
> Something like this:
> ("E" "Dynamic diary entry" entry (file+datetree (concat my-org-files
> "diary.org")) <my_template_function>)
> I have found that one can use function for _target_, but not for actual
> template. Afaik template can be only loaded from a file, right?
> thanks
> .d.

      reply	other threads:[~2015-01-21 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 14:46 org-capture-templates - any way how to call function for template? David Belohrad
2015-01-21 15:16 ` David Belohrad [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:

  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=87lhkwuptm.fsf@pcbe13433.cern.ch \
    --to=david@belohrad.ch \
    --cc=emacs-orgmode@gnu.org \


* 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


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