org-babel-execute-src-block: Fix with :cache yes :results append/prepend

* lisp/ob-core.el (org-babel-execute-src-block): Do not remove
previous result when :cache is yes, but :results requests
appending/prepending the new result.
This commit is contained in:
Ihor Radchenko 2023-07-28 12:11:31 +03:00
parent 410cecc0e7
commit de9f89e4be
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 5 additions and 1 deletions

View File

@ -894,7 +894,11 @@ guess will be made."
(setq result-params (remove "file" result-params))))))
(unless (member "none" result-params)
(org-babel-insert-result
result result-params info new-hash lang
result result-params info
;; append/prepend cannot handle hash as we accumulate
;; multiple outputs together.
(when (member "replace" result-params) new-hash)
lang
(time-subtract (current-time) exec-start-time))))
(run-hooks 'org-babel-after-execute-hook)
result)))))))