From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: GNU Emacs: Client/Server Date: 30 Jan 2004 14:03:46 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040129111259.67CF418B@frontend3.messagingengine.com> <32D82A01-5253-11D8-82BB-00039363E640@swipnet.se> <20040129121313.766CE37D@frontend3.messagingengine.com> <20040130045855.1A6A92E@frontend3.messagingengine.com> <20040130103112.8EF5433@frontend3.messagingengine.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075464961 22271 80.91.224.253 (30 Jan 2004 12:16:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2004 12:16:01 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 30 13:15:51 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmXYt-0004s3-00 for ; Fri, 30 Jan 2004 13:15:51 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmXYt-0003hj-00 for ; Fri, 30 Jan 2004 13:15:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmXYY-000462-6w for emacs-devel@quimby.gnus.org; Fri, 30 Jan 2004 07:15:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AmXW3-0003PD-Hi for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:12:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AmXUs-0003AM-ER for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:12:13 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.24) id 1AmXU0-00033T-Gp for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:10:48 -0500 Original-Received: (qmail 14253 invoked from network); 30 Jan 2004 12:04:05 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 30 Jan 2004 12:04:05 -0000 Original-To: "Dhruva Krishnamurthy" In-Reply-To: <20040130103112.8EF5433@frontend3.messagingengine.com> Original-Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19567 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19567 "Dhruva Krishnamurthy" writes: > > Both of these must --somehow-- be wrapped in such a way that they > > become non-blocking operations and/or will function through the normal > > This code will be running in it's own thread. So, the main thread is not > blocked (am I missing something?). (Yes) -- in emacs, network processes do not run in a separate thread. > However, I just recalled that MAIL SLOTS in W32 uses UDP internally. So, > I am fairly certain now that we can get this working using > "make-network-process" in ELisp. I just wrote a very simple ELisp code > (has to be simple if I could write it!) to start a server and listen on a > port. Another method which establishes a connection if server is running > and sends expressions to be evaluated by the server. My gut feeling is > that we can easily have a Elisp implementation of basic "gnuserv" > functionality atleast to open files on existing GNU Emacs process. Stefan has already rewritten start-server to use an internal server process rather than the external emacsserver program. It listens on a local (unix) socket for emacsclients to connect. As Stefan has pointed out, using TCP (or UDP) would be a generally useful solution on other platforms. There are some security issues here, but maybe it would be sufficient to restrict such use to local emacsclients, e.g. by binding the server to the local-interface, i.e. 127.0.0.1:. -- Kim F. Storm http://www.cua.dk