From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Yearly repeats on the agenda Date: Tue, 17 Apr 2012 08:22:22 -0400 Message-ID: <1890.1334665342@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK7Wx-00076l-G8 for emacs-orgmode@gnu.org; Tue, 17 Apr 2012 08:29:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SK7Wm-0006ua-Sh for emacs-orgmode@gnu.org; Tue, 17 Apr 2012 08:29:11 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:44915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK7Wm-0006tS-ML for emacs-orgmode@gnu.org; Tue, 17 Apr 2012 08:29:00 -0400 In-Reply-To: Message from SW of "Tue, 17 Apr 2012 10:39:21 -0000." 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: SW Cc: emacs-orgmode@gnu.org SW wrote: > SW 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