From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Where is the code for the Emacs server in the core? Date: Fri, 12 Jan 2018 11:39:05 +0200 Message-ID: <83lgh32z7q.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1515749885 29972 195.159.176.226 (12 Jan 2018 09:38:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2018 09:38:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: George Plymale II Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 12 10:38:00 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZvmh-0007Pn-VL for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 10:38:00 +0100 Original-Received: from localhost ([::1]:57212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZvoh-0006RW-Pd for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 04:40:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZvo8-0006Qs-2X for emacs-devel@gnu.org; Fri, 12 Jan 2018 04:39:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZvo7-0003EQ-3k for emacs-devel@gnu.org; Fri, 12 Jan 2018 04:39:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZvo6-0003EF-Vw; Fri, 12 Jan 2018 04:39:27 -0500 Original-Received: from [176.228.60.248] (port=3682 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eZvo6-0003h0-Cy; Fri, 12 Jan 2018 04:39:26 -0500 In-reply-to: (message from George Plymale II on Fri, 12 Jan 2018 02:58:42 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221881 Archived-At: > From: George Plymale II > Date: Fri, 12 Jan 2018 02:58:42 -0500 > > I am trying to find the code in the Emacs core which implements the > Emacs server / daemon. The reason I am looking is that I am curious > about implementing multi-tty support in the Emacs Mac Port by Yamamoto > Mitsuharu. Unfortunately, I believe that I must first see the code that > governs the Emacs server. I am not sure if that is the right place to > look, but I am unsure where else the problem could be. The Emacs server > purposefully rejects requests to have a terminal and GUI client. I > assume it also governs which process will be in charge of all the Emacs > clients. So I thought the server code would be the best place to look. Multi-tty support depends on two features: . the ability to have more than one display_info object, so that some could be used for TTY frames and others for GUI frames . the ability to open a TTY frame on a named tty device, see make-terminal-frame emacsclient and server.el use these two abilities to request creation of a new frame either on a different TTY device or on a different X display. The files where this functionality is implemented are emacsclient.c, server.el, frame.el and frame.c.