From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug in export to iCal : one solution Date: Fri, 13 Jun 2008 10:43:05 +0200 Message-ID: <2C083E13-9A4C-484D-AFA5-DAF3FD1D6485@uva.nl> References: <873anitq3b.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v924) 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 1K74sG-0006Z5-Po for emacs-orgmode@gnu.org; Fri, 13 Jun 2008 04:43:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K74sF-0006YH-R2 for emacs-orgmode@gnu.org; Fri, 13 Jun 2008 04:43:08 -0400 Received: from [199.232.76.173] (port=41387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K74sF-0006Y2-Kd for emacs-orgmode@gnu.org; Fri, 13 Jun 2008 04:43:07 -0400 Received: from korteweg.uva.nl ([146.50.98.70]:51856) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K74sF-0003bV-2N for emacs-orgmode@gnu.org; Fri, 13 Jun 2008 04:43:07 -0400 In-Reply-To: <873anitq3b.fsf@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: Paul R Cc: emacs-orgmode@gnu.org On Jun 12, 2008, at 9:23 PM, Paul R wrote: > I finaly tracked in down, while sitting in the train. I hope I'll have > enough battery life to give explaination here, and that I'll find some > wireless spot tonight to send this report. > > Here is a simplified stack of exporting to ical : > > - org-export-icalendar-combine-agenda-files > `- org-export-icalendar > `- org-print-icalendar-entries > `- (org-diary-to-ical-string sexp-buffer) in org-exp.el:3791 > > A look at org-diary-to-ical-string shows : > ,---- > | (defun org-diary-to-ical-string (frombuf) > | "Get iCalendar entries from diary entries in buffer FROMBUF. > | This uses the icalendar.el library." > `---- > > then at the end of this function : > (kill-buffer frombuf) > > This line is incriminated. Although I have a very limited > understanding of how the export procedure works, I think it can be > replaced by something like : > (with-current-buffer frombuf (erase-buffer)) > > or, the "ical-tmp" buffer should be re-created by some mean in the > loop. > > I don't understand how it can work for some people, though ... :) Bummer, you are completely right! The problem is that `org-diary-to- ical-string' is called in the loop, the call must be outside. Also, it is not logical to have this function kill the sexp buffer, I have moved this line out of the function. Thank you very much for your persistence in tracking down a serious bug. I am glad you battery lasted long enough... :-) Fixed now. - Carsten