fix bug when replacing results hashes

* lisp/ob-core.el (org-babel-set-current-result-hash): Updated the
  match-string holding the hash data, and correct overlay maintenance.
This commit is contained in:
Eric Schulte 2013-06-30 17:57:13 -06:00
parent 22b27789a9
commit 895bae8774
1 changed files with 6 additions and 3 deletions

View File

@ -1169,9 +1169,12 @@ the current subtree."
(defun org-babel-set-current-result-hash (hash)
"Set the current in-buffer hash to HASH."
(org-babel-where-is-src-block-result)
(save-excursion (goto-char (match-beginning 3))
;; (mapc #'delete-overlay (overlays-at (point)))
(replace-match hash nil nil nil 3)
(save-excursion (goto-char (match-beginning 5))
(mapc #'delete-overlay (overlays-at (point)))
(forward-char org-babel-hash-show)
(mapc #'delete-overlay (overlays-at (point)))
(replace-match hash nil nil nil 5)
(goto-char (point-at-bol))
(org-babel-hide-hash)))
(defun org-babel-hide-hash ()