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 given PID? Date: Tue, 23 Jul 2013 09:19:47 +0200 Message-ID: <87y58xrbe4.fsf@gmail.com> References: <87mwph7bav.fsf@informatimago.com> <87ip05726h.fsf@informatimago.com> <877ggjyq65.fsf@gmail.com> <8738r7yloi.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1374564011 10396 80.91.229.3 (23 Jul 2013 07:20:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2013 07:20:11 +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 09:20:13 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 1V1WtJ-0005yE-CX for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 09:20:13 +0200 Original-Received: from localhost ([::1]:58002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1WtI-0007GP-Un for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 03:20:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Wt7-0007EO-66 for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 03:20:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Wt5-0001Ah-TX for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 03:20:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Wt5-00018E-GZ for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 03:19:59 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V1Wt3-0005fm-Qb for help-gnu-emacs@gnu.org; Tue, 23 Jul 2013 09:19:57 +0200 Original-Received: from g231105110.adsl.alicedsl.de ([92.231.105.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jul 2013 09:19:57 +0200 Original-Received: from tjolitz by g231105110.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jul 2013 09:19:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231105110.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:nC/zOtftQCBCLJ+UHxu2B9X5TdU= 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:92339 Archived-At: Aurélien Aptel writes: > On Mon, Jul 22, 2013 at 11:43 AM, Thorsten Jolitz wrote: >> While I figured out that in my case using HTTP would be just fine, I >> would still be interested in the answer to my (a tad naive) original >> question: how would you establish (in an Emacs Lisp program) plain >> socket communication between Emacs and an already running external >> process (of a Lisp dialect that is not Emacs Lisp) with given PID? >> > > I was a bored so I hacked this example together in an hour or so: > > https://bitbucket.org/knarf/emacs-ipc-example > > The process is written in Perl but I'm sure the Lisp you're using has > similar functions to create, listen, accept, receive, send and close > sockets. Thank you, thats indeed very helpfull! -- cheers, Thorsten