From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: How to communicate with a running external process with Date: Tue, 23 Jul 2013 22:13:41 +0200 Message-ID: <87ppu99gqy.fsf@gmail.com> References: <7DEC2F40B9E0874681480168A47FD3C11AF1E5E6@MSGPEXCEI32B.mfad.mfroot.org> <87txjlr9js.fsf@gmail.com> <87mwpd3xgy.fsf@informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374610455 12277 80.91.229.3 (23 Jul 2013 20:14:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2013 20:14:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 23 22:14:16 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1iyN-0002DF-NY for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 22:14:15 +0200 Original-Received: from localhost ([::1]:40272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iyN-0004Tw-8X for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 16:14:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iy9-0004Tn-RX for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 16:14:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1iy8-000823-GH for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 16:14:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:56295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iy8-00081z-9W for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 16:14:00 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V1iy2-0001iU-E2 for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 22:13:54 +0200 Original-Received: from g231235179.adsl.alicedsl.de ([92.231.235.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jul 2013 22:13:54 +0200 Original-Received: from tjolitz by g231235179.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jul 2013 22:13:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 62 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231235179.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:PWTY2aWvXuCR8SLGDPEohtNLCgs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92352 Archived-At: "Pascal J. Bourguignon" writes: > Thorsten Jolitz writes: > >> OTOH, this topic has become quite interesting, and I'm still curious >> about my original question: how to use all these UNP mechanisms from >> Emacs Lisp when the other (Lisp) process is not a subprocess but already >> running (with a given PID). > > You started specifying only another "process" PID, but now you're saying > it's a "Lisp" process. What does that mean? [...] > But you are not saying what the program of the other process is. [...] Not really, this is the very beginning of my original post: ,---------------------------------------------------------------------------- | From: Thorsten Jolitz | Subject: How to communicate with a running external process with given PID? | Newsgroups: gmane.emacs.help | To: help-gnu-emacs@gnu.org | Date: Sat, 20 Jul 2013 11:06:55 +0200 (3 days, 10 hours, 55 minutes ago) | | | Hi List, | | say I want to call another program (more exactly, another Lisp program | that is not Emacs Lisp) from an Emacs Lisp program. `---------------------------------------------------------------------------- > Now, you said lisp, but since you're building a history of imprecise > language, perhaps we should assume you mean Common Lisp? That wasn't my intention, I was just interested in the Emacs Lisp side when starting the thread and thought the exact Lisp dialect of the other side is irrelevant (its an uncommon lisp). After rereading that UNP stuff I'm aware that the other side is important too. > There's a protocol that has been defined specifically to communicate > between an emacs and a Common Lisp process, with which a whole IDE has > been built in emacs, named slime (the backend, the library that > implements that protocol on the Common Lisp side is called swank (as is > called the protocol)). With slime/swank you can connect a CL process > with an emacs, and from emacs, send CL expressions to evaluate to the CL > process and receive back results, and debug and develop CL programs. > But if you specifically meant that, you could easily read the manual of > slime which indicates how to create from emacs a new CL inferior process > running swank, and how to connect from emacs to an existing CL process > that runs a SWANK server (therefore that is listening to a specific > port, just like a HTTP server). I did not mean Common Lisp, but there is a Swank implementation for my Uncommon Lisp of interest, and it did not occur to me to consider it - so thanks for this marvelous tip! -- cheers, Thorsten