* Remote development or emacs as a server
[not found] <df79b9f1-5e32-4139-8bc4-c348601df158@Spark>
@ 2020-05-18 8:24 ` Ian W
2020-05-18 8:45 ` tomas
2020-05-18 15:04 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Ian W @ 2020-05-18 8:24 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
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.
Sincerely Ian
[-- Attachment #2: Type: text/html, Size: 1053 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remote development or emacs as a server
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:04 ` Eli Zaretskii
1 sibling, 1 reply; 5+ messages in thread
From: tomas @ 2020-05-18 8:45 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
On Mon, May 18, 2020 at 01:24:11AM -0700, Ian W wrote:
> I was wondering how difficult it would be to separate the display (front-end) and server (back-end) in emacs.
See chapter 39 "Using Emacs as a Server" in the Emacs manual
(if you prefer the browser, cf [1]).
Does this help for your use case?
Cheers
[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html
-- tomás
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remote development or emacs as a server
2020-05-18 8:24 ` Remote development or emacs as a server Ian W
2020-05-18 8:45 ` tomas
@ 2020-05-18 15:04 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2020-05-18 15:04 UTC (permalink / raw)
To: Ian W; +Cc: emacs-devel
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remote development or emacs as a server
2020-05-18 8:45 ` tomas
@ 2020-05-18 15:06 ` Eli Zaretskii
2020-05-18 15:33 ` tomas
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-05-18 15:06 UTC (permalink / raw)
To: tomas; +Cc: emacs-devel
> Date: Mon, 18 May 2020 10:45:38 +0200
> From: <tomas@tuxteam.de>
>
> See chapter 39 "Using Emacs as a Server" in the Emacs manual
> (if you prefer the browser, cf [1]).
I doubt that this is the answer being sought: in this mode of
operation the display in its entirety is still handled by the
"server", we just draw the screen on a possibly remote terminal using
X or some other protocol.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remote development or emacs as a server
2020-05-18 15:06 ` Eli Zaretskii
@ 2020-05-18 15:33 ` tomas
0 siblings, 0 replies; 5+ messages in thread
From: tomas @ 2020-05-18 15:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
On Mon, May 18, 2020 at 06:06:40PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 18 May 2020 10:45:38 +0200
> > From: <tomas@tuxteam.de>
> >
> > See chapter 39 "Using Emacs as a Server" in the Emacs manual
> > (if you prefer the browser, cf [1]).
>
> I doubt that this is the answer being sought: in this mode of
> operation the display in its entirety is still handled by the
> "server", we just draw the screen on a possibly remote terminal using
> X or some other protocol.
I'm not sure either -- so thanks for offering another POV.
Cheers
-- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-18 15:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
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).