babel: don't prematurely remove existing results when not caching
* lisp/ob.el (org-babel-where-is-src-block-result): be sure not to remove existing results when the there is no cache header arg
This commit is contained in:
parent
e8033b7f04
commit
9271692869
13
lisp/ob.el
13
lisp/ob.el
|
@ -1013,12 +1013,13 @@ following the source block."
|
|||
(concat org-babel-result-regexp "\n")))
|
||||
(prog1 (point)
|
||||
;; must remove and rebuild if hash!=old-hash
|
||||
(unless (or (not hash)
|
||||
(string= hash (match-string 3)))
|
||||
(forward-line 1)
|
||||
(delete-region
|
||||
end (org-babel-result-end)) nil))))))))
|
||||
(if insert
|
||||
(if (and hash (not (string= hash (match-string 3))))
|
||||
(prog1 nil
|
||||
(forward-line 1)
|
||||
(delete-region
|
||||
end (org-babel-result-end)))
|
||||
(setq end nil)))))))))
|
||||
(if (and insert end)
|
||||
(progn
|
||||
(goto-char end)
|
||||
(unless beg
|
||||
|
|
Loading…
Reference in New Issue