From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: Port ob-lisp.el to use SLY as an option to evaluate. Date: Tue, 19 Jan 2016 18:44:15 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113adc00c860540529ad8eeb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLTmJ-0001R0-Eo for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 05:44:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLTmI-0001Nb-0E for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 05:44:47 -0500 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:36749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLTmH-0001NP-QD for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 05:44:45 -0500 Received: by mail-oi0-x229.google.com with SMTP id o124so181556908oia.3 for ; Tue, 19 Jan 2016 02:44:45 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode --001a113adc00c860540529ad8eeb Content-Type: text/plain; charset=UTF-8 I found ob-lisp.el use SLIME by default to evaluate lisp code. I want to use SLY to evaluate lisp code. How to change it? I found the file ob-lisp.el is short. I tried to change slime to sly. But it is not customizable. I hope to define a defcustom for it. So that user can customize it. But I don't know how to apply this into code. For example, I define a custom like this: ``` (defcustom org-babel-lisp-default-implement "slime") ((defcustom org-babel-lisp-implements '("slime" "sly") "A list of Lisp implements." :group 'org-babel :version "24.1" ;; FIXME: reference code example. :type listp)) ``` Then in file ob-lisp.el. Has some places use slime. I want to make them adapt to upper defcustom value. like concate string from value or something else. ``` (declare-function slime-eval "ext:slime" (sexp &optional package)) (defun org-babel-execute:lisp (body params) "Execute a block of Common Lisp code with Babel." (require 'slime) (org-babel-reassemble-table (let ((result (funcall (if (member "output" (cdr (assoc :result-params params))) #'car #'cadr) (with-temp-buffer (insert (org-babel-expand-body:lisp body params)) (slime-eval `(swank:eval-and-grab-output.... ``` [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ --001a113adc00c860540529ad8eeb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I found ob-lisp.el use SLIME by default to ev= aluate lisp code. I want to use SLY to evaluate lisp code. How to change it? I found the file ob-lisp.el is short. I tried to change = slime to sly.

But it is not customizable. I hope= to define a defcustom for it. So that user can customize it. But I don't know how to apply this into code. For example, I define a custom like this:

```
(defcustom org-babel=
-lisp-default-implement "slime")

((defcustom org-babel-lisp-=
implements
   '("slime" &qu=
ot;sly")
   "A list of Lisp implements."
   :group 'org-babel
   :version "24.1"
   ;; FIXME: reference code example.
   :type listp))
```


Then i= n file ob-lisp.el. Has some places use slime. I w= ant to make them adapt to upper defcustom value. like concate = string from value or something else.

```
(declare-function slime-eval "ext:slime" (sexp &optional package)) (defun org-babel-execute:lisp = (body params) "Execute a block of Common Lisp code with Ba= bel." (require 'slime)<= span class=3D""> (org-babel-reassemble-tab= le (let ((result (funcall <= span class=3D"">(if = (member &q= uot;output" (cdr (= assoc :res= ult-params params))) #= 9;car #'cadr) (with-te= mp-buffer (inser= t (org-babel-expand-body:lisp body params)) (slime= -eval `(swank:eval-and-grab-o= utput ....
```


[stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key= ID: 47C32433
IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Twitter:=C2=A0 @numbchild
Key fingerprint =3D 9BAA 92BC CDDD B= 9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
--001a113adc00c860540529ad8eeb--