From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Adding support for limits and exclusions to iCal recurring events Date: Mon, 22 Jul 2013 13:45:54 +0200 Message-ID: <87d2qa6cnh.fsf@gmail.com> References: <87ehbaxt33.fsf@toke.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1EYg-0000Ob-Ps for emacs-orgmode@gnu.org; Mon, 22 Jul 2013 07:45:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1EYe-0006oz-Tx for emacs-orgmode@gnu.org; Mon, 22 Jul 2013 07:45:42 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:37685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1EYe-0006os-NH for emacs-orgmode@gnu.org; Mon, 22 Jul 2013 07:45:40 -0400 Received: by mail-wg0-f48.google.com with SMTP id f11so5855951wgh.27 for ; Mon, 22 Jul 2013 04:45:40 -0700 (PDT) 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") 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: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Cc: emacs-orgmode@gnu.org Hello, Toke H=C3=B8iland-J=C3=B8rgensen 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=C2=A0DATE property. What do you think? > +(defun org-icalendar-zero-convert-timestamp (timestamp &optional format) > + "Parse and format an org-formatted timestamp, zeroing the time compone= nt." > + (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, --=20 Nicolas Goaziou