From aa57d06982c257cb093bff64e2761cbee49e7733 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 13 Jun 2008 10:39:37 +0200 Subject: [PATCH] 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! --- lisp/ChangeLog | 7 +++++++ lisp/org-exp.el | 5 +++-- lisp/org.el | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8e02cdf4..de0ebc4d0 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2008-06-13 Carsten Dominik + * 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 diff --git a/lisp/org-exp.el b/lisp/org-exp.el index a8415832f..d607f88cf 100644 --- a/lisp/org-exp.el +++ b/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-") diff --git a/lisp/org.el b/lisp/org.el index 00730d6d9..9e851b366 100644 --- a/lisp/org.el +++ b/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))