From: Nick Dokos <nicholas.dokos@hp.com>
To: SW <sabrewolfy@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Yearly repeats on the agenda
Date: Tue, 17 Apr 2012 08:22:22 -0400 [thread overview]
Message-ID: <1890.1334665342@alphaville> (raw)
In-Reply-To: Message from SW <sabrewolfy@gmail.com> of "Tue, 17 Apr 2012 10:39:21 -0000." <loom.20120417T123306-643@post.gmane.org>
SW <sabrewolfy@gmail.com> 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
next prev parent reply other threads:[~2012-04-17 12:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 20:40 Yearly repeats on the agenda SW
2012-04-16 23:24 ` Nick Dokos
2012-04-17 0:52 ` Samuel Wales
2012-04-17 7:16 ` SW
2012-04-17 7:21 ` SW
2012-04-17 7:39 ` Brian van den Broek
2012-04-17 7:44 ` Brian van den Broek
2012-04-17 12:46 ` SW
2012-04-17 13:11 ` SW
2012-04-17 14:00 ` Brian van den Broek
2012-04-17 14:28 ` Nick Dokos
2012-04-17 10:28 ` SW
2012-04-17 10:39 ` SW
2012-04-17 12:22 ` Nick Dokos [this message]
2012-04-17 12:40 ` SW
2012-04-17 13:10 ` Nick Dokos
2012-04-20 12:46 ` Bastien
2012-04-20 12:57 ` SW
2012-04-20 13:17 ` Nick Dokos
2012-04-20 23:52 ` Samuel Wales
2012-05-08 14:10 ` Bastien
2012-05-08 16:50 ` Nicolas Richard
2012-05-10 6:38 ` Bastien
2012-05-10 8:57 ` Nicolas Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1890.1334665342@alphaville \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=sabrewolfy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).