Hallo,
this was quite some time ago, I was involved in this topic, but have a hard
time to remember all the details now.
After doing some research in my local git repos and on github I can say
that there were 3 editing functions (in picolisp before pil21) that were
originally implemented only for VIM User by Alex, and have been adapted to
Emacs Users by me:


   - VI -> EM : edit picolisp source code (file) in Vim (Emacs) editor
: picolisp/lib/debug.l
   at dev · picolisp/picolisp · GitHub
   <https://github.com/picolisp/picolisp/blob/dev/lib/debug.l>
   - LED -> ELED : the original Command Line Editor by Alex, adapted to
   Emacs shortcuts by me GitHub - tj64/epil: Emacs-style PicoLisp command
   line - non-modal line editing with Emacs keybindings
   <https://github.com/tj64/epil> , PicoLisp Wiki: emacsstyleled
   <https://picolisp.com/wiki/-A226.html?*Menu=+0&*Tab=+1&*ID=&*ID=$login>
   - EDIT -> EEDIT :  PicoLisp Wiki: usingedit
   <https://picolisp.com/wiki/?usingEdit>

So your question is about the EM function (both LED and EDIT are obsolete
now with pil21), in the PS is the old source code from the vi and em
functions from the debug.l library.
I don't see why (as long as you have a working picolisp environment in
Emacs) the Emacsclient calls should not work anymore, but I don't think the
obsolete (e)led.l and (e)edit.l libraries can be loaded with pil21.
But you could play around with the (em ... ) function outcommenting the
line with the libraries, and all the /src64/tags related stuff, that
doesn't exist anymore (not sure if it should be or can be replaced by
something in the pil21 sources?).

Cheers
Thorsten

PS
(de vi ("X" C)
   (_ed
      '("@lib/led.l" "@lib/edit.l")
      (call "vim"
         (pack "+set tags=" (tmp "tags") ",./tags")
         "+set isk=33-34,36-38,42-90,92,94-95,97-125"
         (pack "+" (car "*Ed"))
         (path (cdr "*Ed")) ) ) )

# Emacs interface (Thorsten Jolitz)
# Note:
#   As 'tags-table-list' is set here, do not also set `tags-file-name'
#   make sure picolisp.el is loaded and put
#   the edited .l file in picolisp mode (M-x picolisp-mode)
(de em ("X" C)
   (_ed
      '("@lib/eled.l" "@lib/eedit.l")
      (call "emacsclient"
         "-a" NIL
         "-e"
         (pack
            "(let ((tmp-tags \"" (tmp "tags") "\")"
            "(src-tags (expand-file-name \"" (path "@src64/tags")
            "\")))"
            "(setq tags-table-list "
            "(append `(,tmp-tags) `(,src-tags) tags-table-list))"
            "(mapc (lambda (F)"
            "(unless (file-exists-p (expand-file-name F))"
            "(setq tags-table-list (delete F tags-table-list))))"
            "tags-table-list)"
            "(delete-dups tags-table-list)"
            "(setq tags-table-list (delete \"\" tags-table-list))"
            "(setq tags-file-name nil)"
            " )" ) )
      (call "emacsclient"
         "-c"
         (pack "+" (car "*Ed"))
         (path (cdr "*Ed")) ) ) )


Am Di., 28. Jan. 2025 um 18:12 Uhr schrieb Jean-Christophe Helary <
picolisp@software-lab.de>:

> Is it my (macOS) system or (em) does not work ?
>
> I guess it must be a library that is not loaded at launch ?
>
> pil -em +
> !? (em)
> em -- Undefined
>
>
> --
> Jean-Christophe Helary
> https://sr.ht/~brandelune/
> @jchelary@sciences.social
>
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>
  • (em) Jean-Christophe Helary

Reply via email to