From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tim O'Callaghan" Subject: Re: Re: iCal Import - updated code & Bug report Date: Wed, 20 Jun 2007 12:48:13 +0200 Message-ID: <3d6808890706200348scb35fdexc39dc5407086a5c9@mail.gmail.com> References: <3d6808890706191552n30e3bc2er7c5701f0f38559ac@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I0xjY-0005tx-9V for emacs-orgmode@gnu.org; Wed, 20 Jun 2007 06:48:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I0xjW-0005tR-Oa for emacs-orgmode@gnu.org; Wed, 20 Jun 2007 06:48:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0xjW-0005tO-IY for emacs-orgmode@gnu.org; Wed, 20 Jun 2007 06:48:18 -0400 Received: from wr-out-0506.google.com ([64.233.184.239]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I0xjW-00041i-5Z for emacs-orgmode@gnu.org; Wed, 20 Jun 2007 06:48:18 -0400 Received: by wr-out-0506.google.com with SMTP id 68so137452wri for ; Wed, 20 Jun 2007 03:48:17 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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: Carsten Dominik Cc: emacs-orgmode Its not a google calendar based bug. It happens when the referenced org file has no headings. If you add a file with a %% diary entry and no '* heading' to your agenda file list, it should crop up when you try to look into diary entry file from agenda. On the google calendar side, you select 'calendar settings' from the drop down menu beside the calendar, or select the calendar from the manage calendar page. On the resulting page you should see 'public' and 'private' ical icons. Select the private one and a url will pop up in a window. That is the url value to use in the 'google-ical-org-list'. You can also use public iCal links. I have added below some public calendars that i use, that you might also find useful, and that also generate this bug. (setq google-ical-org-list '( ("http://upcoming.yahoo.com/calendar/v2/place/upI5ACueA5szd_8-" "~/CalendarSync/UpComing.ics" "~/CalendarSync/Upcoming.org") ("http://www.kagankalender.com/calendarics.php" "~/CalendarSync/GothInd.ics" "~/CalendarSync/GothInd.org") )) Hope it helps, Tim. On 20/06/07, Carsten Dominik wrote: > I am trying to find this bug and have made a google agenda. > How do I know which url to use to download it? Can you guide me > through this? > > Thanks. > > - Carsten > On Jun 20, 2007, at 0:52, Tim O'Callaghan wrote: > > > Another Xemacs bug i think, If the org file does not contain a line > > with a headline, such as those generated by the code. It causes the > > error: > > "(1) (error/warning) Error in `post-command-hook' (setting hook to > > nil): (wrong-type-argument integer-or-marker-p nil)" > > > > The previous code assumes the ical export worked, below fixes that. > > > > Tim. > > ---- code ---- > > (defun toc:goggle-to-org () > > "get a google calendar and convert it into org dates" > > (interactive) > > (with-temp-buffer > > (let* ((glist google-ical-org-list)) > > ;; iterate through list > > (while (setq entry (pop glist)) > > (setq google-ical-url (car entry) local-ical-file (nth 1 > > entry) local-date-file (nth 2 entry)) > > ;; Delete the diary local files > > (if (file-exists-p local-ical-file) (delete-file > > local-ical-file)) > > (if (file-exists-p local-date-file) (delete-file > > local-date-file)) > > ;; Get ical file > > (w3-download-url google-ical-url (expand-file-name > > local-ical-file)) > > ;; convert to diary without leading & > > (icalendar-import-file local-ical-file local-date-file t) > > ;; iCalendar leaves the buffers open > > (if (find-buffer-visiting local-date-file) (kill-buffer > > (find-buffer-visiting local-date-file))) > > (if (find-buffer-visiting local-ical-file) (kill-buffer > > (find-buffer-visiting local-ical-file))) > > )))) > > --- code --- > > > > > > _______________________________________________ > > Emacs-orgmode mailing list > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > > > > -- > Carsten Dominik > Sterrenkundig Instituut "Anton Pannekoek" > Universiteit van Amsterdam > Kruislaan 403 > NL-1098SJ Amsterdam > phone: +31 20 525 7477 > >