Lisp HUG Maillist Archive

LispWorks emacsclient?

Unable to parse email body. Email id is 11449

Re: LispWorks emacsclient?

Hello Nick,

Am 02.02.2012 um 23:03 schrieb Nick Barnes:

> 
> Has anyone built (and shared) anything like emacsclient and M-x
> server-start for LispWorks?  That is, a small program which looks like
> an editor to the outside world, but which actually pops the file up in
> an editor of a running LispWorks, with a gesture (emacs uses M-x #) to
> exit the client program (so that the program invoking it as an editor
> knows it is done).
> 
> This would be handy for building some automation links to third-party
> development tools (such as an SCM system).
> 
> LispWorks support say that no such system ships with LispWorks.  I'd
> like it on Windows.

Thats perhaps not of much help to you, but on Mac OS X there is the "ODB Editor Protocol" which enables Editors to get integrated into other programs speaking that protocol (e. g. Xcode).

http://www.barebones.com/support/develop/odbsuite.html

ciao,
Jochen

Re: LispWorks emacsclient?

Nick Barnes wrote on Thu, 02 Feb 2012 22:03:47 +0000 02:03:

| Has anyone built (and shared) anything like emacsclient and M-x
| server-start for LispWorks?  That is, a small program which looks like
| an editor to the outside world, but which actually pops the file up in
| an editor of a running LispWorks, with a gesture (emacs uses M-x #) to
| exit the client program (so that the program invoking it as an editor
| knows it is done).

I would recommend one of the two possibilities.

1. As you want two different applications running in parallel and you are on
Windows, you can use DDE API. Please take a look at
examples/dde/lispwork-ide.lisp.

2. You could embed the LispWorks Editor just into your small program.
Edi Weitz's editor.lisp is a good starting point. As an example of such a
small application, please take a look at
http://lisp.ystok.ru/ru/yhelp/
This is an open source HTML help compiler, with a "help book" definition
based on ASDF syntax. (Unfortunately, only the Russian version is available
at moment.)
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: LispWorks emacsclient?

On 2 Feb 2012, at 22:03, Nick Barnes wrote:

> as anyone built (and shared) anything like emacsclient and M-x
> server-start for LispWorks?

I had something which did this among other things: it was called "clc" - common lisp client unofficially - and there was a little client (actually a delivered LW image) which could send arbitrary commands to a server.  On the server side (the server being typically just the IDE) you could write handlers for commands.  So it worked like one of the "wrapper command [args]"-style interfaces which are quite common now (svn, p4 and so on are all like this among many others).  So, for instance "clc edit /path/to/file".  It ran anywhere LW did.  I don't remember if there was an edit-a-file command in it, but it would not be hard to implement one (and I think there probably was).

The reason it probably is not interesting is that it used CORBA, so required LW enterprise.

I am intending to revive something like clc but not using CORBA as I don't have an LWE license now (also CORBA is horrid), but it might take a long time for me to get around to it.

I can probably make the source to clc available (I am sure it is shareable & I still have it, it's a matter of finding it and extracting it from an old CVS repository and disentangling it from the possibly-non-shareable code surrounding it).  That also will probably take ages.  Let me know if you would still be interested.

--tim

Re: LispWorks emacsclient?

Haven't Lisp'd much lately, but this message happened to catch my eye.

I slapped together something like this several years ago in LW for Linux.  The core was this in ~/.lispworks:

;; Arrange for LW to start a Listener server once multiprocessing gets going.
;; Used by lwclient.
(push (list "start-lwserver"
            nil
            (lambda ()
              (comm:start-up-server :service 65000
                                    :address "localhost"
                                    :process-name "lwserver")))
      mp:*initial-processes*)

And a small shell script I called lwclient that looked something like this:

#!/usr/bin/zsh

(
  echo "lwclient$RANDOM"
  echo "(progn "
  for f in "$@" ; do
    if [[ $f != /* ]] ; then f="$PWD/$f" ; fi
    echo "(editor:find-file-command nil #p\"$f\")"
  done
  echo ")"
) \
| nc -q 1 localhost 65000 \
> /dev/null

This was ~2008, things've probably changed a bit since then, but this might give you enough to get going.

-- Larry Clapp


On Thu, Feb 2, 2012 at 5:03 PM, Nick Barnes <Nick.Barnes@pobox.com> wrote:

Has anyone built (and shared) anything like emacsclient and M-x
server-start for LispWorks?  That is, a small program which looks like
an editor to the outside world, but which actually pops the file up in
an editor of a running LispWorks, with a gesture (emacs uses M-x #) to
exit the client program (so that the program invoking it as an editor
knows it is done).

This would be handy for building some automation links to third-party
development tools (such as an SCM system).

LispWorks support say that no such system ships with LispWorks.  I'd
like it on Windows.

Nick B


Updated at: 2020-12-10 08:37 UTC