. . . yes, sessions
make perfect sense, but I thought sessions was an advanced feature for only
some of the "elite" languages, i.e., so many of the babel languages don't
support sessions. Still, I should have known to try. . .
Now, why would trying to run picolisp (org-mode or picolisp-mode) from an
Emacs started with emacsclient -c -a '' from my Gnome taskbar not work? It
gives the error in my Messages:
executing Picolisp code block...
executing Picolisp source code block
(New file)
Wrote /home/hercynian/.pil/editor
apply: Searching for program: No such file or directory, pil
and it writes `editor-orig` to ~/.pil, which I must then rm. I can only get
a REPL when I start Emacs from my command line, i.e.,
>emacs &
LB
On Sat, Mar 3, 2018 at 9:40 AM, Thorsten Jolitz wrote:
> Lawrence Bottorff
> writes:
>
> Hi Lawrence,
> [just for the protocoll, I send you the identical answer on the
> org-mode mailing list already].
>
> > 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
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>