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!
This commit is contained in:
Carsten Dominik 2008-06-13 10:39:37 +02:00
parent 058b918ad6
commit aa57d06982
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,12 @@
2008-06-13 Carsten Dominik <dominik@science.uva.nl> 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 * org-remember.el (org-remember-visit-immediately): Position
cursor after moving to the note. cursor after moving to the note.
(org-remember-apply-template): Use a text property to record the (org-remember-apply-template): Use a text property to record the

View File

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

View File

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