babel: erase previous contents of preview buffer

This commit is contained in:
Dan Davison 2010-04-20 12:17:48 -04:00 committed by Eric Schulte
parent 8872454566
commit 7decdec3b2
1 changed files with 1 additions and 0 deletions

View File

@ -281,6 +281,7 @@ arguments, and pop open the results in a preview buffer."
(expanded (funcall cmd body params))
(buf (get-buffer-create "*Org-Babel Code Body Preview*")))
(with-current-buffer buf
(erase-buffer)
(insert expanded)
(funcall (intern (concat lang "-mode"))))
(pop-to-buffer buf)))