emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ivar Fredholm <freddyholms@protonmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	"bzg@bzg.fr" <bzg@bzg.fr>
Subject: Re: We have asynchronous sessions, why have anything else?
Date: Sun, 26 Jun 2022 19:20:17 +0000	[thread overview]
Message-ID: <KLu9RNZSihPI-NbDHYIxodYH_XQV4STmIpi8l6-wYG-9j9oQ2ZpGejdXrOxMVWFk2QzqcXBGmTwHDF3xIFFUzn1ZG77E2OoWULJKxAK_z8w=@protonmail.com> (raw)
In-Reply-To: <87fsjs3xws.fsf@localhost>

Hi, Ihor,
I believe the two could be unified if we expand the functionality of the async filter to look for 'exception' tags. Then each language implementation must only put the org-babel src block in a try-except type construction and put the error message into the except block. The async filter will then find the error information and report it back to the org-buffer. We could then emulate the synchronous session functionality by adding a filter to the async-filter which blocks until an 'end' or 'exception' tag is detected. This way, all four combinations of session/session-less and synchronous/asynchronous header arguments could be handled by the asynchronous code alone.
Best, Guacho




Sent with Proton Mail secure email.

------- Original Message -------
On Saturday, June 25th, 2022 at 10:28 PM, Ihor Radchenko <yantar92@gmail.com> wrote:


> Ivar Fredholm freddyholms@protonmail.com writes:
>
> > A session-less block can be executed by starting a session with a special name (say "*none") which always gets killed after block execution is completed. For interpreter-less languages, we could use the shell as an interpreter (for instance, if we wanted to execute C, we could just start a shell, and send it the gcc command to compile and execute). Would this not cut down the amount of code that needs to be maintained and uniformize the existing code?
>
>
> Feel free to compare ob-eval.el and ob-comint.el. Their functionality is
> not equivalent. In particular ob-eval.el has a better handling of
> errors.
>
> If you find a way to unify the two without loosing the functionality, it
> will be welcome.
>
> Best,
> Ihor


  reply	other threads:[~2022-06-26 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  3:15 We have asynchronous sessions, why have anything else? Ivar Fredholm
2022-06-26  3:29 ` Ihor Radchenko
2022-06-26 19:20   ` Ivar Fredholm [this message]
2022-06-27  9:57     ` Ihor Radchenko
2022-06-27 22:04       ` Tom Gillespie
2022-06-28  0:41         ` Tim Cross
2022-06-28  1:15           ` John Kitchin
2022-07-06  1:41       ` Ivar Fredholm
2022-07-07 11:17         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='KLu9RNZSihPI-NbDHYIxodYH_XQV4STmIpi8l6-wYG-9j9oQ2ZpGejdXrOxMVWFk2QzqcXBGmTwHDF3xIFFUzn1ZG77E2OoWULJKxAK_z8w=@protonmail.com' \
    --to=freddyholms@protonmail.com \
    --cc=bzg@bzg.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).