emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] In case of Sly, let org-babel-execute:lisp use Slynk instead of


From: gerard . vermeulen
Subject: [PATCH] In case of Sly, let org-babel-execute:lisp use Slynk instead of Swank
Date: Wed, 29 Mar 2023 08:11:48 +0000

Hello,

The Emacs integrated development environments Slime and Sly
communicate by means of similar RPC protocols with different server
programs: Swank in case of Slime and Slynk in case of Sly.  However,
the code in org-babel-execute:lisp always expects to talk with Swank
because of the hard-coded call to swank:eval-and-grab-output.

After starting a Sly REPL, calls to swank:eval-and-grab-output do not
talk with the Slynk server started by the Sly REPL.

The attached patch "soft-codes" eval-and-grab-output to become
swank:eval-and-grab-output when using Slime and
slynk:eval-and-grab-output when using Sly.

For more info: steps to test the patch are:
1. Open a Sly REPL with M-x sly
2. Look in the *sly-events for <LISP>* (<LISP> is sbcl in my case) for
   slynk: prefixes
3. Type C-c C-c on the test block below
4. Look for an addition in *sly-events for <LISP>* looking like
   (slynk:eval-and-grab-output "(let ((...)) (+ 1 1)\n)")

#+name: test-ob-lisp-with-sly
#+begin_src lisp -n :output results
(+ 1 1)
#+end_src

#+RESULTS: test-ob-lisp-with-sly
: 2

Best regards -- Gerard

Attachment: 0001-lisp-ob-lisp-fix-org-babel-execute-lisp-for-use-with.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]