emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture-templates - any way how to call function for template?
@ 2015-01-21 14:46 David Belohrad
  2015-01-21 15:16 ` David Belohrad
  0 siblings, 1 reply; 2+ messages in thread
From: David Belohrad @ 2015-01-21 14:46 UTC (permalink / raw)
  To: org-mode mailing list

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.

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

* Re: org-capture-templates - any way how to call function for template?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: David Belohrad @ 2015-01-21 15:16 UTC (permalink / raw)
  To: org-mode mailing list

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

.d.


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.

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

end of thread, other threads:[~2015-01-21 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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