From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Alternate format for datetree Date: Wed, 29 Aug 2012 09:25:55 -0500 Message-ID: References: <20532.1346040247@alphaville> <503C861B.2040002@wilkesley.net> <6796.1346158256@alphaville> <503DC974.7030508@manor-farm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6jDW-0001cy-KZ for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 10:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6jDQ-00040C-HF for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 10:26:02 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:33162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6jDQ-000405-7Q for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 10:25:56 -0400 Received: by vcbfl13 with SMTP id fl13so809622vcb.0 for ; Wed, 29 Aug 2012 07:25:55 -0700 (PDT) In-Reply-To: <503DC974.7030508@manor-farm.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: ian@manor-farm.org Cc: emacs-orgmode@gnu.org On Wed, Aug 29, 2012 at 2:49 AM, Ian Barton wrote: > On 28/08/12 13:50, Nick Dokos wrote: >> >> Ian Barton 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). John > > Ian. >