Skip to content

Commit f230a7c

Browse files
dvzubarevGreg Sexton
authored andcommitted
Place result properly when calling a named code block via #+CALL
Also this fix covers inline calls (call_*) and inline code blocks (src_*).
1 parent c93d263 commit f230a7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ob-ipython.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Make sure your src block has a :session param.")
613613
(with-current-buffer buffer
614614
(goto-char (point-min))
615615
(re-search-forward sentinel)
616-
(org-babel-previous-src-block)
616+
(re-search-backward "\\(call\\|src\\)_\\|^[ \t]*#\\+\\(BEGIN_SRC\\|CALL:\\)")
617617
(org-babel-remove-result)
618618
(org-babel-insert-result
619619
replacement

0 commit comments

Comments
 (0)