From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Alternate format for datetree Date: Thu, 06 Sep 2012 08:46:18 +0100 Message-ID: <504854CA.6030007@wilkesley.net> References: <20532.1346040247@alphaville> <503C861B.2040002@wilkesley.net> <6796.1346158256@alphaville> <503DC974.7030508@manor-farm.org> <503E7525.9060105@manor-farm.org> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WqE-0000K5-1d for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 03:49:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9WqC-0001EG-Nc for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 03:49:33 -0400 Received: from mail2.wilkesley.net ([109.74.196.44]:49837 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WqC-00011G-FZ for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 03:49:32 -0400 Received: from [192.168.0.58] (unknown [46.33.134.31]) (Authenticated sender: lists@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id 586D6626558 for ; Thu, 6 Sep 2012 08:48:48 +0100 (BST) In-Reply-To: <503E7525.9060105@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: emacs-orgmode@gnu.org On 29/08/12 21:01, Ian Barton wrote: > On 29/08/12 15:25, John Hendy wrote: >> 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). >> >> > > 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 > ! Now back with a reliable Internet connection. Thanks for the minimal example, which worked correctly. In my full setup, I have quite a lot of template definitions. It turned out that I had put the backquote the wrong side of a bracket. Ian.