From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Exploring picolisp Date: Sat, 03 Mar 2018 15:34:17 +0100 Message-ID: <87vaed9qja.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1es8F6-0004LC-0O for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 09:34:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1es8F2-00033W-RU for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 09:34:32 -0500 Received: from [195.159.176.226] (port=58934 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1es8F2-00032o-Jv for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 09:34:28 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1es8Cv-0007RG-Ff for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 15:32:17 +0100 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" To: emacs-orgmode@gnu.org Lawrence Bottorff writes: Hi Lawrence, > I'm looking at picolisp -- and wondering how it works, or better, why it > doesn't really work work with babel. First problem, I couldn't get any > form of picolisp to work in Emacs -- until I stopped starting Emacs with > [...] > I don't mean to complain or sound negative, but picolisp as is can't > really be included as a babel language, can it? Maybe it worked once, > but doesn't now? sometimes the bug actually sits in front of the computer, as we all know ;-) Apparently you are not aware of the 'session' concept of org source blocks (please refer to the org manual). This is nothing specific to ob-picolisp, but holds for all ob languages that do allow for sessions: ,---- | * Picolisp scr-block test | | #+BEGIN_SRC picolisp :session pil1 | (setq X1 (+ 3 4)) | #+END_SRC | | #+results: | : 7 | | | #+BEGIN_SRC picolisp :session pil1 | (setq X2 (+ X1 1)) | #+END_SRC | | #+results: | : 8 | | | #+BEGIN_SRC picolisp :session pil1 | (de foo1 (X) (+ X 2)) | #+END_SRC | | #+results: | : foo1 | | #+BEGIN_SRC picolisp :session pil1 :results raw | (setq X3 (foo1 8)) | #+END_SRC | | #+results: | 10 `---- And, with a session, you do have a related interactive repl buffer in Emacs called "pil1", thats reflects all evaluations of the code blocks in the org file, and allows for user input just like the PicoLisp repl: ,---- | (setq X1 (+ 3 4)) | 'org-babel-picolisp-eoe | : -> 7 | : -> org-babel-picolisp-eoe | : (setq X2 (+ X1 1)) | 'org-babel-picolisp-eoe | -> 8 | : -> org-babel-picolisp-eoe | : (de foo1 (X) (+ X 2)) | 'org-babel-picolisp-eoe | -> foo1 | : -> org-babel-picolisp-eoe | : (setq X3 (foo1 8)) | 'org-babel-picolisp-eoe | -> 10 | : -> org-babel-picolisp-eoe | : `---- Hope that helps -- cheers, Thorsten