[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Yearly repeats on the agenda
From: |
Nick Dokos |
Subject: |
Re: [O] Yearly repeats on the agenda |
Date: |
Tue, 17 Apr 2012 08:22:22 -0400 |
SW <address@hidden> wrote:
> SW <sabrewolfy <at> gmail.com> writes:
>
> > This
> >
> > *** New Year's Day
> > <2011-01-01 +1y>
> >
> > does *not* include the timestamp in the agenda, yes.
> >
> > However, timestamps are *not* included in the agenda from other entries
> > which
> > *do* have timestamps in the headline.
> >
> > I've tested with repeating timestamps, timestamps with times, timestamps
> > repeating with last year as the start date, and I cannot replicate this.
> > I'll
> > post if I find anything further.
>
> I've tracked down what causes this behaviour -- it's actually a repeating
> timestamp which is from a year ore more ago (contrary to what I posted above).
>
> This:
>
> ** <2011-04-17 +1y> Test :holiday:
>
> or this:
>
> ** <2010-04-17 +1y> Test :holiday:
>
> appears in the agenda *with* the <> timestamp included. This:
>
> ** <2012-04-17 +1y> Test :holiday:
>
> does *not* appear with the <> timestamp included. The difference is the
> *starting* year.
>
Indeed - I can reproduce that. It happens in org-agenda-get-timestamps,
in the call to org-agenda-format-item: this function takes a regexp
argument, remove-re, and removes any matches from the string it
produces. The regexp is constructed from the *current* date though:
(concat
(regexp-quote
(format-time-string
"<%Y-%m-%d"
(encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
".*?>")
so it becomes "<2012-04-17.*?>". Hence it removes the date in the third
example above, but not in the other two.
The question is whether this is intended or not: personally, I don't see
any reason for the difference in behavior, so it might be a good idea to
generalize the regexp to match *any* year.
Nick
- Re: [O] Yearly repeats on the agenda, (continued)
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Brian van den Broek, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Brian van den Broek, 2012/04/17
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Brian van den Broek, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Nick Dokos, 2012/04/17
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda,
Nick Dokos <=
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Nick Dokos, 2012/04/17
- Re: [O] Yearly repeats on the agenda, Bastien, 2012/04/20
- Re: [O] Yearly repeats on the agenda, SW, 2012/04/20
- Re: [O] Yearly repeats on the agenda, Nick Dokos, 2012/04/20
- Re: [O] Yearly repeats on the agenda, Samuel Wales, 2012/04/20