From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.help Subject: Re: How to communicate with a running external process with given PID? Date: Mon, 22 Jul 2013 16:15:37 +0200 Message-ID: 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 X-Trace: ger.gmane.org 1374502564 16398 80.91.229.3 (22 Jul 2013 14:16:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 14:16:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thorsten Jolitz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 22 16:16:07 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 1V1GuE-0006jy-M3 for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 16:16:06 +0200 Original-Received: from localhost ([::1]:36850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1GuE-0003Jv-8P for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jul 2013 10:16:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Gto-0003IV-L5 for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:15:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Gtm-0005al-LS for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:15:40 -0400 Original-Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:49519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Gtm-0005aQ-Cd for help-gnu-emacs@gnu.org; Mon, 22 Jul 2013 10:15:38 -0400 Original-Received: by mail-lb0-f172.google.com with SMTP id v20so5394188lbc.31 for ; Mon, 22 Jul 2013 07:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=5RbetjWz3VNUNcpupo7GWnvO/OzehekMficAsQ4kYV4=; b=oLuf0YSsG2vf0bZtfDhl3vJ4s+ekwH0MlE31EgEeu9j2RRePp1vos6fDBBY0jxlGH7 MJAOiXGiVKf9Wn+9oGDRzj410gSpS7QX+0nBYgwCHvpUUY8194RzGTpqGFgjz6R3R3o+ tpd0HbZTPfIZt0a8GSN72V6aJ0I9IHKN/nXobJIphW/bF+2cSypmuzBbR303JFkH+18q cLt48qqoHHvdhm4iBMr9FwWNFcEEWQXAHilJEzzZCGWV8/x3t8YVuuNMNNnr9P1Mdtis 8HCHP0TgIMj+yvo+FpxkbTOe3Y3Q7dmYH3S28hkuVh7mUDkvV+bc8xuMcZhVbQmIda93 TA1Q== X-Received: by 10.152.27.9 with SMTP id p9mr12807107lag.4.1374502537428; Mon, 22 Jul 2013 07:15:37 -0700 (PDT) Original-Received: by 10.114.66.235 with HTTP; Mon, 22 Jul 2013 07:15:37 -0700 (PDT) In-Reply-To: <8738r7yloi.fsf@gmail.com> X-Google-Sender-Auth: F9NulsQRd6J7kwdYwruAZgYXLwQ X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22c 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:92319 Archived-At: 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.