From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Alternate format for datetree Date: Sun, 26 Aug 2012 20:16:45 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5nwd-0005MR-NQ for emacs-orgmode@gnu.org; Sun, 26 Aug 2012 21:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5nwc-0002tM-EJ for emacs-orgmode@gnu.org; Sun, 26 Aug 2012 21:16:47 -0400 Received: from mail-qc0-f169.google.com ([209.85.216.169]:41433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5nwc-0002tH-8Z for emacs-orgmode@gnu.org; Sun, 26 Aug 2012 21:16:46 -0400 Received: by qcsd16 with SMTP id d16so2763880qcs.0 for ; Sun, 26 Aug 2012 18:16:45 -0700 (PDT) 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: c b <24x7x366@gmail.com> Cc: emacs-orgmode On Sun, Aug 26, 2012 at 3:11 PM, c b <24x7x366@gmail.com> wrote: > Hi, > > I have been using org-mode for about 18 months now and love it. I recently > came across the org-capture file+datetree format and it is just what I am > looking for, except that I need a slightly different format described as > below > > Currently format is > > * 2012 > ** 2012-08 > *** 2012-08-26 Sunday > **** [2012-08-26 Sun 13:00] My note for this Sunday afternoon > > Needed format is > > * 08 > ** 26 > *** 2012 Sunday > **** [2012-08-26 Sun 13:00] My note for this Sunday afternoon > > Basically, I need to have the "root" of the date tree on the month, followed > by date and then Year, so that for a particular date, I can see all yearly > activity. > > Is there currently a way to alter this? > > If not, how would I go about adding a file+monthtree format for org-capture? > > Any suggestions would be appreciated I was looking for something similar and someone provided a custom capture template that allowed for using inactive timestamps vs. the default datetree format. See the example provided here: - http://osdir.com/ml/emacs-orgmode-gnu/2012-08/msg00396.html I fiddled with this a bit, not really being familiar and learned a good bit in the process to achieve your desired format. Give this a try: #+begin_src .emacs (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")) ))) #+end_src One thing I couldn't figure out was how to insert a %? after that second long format option. If I just put in %?, loading .emacs caused the error "Not enough arguments to format" or something like that. I'm sure there's some secret elisp escape syntax I just don't know. I tried various combinations of \ and '("") with no success. That'd put the finishing touch on things so your cursor was where you wanted it. Also, for those seeing this... is this how you would accomplish c.b's goal? I just used the sample provided to me in the earlier mailing list email to see if I was up for the challenge, but I have no basis for knowing whether it's a good solution. Hope that helps! John > > Kindly copy me on the response as I am not subscribed to this mailing list. > > Thanks, > c.b.