From: Nicolas Goaziou <n.goaziou@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: emacs-orgmode@gnu.org
Subject: Re: Adding support for limits and exclusions to iCal recurring events
Date: Mon, 22 Jul 2013 13:45:54 +0200 [thread overview]
Message-ID: <87d2qa6cnh.fsf@gmail.com> (raw)
In-Reply-To: <87ehbaxt33.fsf@toke.dk> ("Toke \=\?utf-8\?Q\?H\=C3\=B8iland-J\?\= \=\?utf-8\?Q\?\=C3\=B8rgensen\=22's\?\= message of "Sun, 07 Jul 2013 17:55:44 +0200")
Hello,
Toke Høiland-Jørgensen <toke@toke.dk> writes:
> I've been wanting to have support for exporting recurring events to iCal
> while limiting the number of repetitions, as well as excluding dates.
> The patch below is my attempt to add this functionality. However, I'm in
> doubt as to whether or not this is the right way to go about it (parsing
> dates stored in the property drawer), or if there's a better way?
>
> A sample headline supporting this might look like this:
>
> * Test
> :PROPERTIES:
> :END_DATE: [2013-07-21 Sun]
> :EXCLUDE: [2013-07-14 Sun]
> :ID: b376f8e3-f1a7-4ed6-ab9b-a255938af8c0
> :END:
> <2013-07-07 Sun +1w>
>
>
> If this is a reasonable way to go about it, I'll be happy to resubmit it
> as a proper patch (i.e. from `git format-patch`) for inclusion. :)
Thanks for your patch.
I think EXCLUDE property is a good idea, but I may be renamed to
ICALENDAR_EXCLUDE until it is also handled by Org Agenda, if it ever
happens. It also needs to be documented in the manual.
On the other hand, I'm not sure about the END_DATE property. Couldn't
DEADLINE be used for that matter? For example, `repeater-end-date' could
be added to `org-icalendar-use-deadline' possible values. When this
symbol belongs to variable's value and current entry has a deadline, any
timestamps with a repeater get deadline's value as its END DATE
property.
What do you think?
> +(defun org-icalendar-zero-convert-timestamp (timestamp &optional format)
> + "Parse and format an org-formatted timestamp, zeroing the time component."
> + (let ((time (org-parse-time-string timestamp))
> + (fmt (or format "%Y%m%dT%H%M%SZ")))
> + (format-time-string fmt (encode-time 0 0 0 (nth 3 time) (nth 4 time) (nth 5 time)))))
Can't `org-icalendar-convert-timestamp' be used instead?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-07-22 11:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 15:55 Adding support for limits and exclusions to iCal recurring events Toke Høiland-Jørgensen
2013-07-22 11:45 ` Nicolas Goaziou [this message]
2013-07-22 14:56 ` Toke Høiland-Jørgensen
2013-07-24 8:38 ` Nicolas Goaziou
2013-07-24 16:01 ` Michael Brand
2013-07-24 17:25 ` Toke Høiland-Jørgensen
2013-07-27 21:11 ` Nicolas Goaziou
2013-07-27 22:16 ` Toke Høiland-Jørgensen
2013-07-24 18:23 ` David Rogers
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=87d2qa6cnh.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=toke@toke.dk \
/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).