From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Alternate format for datetree Date: Wed, 29 Aug 2012 21:01:41 +0100 Message-ID: <503E7525.9060105@manor-farm.org> References: <20532.1346040247@alphaville> <503C861B.2040002@wilkesley.net> <6796.1346158256@alphaville> <503DC974.7030508@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]:44349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6oSa-00016J-OA for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 16:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6oSZ-0007t0-7p for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 16:01:56 -0400 Received: from mail2.wilkesley.net ([109.74.196.44]:45857 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6oSY-0007sh-Vn for emacs-orgmode@gnu.org; Wed, 29 Aug 2012 16:01:55 -0400 Received: from [192.168.1.4] (86-46-50-120-dynamic.b-ras3.mvw.galway.eircom.net [86.46.50.120]) (Authenticated sender: ian@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id 33C71626370 for ; Wed, 29 Aug 2012 21:01:49 +0100 (BST) In-Reply-To: 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 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 ! Ian.