emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ob-async
@ 2017-02-16 15:54 Ken Mankoff
  2017-02-20 20:14 ` ob-async Alex Bennée
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Mankoff @ 2017-02-16 15:54 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

An RSS feed I follow mentioned ob-async here:
https://github.com/astahlman/ob-async

I haven't seen it mentioned on the list yet. Perhaps others would be
interested in asynchronous Babel processing. I've seen the feature
requested often on this list.

  -k.

[-- Attachment #2: Type: text/html, Size: 393 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ob-async
  2017-02-16 15:54 ob-async Ken Mankoff
@ 2017-02-20 20:14 ` Alex Bennée
  2017-02-26 15:46   ` ob-async Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bennée @ 2017-02-20 20:14 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: andrew.stahlman, Org-mode, John Kitchin


Ken Mankoff <mankoff@gmail.com> writes:

> An RSS feed I follow mentioned ob-async here:
> https://github.com/astahlman/ob-async
>
> I haven't seen it mentioned on the list yet. Perhaps others would be
> interested in asynchronous Babel processing. I've seen the feature
> requested often on this list.

This is not the first attempt to my knowledge. I know of:

  - my hacky attempt https://github.com/stsquad/async-org-babel
  - John Kitchen's python specific version http://kitchingroup.cheme.cmu.edu/blog/2015/11/20/Asynchronously-running-python-blocks-in-org-mode/
  - this matlab version http://emacs.stackexchange.com/questions/21301/async-execution-in-org-babel

So I think there have been enough proof of concepts of using async.el
and inserting results at a later date. I think what would be really
useful is some feedback from the org-mode maintainers about the various
approaches and if something generic could be included with org-mode
itself.

Any thoughts?

--
Alex Bennée

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ob-async
  2017-02-20 20:14 ` ob-async Alex Bennée
@ 2017-02-26 15:46   ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2017-02-26 15:46 UTC (permalink / raw)
  To: Alex Bennée; +Cc: Org-mode, John Kitchin, Ken Mankoff, andrew.stahlman

Hello,

Alex Bennée <alex.bennee@linaro.org> writes:

> Ken Mankoff <mankoff@gmail.com> writes:
>
>> An RSS feed I follow mentioned ob-async here:
>> https://github.com/astahlman/ob-async
>>
>> I haven't seen it mentioned on the list yet. Perhaps others would be
>> interested in asynchronous Babel processing. I've seen the feature
>> requested often on this list.
>
> This is not the first attempt to my knowledge. I know of:
>
>   - my hacky attempt https://github.com/stsquad/async-org-babel
>   - John Kitchen's python specific version http://kitchingroup.cheme.cmu.edu/blog/2015/11/20/Asynchronously-running-python-blocks-in-org-mode/
>   - this matlab version http://emacs.stackexchange.com/questions/21301/async-execution-in-org-babel
>
> So I think there have been enough proof of concepts of using async.el
> and inserting results at a later date. I think what would be really
> useful is some feedback from the org-mode maintainers about the various
> approaches and if something generic could be included with org-mode
> itself.
>
> Any thoughts?

I never used any of these, so please take this with a grain of salt.

AFAIU, these solutions are too limited at the moment. They suffer from
the same problem as current ":cache" parameter, i.e., they seem unable
to cope with blocks that refer and execute other blocks. 

IMO, for anything serious, we need to implement something that is able
to capture the "closure" of a block. In this case, all blocks belonging
to that closure would be marked as read-only during the process, so as
to avoid race conditions. We also need to be able to retrieve all the
results from all the blocks involved.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ob-async
@ 2023-03-20 13:28 Roger Mason
  2023-03-20 13:49 ` ob-async Roger Mason
  0 siblings, 1 reply; 5+ messages in thread
From: Roger Mason @ 2023-03-20 13:28 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I installed ob-async from MELPA.  It does not seem to work.  For example
the following simple source block is run synchronously, i.e., emacs
shows the cursor as a watch and it is not possible to move point, or to
type, until the source block completes.

#+begin_src ruby :tangle test.rb
sleep 30
puts "Hello World"
#+end_src

#+begin_src sh :results output :async
ruby test.rb
#+end_src

#+RESULTS:
: Hello World


Is ob-async known to be broken?  I'm using

GNU Emacs 27.2 (build 1, amd64-portbld-freebsd12.2, X toolkit, cairo version 1.17.4, Xaw3d scroll bars)
Org mode version 9.5.4 (release_9.5.4-602-g381a2a.dirty @ /home/rmason/.emacs.d/org-git/lisp/)

Thanks for any help.
Roger


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ob-async
  2023-03-20 13:28 ob-async Roger Mason
@ 2023-03-20 13:49 ` Roger Mason
  0 siblings, 0 replies; 5+ messages in thread
From: Roger Mason @ 2023-03-20 13:49 UTC (permalink / raw)
  To: emacs-orgmode

Hello again,

Roger Mason <rmason@mun.ca> writes:


...snip...

> Is ob-async known to be broken?

No.  The user is broken.

It seems ob-async must be required in the file in which it is to be used
(I had it in my init file).  I ran into a further problem that is
resolved using:

(defun no-hide-overlays (orig-fun &rest args)
(setq org-babel-hide-result-overlays nil))
(advice-add 'ob-async-org-babel-execute-src-block :before
#'no-hide-overlays)

See:
https://www.reddit.com/r/emacs/comments/v2p4q9/orgbabel_problems_with_obasync/

Sorry for the noise.
Roger


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-20 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20 13:28 ob-async Roger Mason
2023-03-20 13:49 ` ob-async Roger Mason
  -- strict thread matches above, loose matches on Subject: below --
2017-02-16 15:54 ob-async Ken Mankoff
2017-02-20 20:14 ` ob-async Alex Bennée
2017-02-26 15:46   ` ob-async Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).