emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: dlc <dlc@coateconnection.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: How to set a property defaults in a capture template.
Date: Wed, 21 Dec 2011 00:05:14 +0100	[thread overview]
Message-ID: <87pqfihmj9.fsf@gnu.org> (raw)
In-Reply-To: <912E1A11-FBCA-4D6C-9DC1-401FD0DE0780@coateconnection.com> (dlc@coateconnection.com's message of "Tue, 13 Dec 2011 15:56:53 -0600")

dlc <dlc@coateconnection.com> writes:

> I have attempted to use the expansion %(SEXP) along with the property
> api as in the following but it does not work because Emacs-Lisp
> doesn't support nested strings (right?) I am just learning
> emacs-lisp, so I'm am sure my lack of knowledge is at work here.
>
> (setq org-capture-templates
> '(
>   ("t" "Test adding property" entry (file "~/people.org")
>     "* Test Entry %(org-entry-put (point) "STYLE" "habit")"
>            )
>    ( another template
>    )
>           ))  

Shooting in the dark: if this is just a matter of "nested strings",
you can try to simply escape the double-quotes in your template.

  "* Test Entry %(org-entry-put (point) \"STYLE\" \"habit\")"

(Caveat: I didn't check the whole syntax of your setq above...
hope that helps anyway.)

-- 
 Bastien

      reply	other threads:[~2011-12-20 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 21:56 How to set a property defaults in a capture template dlc
2011-12-20 23:05 ` Bastien [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=87pqfihmj9.fsf@gnu.org \
    --to=bzg@altern.org \
    --cc=dlc@coateconnection.com \
    --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).