🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3763

Re: SuperCard Runtime Editor (well, not really...)

#3763
From: Jon R Ferro
Date: Wed, 21 Feb 1990 06:50
67 lines
3095 bytes
In article <1793@esquire.UUCP> yost@esquire.UUCP (David A. Yost) writes:
>P.S.  About that "hmm..." above.  There could be a
>generic 'editor-manager' program on unix, say
>'edmgr', and you would set
>   EDITOR=edmgr EDMGR_EDITOR=yfe
>(your favorite editor).  When edmgr was invoked,
>it would launch yfe if it wasn't already running
>as a service, or it could tell you to run yfe in
>server mode in some window....

This already partially exists in, of course, GNU Emacs, but it only
really works in a windowing environment.  Also, it may require the
cooperation of your system manager, as emacsclient is one of the "extra"
utilities that comes with GNU Emacs that may not exist on certain
machines that are trying to save space.  It usually lives in the
directory named by the Elisp variable "exec-directory", which should be
added to the end of your path.  (Do "C-h v exec-directory" to see its
value.)

To set up to use emacsclient put the line:

	setenv EDITOR emacsclient

in your .cshrc, or put the lines:

	EDITOR=emacsclient
	export EDITOR

in your .profile.  Then put the line:

	(server-start)

in your .emacs file.

When emacsclient is invoked it sends an ID number and a list of
filenames to be edited via a socket to the serving Emacs process and
waits for Emacs to signal completion of editing.  The first file to be
edited pops up in Emacs IF EMACS IS CURRENTLY RUNNING -- either it is in
another X window or your current program is a subprocess of the Emacs.
Otherwise some mucking around with ^Z and %- is necessary to bring up
the serving Emacs for the files to pop up.

After editing each file in Emacs, hit "C-x #".  This marks the file as
done and saves it.  After all of the files from a client have been
edited Emacs signals the emacsclient process that sent them which then
exits, continuing the process which invoked it (i.e. your mailer or
Pnews).

If you don't always run Emacs immediately after logging in, the
following shell script should be put in the file ~/bin/emacsclient
(provided that ~/bin is in your PATH).  This covers the case of invoking
a new Emacs when emacsclient reports that no server exists.

================
#!\bin\sh
# If can run emacsclient (GNU Emacs is already running someplace) do
# it; else invoke a GNU Emacs proper.

# Substitute the absolute path of your emacsclient in the next line.
/usr/local/lib/emacs/etc/emacsclient "$@" && exit
exec emacs "$@"
================

YAGEF (Yet Another GNU Emacs Feature) from ---
-- 
Jon Ferro
jrferro@ai.mit.edu
Technical Details
Message-ID: <6763@rice-chex.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!brutus.cs.uiuc.edu!apple!snorkelwacker!ai-lab!jrferro
References: <1120taylorj@yvax.byu.edu> <1793@esquire.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!brutus.cs.uiuc.edu!apple!snorkelwacker!ai-lab!jrferro
From: jrferro@wheaties.ai.mit.edu (Jon R Ferro)
Newsgroups: comp.editors
Subject: Re: SuperCard Runtime Editor (well, not really...)
Message-ID: <6763@rice-chex.ai.mit.edu>
Date: 21 Feb 90 06:50:16 GMT
References: <1120taylorj@yvax.byu.edu> <1793@esquire.UUCP>
Reply-To: jrferro@ai.mit.edu (Jon R Ferro)
Followup-To: comp.editors
Organization: The MIT AI Lab, Cambridge, MA
Lines: 67