From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Emin.shopper Martinian.shopper" Subject: Re: question about date-tree Date: Sun, 25 Jul 2010 13:33:02 -0400 Message-ID: References: <8739vfb0vq.wl%ucecesf@ucl.ac.uk> <7F71C57E-8EB4-4D96-9AC4-17D8F27C423A@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=47712 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Od54U-0005Vh-1W for emacs-orgmode@gnu.org; Sun, 25 Jul 2010 13:33:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Od54S-0003ox-OR for emacs-orgmode@gnu.org; Sun, 25 Jul 2010 13:33:05 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:53378) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Od54S-0003oZ-LQ for emacs-orgmode@gnu.org; Sun, 25 Jul 2010 13:33:04 -0400 Received: by iwn2 with SMTP id 2so2652408iwn.0 for ; Sun, 25 Jul 2010 10:33:03 -0700 (PDT) In-Reply-To: <7F71C57E-8EB4-4D96-9AC4-17D8F27C423A@gmail.com> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Below is an elisp function which does the required work. I now call this function at the beginning of the month so my journal.org file is pre-populated to make it easier for me to set future todos. You can also call it for any future month/year combination you want. Feel free to add it to orgmode or just let people who want it add to their own system manually. Thanks again for orgmode! ;;;;; Elisp code follows: (defun create-dates-for-month-and-year (month year) "Create entries in date-tree format in current buffer. This function creates nodes for all days in given the given MONTH and YEAR in the current buffer (if they do not exist already). " (let ((day 1) (max-days (if (=3D 2 month) (if (date-leap-year-p year) 29 28) (nth month (list nil 31 28 31 30 31 30 31 31 30 31 30 31)))) ) (while (<=3D day max-days) (org-datetree-find-date-create (list month day year)) (setq day (+ 1 day)) ) ) ) On Tue, Jul 20, 2010 at 10:27 AM, Carsten Dominik wrote: > > On Jul 19, 2010, at 11:46 PM, Eric S Fraga wrote: > >> On Mon, 19 Jul 2010 08:10:49 -0400, "Emin.shopper Martinian.shopper" >> wrote: >>> >>> Dear Experts, >>> >>> I really like the date-tree feature of org-remember and use it to plan >>> my daily agenda. Often I want to plan things in the future and fill >>> out an entry for a couple of weeks hence. It's slightly annoying to >>> try to remember the day of week and date so that it will match the >>> date-tree format. > >>> >>> Is there a function/utility/suggestion for prepopulating a month's >>> worth of date-tree daily nodes? >>> >>> Thanks, >>> -Emin >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> I know this doesn't actually answer your question but what I do is >> simply bring up the agenda view and then insert an entry in the right >> day using "i d". =A0This will create a date-tree entry if you've set the >> right variable, specifically org-agenda-diary-file to point to the >> date-tree file. > > > Well, > > this is hard because org-capture places the entry *before* you > get a chance to set those dates. > > - Carsten > >> >> However, I also would like org-capture to handle this situation... >> for instance, I would sometimes like todo entries that I define with >> org-capture to be placed in a date tree structure for either of the >> scheduled or deadline dates that todo entry is initially defined with. >> -- >> Eric S Fraga >> GnuPG: 8F5C 279D 3907 E14A 5C29 =A0570D C891 93D8 FFFC F67D >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > - Carsten > > > >