From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Hellmann Subject: need help with org-mac-iCal and long-standing recurring events Date: Sat, 7 Nov 2009 12:58:27 -0500 Message-ID: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6pYZ-0007Oq-8K for emacs-orgmode@gnu.org; Sat, 07 Nov 2009 12:58:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6pYU-0007MV-JJ for emacs-orgmode@gnu.org; Sat, 07 Nov 2009 12:58:34 -0500 Received: from [199.232.76.173] (port=40388 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6pYU-0007MS-EF for emacs-orgmode@gnu.org; Sat, 07 Nov 2009 12:58:30 -0500 Received: from mail-yx0-f191.google.com ([209.85.210.191]:53159) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6pYU-00030Q-17 for emacs-orgmode@gnu.org; Sat, 07 Nov 2009 12:58:30 -0500 Received: by yxe29 with SMTP id 29so1894711yxe.14 for ; Sat, 07 Nov 2009 09:58:29 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode mailing list Cc: suckling@gmail.com I've submitted a couple of patches to org-mac-iCal recently, but this latest problem is beyond my lisp skills to fix. org-mac-iCal imports entries from iCal into the diary so they can be displayed in org-mode's agenda views. It limits the imported entries based on a date range managed org-mac-iCal-range so that the diary is not full of old items, slowing down processing. The date range filtering does not take recurring events into account, though. If the date range is set to eliminate items older than 1 month and a recurring item started 2 months ago, it is ignored. This is true even if the event has no end-date set and it would recur within the desired date range. The function in question is omi-import-ics in contrib/lisp/org-mac- iCal.el. I *think* the section I need to modify starts on line 168: (when (or (and (= yearEntry year) (or (< monthEntry (- month (/ org-mac-iCal-range 2))) (> monthEntry (+ month (/ org-mac-iCal-range 2))))) (< yearEntry (- year 1)) (> yearEntry (+ year 1)) (and (= yearEntry (- year 1)) (/= monthEntry 12)) (and (= yearEntry (+ year 1)) (/= monthEntry 1))) (delete-region startEntry endEntry)))) As a first attempt, I tried changing the filtering so that events with an RRULE property set (indicating a recurrence rule) are always imported into the diary, but somehow managed to introduce an infinite loop to the filter. So I'm looking for someone with better lisp skills who can advise me about trying to fix the problem I describe above. Any takers? Thanks, Doug