fix(org): bounds for inline images in babel results
org-babel-result-end can return the wrong position if cursor is in a src
block (which is where it will be when org-babel-after-execute-hook
triggers).
Amend: 451be94fb8
This commit is contained in:
parent
2c06577edf
commit
9dbdb854b9
1 changed files with 4 additions and 3 deletions
|
@ -314,8 +314,9 @@ Also adds support for a `:sync' parameter to override `:async'."
|
|||
;; ...and not while tangling org buffers (which happens in a temp
|
||||
;; buffer where `buffer-file-name' is nil).
|
||||
(string-match-p "^ \\*temp" (buffer-name)))
|
||||
(save-excursion
|
||||
(when-let ((beg (org-babel-where-is-src-block-result))
|
||||
(end (org-babel-result-end)))
|
||||
(end (progn (goto-char beg) (forward-line) (org-babel-result-end)))))
|
||||
(org-display-inline-images nil nil (min beg end) (max beg end))))))
|
||||
|
||||
(after! python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue