Browse Source

Fix bug with removing ical buffer too early.

The problem was that the function that did kill the buffer was called
inside the loop - it should really be called outside!
Carsten Dominik 17 years ago
parent
commit
aa57d06982
3 changed files with 10 additions and 3 deletions
  1. 7 0
      lisp/ChangeLog
  2. 3 2
      lisp/org-exp.el
  3. 0 1
      lisp/org.el

+ 7 - 0
lisp/ChangeLog

@@ -1,5 +1,12 @@
 2008-06-13  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org.el (org-diary-to-ical-string): No longer kill buffer
+	FROMBUF, this is now done by the caller.
+
+	* org-exp.el (org-print-icalendar-entries): Move the call to
+	`org-diary-to-ical-string' out of the loop, and kill the buffer
+	afterwords.
+
 	* org-remember.el (org-remember-visit-immediately): Position
 	cursor after moving to the note.
 	(org-remember-apply-template): Use a text property to record the

+ 3 - 2
lisp/org-exp.el

@@ -4030,8 +4030,9 @@ END:VEVENT\n"
 	    (end-of-line 1)
 	    (setq sexp (buffer-substring b (point)))
 	    (with-current-buffer sexp-buffer
-	      (insert sexp "\n"))
-	    (princ (org-diary-to-ical-string sexp-buffer)))))
+	      (insert sexp "\n"))))
+	(princ (org-diary-to-ical-string sexp-buffer))
+	(kill-buffer sexp-buffer))
       
       (when org-icalendar-include-todo
 	(setq prefix "TODO-")

+ 0 - 1
lisp/org.el

@@ -11410,7 +11410,6 @@ This uses the icalendar.el library."
 	  (setq e (match-end 0)))
       (setq rtn (if (and b e) (concat (buffer-substring b e) "\n") "")))
     (kill-buffer buf)
-    (kill-buffer frombuf)
     (delete-file tmpfile)
     rtn))