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 21:01:41 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 29/08/12 15:25, John Hendy wrote:
On Wed, Aug 29, 2012 at 2:49 AM, Ian Barton <address@hidden> wrote:
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"))
)))

Odd. I just copied and pasted this into my .emacs and commented out my
actual capture templates section entirely, leaving only this and it
works as expected.

(Just saw Nick's response as well and was going to both try and
suggest similar with a minimal .emacs).



Thanks both. I'll try with a minimal emacs and post the results. However, it may be a day or two as I am currently in the far West of Ireland with very variable Internet connections
!

Ian.





reply via email to

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