🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25462

Re: X10 1, GNUemacs 0

#25462
From: John T Kohl
Date: Sun, 19 Apr 1987 17:46
63 lines
3288 bytes
	From: bob@wiley.UUCP (Bob Amstadt)
	Message-ID: <477@diva.UUCP>
	Date: 18 Apr 87 21:32:06 GMT
	References: <50@ksr.UUCP> <58@ksr.UUCP>
	In-reply-to: benson@ksr.UUCP's message of 15 Apr 87 20:40:14 GMT
	
	>   Third, when I want to use emacs for my editor when posting from rn,
	>   I have to go supply a window size from the mouse, which is a pain.
	
	I don't know anything about rn, but unless the geometry is provided to
	GNU emacs, it will need to be placed. I personally prefer to use GNU emacs
>	as an environment where I read news, read mail, and edit. My experience
>	tells me that GNU emacs is not a good editor for invoking from another
>	program to do quick editing. GNU emacs is huge and takes too long
	to load for that purpose. It seems to me that it would be better to
	start in emacs and deal with news and mail from within emacs.
	
	                Bob Amstadt

If you have version 18 and BSD, you can use a small stub program to talk
to your emacs via a unix-domain socket.  Here's the relevant portion of
the NEWS file:

* Existing Emacs usable as a server.

Programs such as mailers that invoke "the editor" as an inferior
to edit some text can now be told to use an existing Emacs process
instead of creating a new editor.

To do this, you must have an Emacs process running and capable of
doing terminal I/O at the time you want to invoke it.  This means that
either you are using a window system and give Emacs a separate window
or you run the other programs as inferiors of Emacs (such as, using
M-x shell).

First prepare the existing Emacs process by loading the `server'
library and executing M-x server-start.  (Your .emacs can do this
automatically.)

Now tell the other programs to use, as "the editor", the Emacs client
program (etc/emacsclient, located in the same directory as this file).
This can be done by setting the environment variable EDITOR.

When another program invokes the emacsclient as "the editor", the
client actually transfers the file names to be edited to the existing
Emacs, which automatically visits the files.

When you are done editing a buffer for a client, do C-x # (server-edit).
This marks that buffer as done, and selects the next buffer that the client
asked for.  When all the buffers requested by a client are marked in this
way, Emacs tells the client program to exit, so that the program that
invoked "the editor" will resume execution.

You can only have one server Emacs at a time, but multiple client programs
can put in requests at the same time.

The client/server work only on Berkeley Unix, since they use the Berkeley
sockets mechanism for their communication.

-----
John Kohl
MIT/Project Athena
Technical Details
Message-ID: <8704191746.AA00326@BINKLEY.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!ucbvax!ATHENA.MIT.EDU!jtkohl

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!ucbvax!ATHENA.MIT.EDU!jtkohl
From: jtkohl@ATHENA.MIT.EDU (John T Kohl)
Newsgroups: comp.windows.x
Subject: Re: X10 1, GNUemacs 0
Message-ID: <8704191746.AA00326@BINKLEY.MIT.EDU>
Date: Sun, 19-Apr-87 12:46:52 EST
Article-I.D.: BINKLEY.8704191746.AA00326
Posted: Sun Apr 19 12:46:52 1987
Date-Received: Sun, 19-Apr-87 20:48:57 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 63