I tracked it down to something totally bizarre: Starting emacs GUI (I'm on
Ubuntu + Gnome) from a task bar button with the command

emacsclient -c -a ''

(that's two single quotes)

was the problem, i.e., using the emacs daemon. However, changing the task
bar button to

emacs --daemon

then running

emacs &

from an open terminal "fixed" the problem. I spent hours tearing things out
of my init diaspora, doing emacs -q, then C-x-e-ing things back in, etc. I
have absolutely no idea why starting Emacs this way would make a
difference. I'm saying this fixed the problem with `run-picolisp` inside of
picolisp-mode. But still, org-mode picolisp is touchy. For example, one of
the tutorial examples:

(let Str "The quick brown fox jumped over the lazy dog's back"
   (pack
      (mapcar '((B) (pad 2 (hex B)))
         (native "libcrypto.so" "MD5"
            '(B . 16) Str (length Str) '(NIL (16))))))

runs fine in a picolisp-mode started REPL, but not in an org-mode code
block like this:

#+BEGIN_SRC picolisp
# call the 'MD5' function from 'libcrypto.so'
(let Str "The quick brown fox jumped over the lazy dog's back"
   (pack
      (mapcar '((B) (pad 2 (hex B)))
         (native "libcrypto.so" "MD5"
            '(B . 16) Str (length Str) '(NIL (16))))))
#+END_SRC

Running the above gives:

executing Picolisp code block...
executing Picolisp source code block
Wrote /tmp/babel-26285uqi/ob-input-26285Ue1
org-babel-execute:picolisp: End of file during parsing

and no result. Also, some of the examples in this
<https://github.com/tj64/ob-picolisp> aren't working properly, but then I'm
guessing it's more org-mode's having changed (tables, variable in source
block, etc.) since this was put together. Also, doing C-c C-c on an
org-mode code block doesn't seem to start a REPL as does, say, Racket. I'm
saying with Racket, any org-mode code block you may run immediately starts
a  Racket REPL "session" wherein, e.g., a function is then known  . . . but
this is not the case when you run a picolisp code block. I know Racket runs
in conjunction with Geiser-mode. I would think picolisp babel would run in
conjunction with picolisp-mode. . . .

 Basically, I'm concerned about org-mode more than regular
picolisp-mode+REPL because Emacs is evolving into an org-mode vehicle, AFAI
can tell. New people to picolisp who use Emacs will likely be org-moders
too.

LB

On Wed, Feb 21, 2018 at 9:50 PM, Nehal <nehalsingha...@gmail.com> wrote:

> Hi Lawrence,
>
> Check:
>
> 1. If pil is running correctly in shell from inside Emacs.
> 2. If you added Picolisp in .emacs file in
>     (org-babel-do-load-languages 'org-babel-load-languages
>                                   '((picolisp . t)))
>
>
> On 2/21/18, Lawrence Bottorff <borg...@gmail.com> wrote:
> > I'm getting either
> >
> > Searching for program: No such file or directory, pil
> >
> > or
> >
> > File already exists: /home/hercynian/.pil/editor-orig
> >
> > whenever I try to do `run-picolisp` in Emacs. I've got pil correctly set
> > up:
> >
> >>which pil
> > /home/me/opt/picoLisp/pil
> >
> > and the command-line pil works fine
> >
> >>pil
> > : (version)
> > 18.2.3
> > -> (18 2 3)
> > :
> >
> > I've also spelled out to babel where pil is:
> >
> > Org Babel Picolisp Cmd: /home/me/opt/picoLisp/pil
> >
> > picolisp-mode starts up fine (using provided .el), but then it can't
> > evaluate, with similar errors above.
> >
> > L. Bottorff
> > Goshen, IN
> >
>
>
> --
> Warm Regards,
> Nehal Singhal
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to