From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: patch to make org-mac-iCal work with calendar "groups" Date: Tue, 3 Nov 2009 05:39:18 +0100 Message-ID: References: <9A9B7E30-62EC-44BA-A9F9-E7BD33E7B9B7@gmail.com> 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 1N5BBC-0003ZE-Gj for emacs-orgmode@gnu.org; Mon, 02 Nov 2009 23:39:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5BB6-0003Ux-7W for emacs-orgmode@gnu.org; Mon, 02 Nov 2009 23:39:36 -0500 Received: from [199.232.76.173] (port=60888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5BB5-0003Up-Sl for emacs-orgmode@gnu.org; Mon, 02 Nov 2009 23:39:31 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:61701) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5BB5-00089B-Gx for emacs-orgmode@gnu.org; Mon, 02 Nov 2009 23:39:31 -0500 Received: by ewy28 with SMTP id 28so3162468ewy.42 for ; Mon, 02 Nov 2009 20:39:30 -0800 (PST) In-Reply-To: <9A9B7E30-62EC-44BA-A9F9-E7BD33E7B9B7@gmail.com> 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: Doug Hellmann Cc: suckling@gmail.com, org-mode mailing list Applied, thanks. - Carsten On Nov 2, 2009, at 3:24 PM, Doug Hellmann wrote: > Some calendar systems (Google, Zimbra) handle subscriptions to > multiple calendars (or to an account) by grouping them under a > single caldav directory in the calendar tree. org-mac-iCal assumes > there is only one ics file created per caldav directory, so while it > *creates* all of the needed merged ics files, it only copies one of > them to ~/Library/Calendar before importing the contents into the > diary. > > The patch below fixes the problem. > > Doug > > > -------------------- > > diff --git a/contrib/lisp/org-mac-iCal.el b/contrib/lisp/org-mac- > iCal.el > index 015eab4..0d0b4f8 100644 > --- a/contrib/lisp/org-mac-iCal.el > +++ b/contrib/lisp/org-mac-iCal.el > @@ -96,17 +96,20 @@ the the Emacs diary" > (omi-checked x)) > all-calendars))) > > - ;; for each caledar, concatenate individual events into a single > ics file > + ;; for each calendar, concatenate individual events into a single > ics file > (with-temp-buffer > (shell-command "sw_vers" " *temp*") > (when (re-search-backward "10.5" nil t) > (omi-concat-leopard-ics all-calendars))) > > - ;; move any caldav ics files to the same place as local ics files > + ;; move all caldav ics files to the same place as local ics files > (mapc > (lambda (x) > - (when (directory-files x 1 ".*ics$") > - (rename-file (car (directory-files x 1 ".*ics$")) (concat "~/ > Library/Cal > + (mapc > + (lambda (y) > + (rename-file (concat x "/" y); > + (concat "~/Library/Calendars/" y))) > + (directory-files x nil ".*ics$"))) > caldav-folders) > > ;; check calendar has contents and import > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten