Ihor Radchenko <yanta...@posteo.net> writes: >> I agree that it would be good to redesign it, but am not sure where to >> start. > > For example, > > 1. Change `org-babel-comint-async-register' to return UUID and to store > PARAMS as passed by the backend (current approach with PARAMS being > derived from src blocks prevents backends to transform src block > PARAMS dynamically). > 2. Change `org-babel-insert-result' to handle :async t specially, > inserting something reliable, like #+async: <UUID> in place of result > without performing extra transformations. > 3. Change `org-babel-insert-result' to accept an internal parameter > that will make it replace #+async: <UUID> keyword rather than perform > normal result insertion. > 4. Change `org-babel-comint-async-filter' to use the previously passed > PARAMS, remove :async t from them, and arrange the call to > `org-babel-insert-result' to replace the #+async: <UUID> keyword.
That all sounds reasonable...if you work on this, let me know if you want any help with testing.