Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
kill org-gcal-token buffer
  • Loading branch information
myuhe committed Mar 29, 2015
1 parent 9e07ab3 commit 4cae0e2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions org-gcal.el
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,22 @@
(plist-get (read (buffer-string)) (intern (concat ":" (car x))))))))))
do
(goto-char pos)
(org-gcal-post-at-point t)))
(org-gcal-post-at-point t)
finally
(kill-buffer buf))
(sit-for 2)
(org-gcal-sync nil t t))
(org-gcal-sync nil t t)))
(erase-buffer)
(insert
(mapconcat 'identity
(mapcar (lambda (lst)
(org-gcal--cons-list lst))
(plist-get (request-response-data response) :items )) ""))
(let ((plst (with-temp-buffer (insert-file-contents org-gcal-token-file)
(read (buffer-string)))))
(with-temp-file org-gcal-token-file (pp (plist-put plst (intern (concat ":" (car x))) (mapcar (lambda (lst)
(cons (plist-get lst :id) (org-gcal--cons-list lst)))
(plist-get (request-response-data response) :items ))) (current-buffer))))
(org-set-startup-visibility)
(save-buffer))
(unless silent
Expand Down

0 comments on commit 4cae0e2

Please sign in to comment.