From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Looking for a sample function to find a location for org-capture Date: Thu, 12 Aug 2010 12:06:10 +0200 Message-ID: <7D5F4098-7222-4B24-B52E-60A00E576130@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=42910 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjUqQ-0003sw-PS for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 06:17:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjUfu-0008Lj-2c for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 06:06:14 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:62609) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjUft-0008LU-Tg for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 06:06:14 -0400 Received: by ewy28 with SMTP id 28so568751ewy.0 for ; Thu, 12 Aug 2010 03:06:13 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Charles Cave Cc: emacs-orgmode@gnu.org On Aug 12, 2010, at 3:30 AM, Charles Cave wrote: > I'm exploring the many features of org-capture and I see the > documentation about a function for finding the location for refiling. What exactly are you referring to? > > I would like to see some sample code on how to do this. > > At the moment I am using a date tree to file my TODO items and > notes. (I am writing an article about this and will publish soon) > > Let's say I had a headline structure for weeks of the year and I would > like a function to add an item to the heading corresponding to the > week > of the year. Today (12th Aug) we are in Week 32. > > What would the function be to file under the appropriate heading: > > * 2010 > ** 2010-Week-28 > ** 2010-Week-29 > ** 2010-Week-30 > ** 2010-Week-31 > ** 2010-Week-32 > ** 2010-Week-33 > > Could the function create the heading if it didnt exist . just like > org-capture handles creation of new brances on a date tree? Well, the datetree is a special library that does create the headings for a date tree. If you want a different structure (weeks instead of months), code for this would have to be written, and I guess org-capture would have to be extended to call this code. But I am not sure if I understand what you are asking. - Carsten