emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] question about date-tree


From: Emin.shopper Martinian.shopper
Subject: Re: [Orgmode] question about date-tree
Date: Sun, 25 Jul 2010 13:33:02 -0400

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 (= 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 (<= 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
<address@hidden> 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"
>> <address@hidden> 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.
>>> address@hidden
>>> 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".  This 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  570D C891 93D8 FFFC F67D
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]