unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ian W <ian@wahbe.com>
Cc: emacs-devel@gnu.org
Subject: Re: Remote development or emacs as a server
Date: Mon, 18 May 2020 18:04:43 +0300	[thread overview]
Message-ID: <83a7259tdg.fsf@gnu.org> (raw)
In-Reply-To: <47bc4fe0-ff1c-4f33-b65f-b693c3eca448@Spark> (message from Ian W on Mon, 18 May 2020 01:24:11 -0700)

> Date: Mon, 18 May 2020 01:24:11 -0700
> From: Ian W <ian@wahbe.com>
> 
> I was wondering how difficult it would be to separate the display (front-end) and server (back-end) in emacs.
> I’m not familiar with the emacs code base, but I poked around for a couple of hours, and couldn’t find any
> centralized I/O abstraction, just #ifdefs (this difficulty was discussed in Unify the Platforms:
> Cairo+FreeType+Harfbuzz Everywhere (except TTY)). I want emacs to have first class support for remote
> development (running emacs as a server, and connecting a gui front end to it from another computer). This
> seams like the first step. Any help would be appreciated.

I'm not sure we are on the same page when we talk about "display and
server" in this context.  The design of the Emacs display engine is
not client/server, it's more like master/slave.  So maybe my answer
below will make no sense to you, in which case please describe your
mental model in more detail.

AFAIU, the I/O abstraction you are looking for is the FRAME_RIF ("RIF"
stands for "Redisplay InterFace") and FRAME_TERMINAL.  These two
structures hold terminal- and window-system-specific methods invoked
by the display engine when it needs to do something that's done
differently on different kinds of display.  The simplest example is
the method used to write a series of glyphs on the glass.

FRAME_RIF is defined in dispextern.h ('struct redisplay_interface')
and FRAME_TERMINAL is defined in termhooks.h ('struct terminal').
They are both filled by the respective implementations: xterm.c for X,
w32term.c for MS-Windows, etc.

The separation of the interface into two collections of methods is
largely historic and could be ignored for your purposes.

If you are thinking about physically separating these two layers, then
there will be need for some protocol through which the two parts will
talk.  Also, be aware that the current display algorithms don't assume
any significant delay between the command to the "slave" to do
something and the actual effect, something that could be invalid for
separate operation.

HTH



      parent reply	other threads:[~2020-05-18 15:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <df79b9f1-5e32-4139-8bc4-c348601df158@Spark>
2020-05-18  8:24 ` Remote development or emacs as a server Ian W
2020-05-18  8:45   ` tomas
2020-05-18 15:06     ` Eli Zaretskii
2020-05-18 15:33       ` tomas
2020-05-18 15:04   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a7259tdg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ian@wahbe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).