emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xavier Maillard <xavier@maillard.im>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Define org-capture-templates with variables via customize
Date: Mon, 30 Mar 2015 06:07:17 +0200	[thread overview]
Message-ID: <86oanbxh56.fsf@kcals2.maillard.im> (raw)

Hello,

Given the fact I defvar'ed a custom variable holding a template of my
own:

#+BEGIN_SRC emacs-lisp
(defvar xma/org-task-with-effort-template "* TODO %^{Task}
%U
SCHEDULED: %^t
:PROPERTIES:
:Effort: %^{effort|1:00|0:30|0:05|0:15|2:00|3:00|4:00}
:END:
%?
%a

" "Une tache avec une duree d'effort")
#+END_SRC

How would you use that in a template declared via the customize UI ?

How to do the equivalent of this:

#+BEGIN_SRC emacs-lisp
(setq org-capture-templates `(("e" "Task with effort" entry
                              (file "~/Dropbox/refile.org")
                              ,xma/org-task-with-effort-template)))
#+END_SRC

?

Thank you
-- Xavier.

             reply	other threads:[~2015-03-30  5:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  4:07 Xavier Maillard [this message]
2015-03-30 14:49 ` Nick Dokos
2015-03-31 14:15   ` Nicolas Goaziou
2015-04-02  5:32     ` Xavier Maillard
2015-04-02  9:29       ` Nicolas Goaziou
2015-04-04 21:54         ` Xavier Maillard
2015-09-30 17:08           ` Nicolas Girard

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=86oanbxh56.fsf@kcals2.maillard.im \
    --to=xavier@maillard.im \
    --cc=emacs-orgmode@gnu.org \
    /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).