emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Alternate format for datetree


From: Ian Barton
Subject: Re: [O] Alternate format for datetree
Date: Wed, 29 Aug 2012 08:49:08 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 28/08/12 13:50, Nick Dokos wrote:
Ian Barton <address@hidden> wrote:

I would like to use something like this. However, using a recent git
checkout of org mode and the following simple template from the
original list message:

("u"
          "Test"
          entry
          (file+headline "~/test.org"
                         ,(format "%s %s"
                                  (format-time-string "%B")
                                  (format-time-string "%Y"))))
I get the following error:

Debugger entered--Lisp error: (wrong-type-argument stringp (\, (format
"%s %s" (format-time-string "%B") (format-time-string "%Y"))))
   regexp-quote((\, (format "%s %s" (format-time-string "%B")
(format-time-string "%Y"))))
   org-capture-set-target-location()
   org-capture(nil)
   call-interactively(org-capture nil nil)

I also get the same error from John Hendy's template. Is this a bug in
recent versions of org, or is there an error in the template lisp? I
have tried doing a git bisect, but can only go back a few commits, as
my config now includes  several things that have only recently been
added to org.


You are missing the backquote:

--8<---------------cut here---------------start------------->8---
  `("u"
           "Test"
           entry
           (file+headline "~/test.org"
                          ,(format "%s %s"
                                   (format-time-string "%B")
                                   (format-time-string "%Y"))))
--8<---------------cut here---------------end--------------->8---

Nick

Thanks Nick. Hwever with the following minimal template, from the OP, I still get the error:

;; org-capture settings.
(setq org-capture-templates
`(("t" "test" entry
(file+headline "~/file.org"
,(format "%s"
(format-time-string "%m")))
,(format "** %s \n*** %s-%s \n**** [%s-%s-%s %s %s:%s] "
(format-time-string "%d")
(format-time-string "%Y")
(format-time-string "%A")
(format-time-string "%Y")
(format-time-string "%m")
(format-time-string "%d")
(format-time-string "%a")
(format-time-string "%H")
(format-time-string "%M"))
)))

Ian.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]