Re: [PATCH v3] Re: [FR] Automatically display images in resutls of evaluation

2025-01-12 Thread Ihor Radchenko
Ihor Radchenko writes: > We need to come up with same safe way to only display inline images in > the results when those images are actually updated interactively. > We might even need a new kind of hook that is given more contextual info > about code evaluation. Any ideas? This patch seems stuc

Re: [PATCH v3] Re: [FR] Automatically display images in resutls of evaluation

2024-09-15 Thread Ihor Radchenko
stardiviner writes: > I updated the patch. Thanks! > + > +(add-hook 'org-babel-after-execute-hook 'org-toggle-inline-image-in-results) Please note that `org-babel-after-execute-hook' is not necessarily evaluated with point at the src block being executed. > +(defun org-toggle-inline-image-in-

Re: [FR] Automatically display images in resutls of evaluation

2024-08-22 Thread Ihor Radchenko
[ Adding Org ML back to CC ] "Christopher M. Miles" writes: >> A simple `org-display-inline-images' would do (with REFRESH argument). > > I will adjust my upper code snippet in my Emacs config. I myself have something similar in my config: (add-hook 'org-babel-after-execute-hook (lambda ()

[FR] Automatically display images in resutls of evaluation (was: [PATCH v4.0] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer)

2024-08-18 Thread Ihor Radchenko
stardiviner writes: > I have an idea, would you like to add an function in bellowing: > > #+begin_src emacs-lisp > (defun org-toggle-inline-images-in-results () > "Toggle inline images in babel source block results." > (save-excursion > ;; [C-c C-v C-o] `org-babel-open-src-block-result' >