Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-04-12 Thread Jack Kamm
Ihor Radchenko writes: > Thanks! The logic is not ideal, but babel is not ideal in general, so > let's not worry too much about various edge cases. The patch is an > improvement over the existing state of affairs anyway. > > Feel free to push. Thanks, I've pushed to main now. Agree it's not idea

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-04-11 Thread Ihor Radchenko
Jack Kamm writes: > I'm attaching an updated patch to fix the inline async session issue > that incorporates this feedback along with some other changes. > > Rather than creating a general function in ob-core to find the previous > src or inline src block, I decided to create a private function i

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-04-05 Thread Jack Kamm
Ihor Radchenko writes: > 1. Probably better make it internal function for more flexibility in >future > 2. You need to consult `org-element-context' to make sure that we are >really at inline src block, but not inside some kind of verbatim >markup. > 3. Rather than copying regexps aro

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-03-17 Thread Jack Kamm
Ihor Radchenko writes: > Jack Kamm writes: > >> The following patch seems to fix the issue -- does something like this >> seem reasonable? >> >> ... >> +(defun org-babel-previous-src-block-or-inline () >> + "Jump to previous source block or inline block." >> + (re-search-backward (rx (or (rege

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-03-17 Thread Ihor Radchenko
Jack Kamm writes: > The following patch seems to fix the issue -- does something like this > seem reasonable? > > ... > +(defun org-babel-previous-src-block-or-inline () > + "Jump to previous source block or inline block." > + (re-search-backward (rx (or (regexp org-babel-src-block-regexp) > +

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-03-16 Thread Jack Kamm
Ihor Radchenko writes: > AFAIK, our async code does not support inline blocks. > CCing the author. > > Jack, I am not sure if it is going to be easy to support async inline > src blocks. If not, we may need to ignore :async argument in inline > blocks and display a warning. The following patch s

Re: [BUG] Org-babel inline overwriting src block outputs when using async + session

2025-03-16 Thread Ihor Radchenko
Elle Najt writes: > Hi – I’ve been running into a bug when using *inline* org babel blocks with > session and async, wherein the results of the inline org blocks overwrite > the results of the previous normal source block. This is happening for at > least python and bash. AFAIK, our async code d