* patch to make org-mac-iCal work with calendar "groups"
@ 2009-11-02 14:24 Doug Hellmann
2009-11-03 4:39 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Doug Hellmann @ 2009-11-02 14:24 UTC (permalink / raw)
To: org-mode mailing list; +Cc: suckling
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: patch to make org-mac-iCal work with calendar "groups"
2009-11-02 14:24 patch to make org-mac-iCal work with calendar "groups" Doug Hellmann
@ 2009-11-03 4:39 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-11-03 4:39 UTC (permalink / raw)
To: Doug Hellmann; +Cc: suckling, 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-03 4:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 14:24 patch to make org-mac-iCal work with calendar "groups" Doug Hellmann
2009-11-03 4:39 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.