[comp.editors] Writing Editors

haahr@phoenix.Princeton.EDU (Paul Gluckauf Haahr) (09/22/88)

in article <2892@jpl-devvax.JPL.NASA.GOV>
	umalir@jpl-devvax.JPL.NASA.GOV (Rodrigo Umali) writes:
> Could someone point me to some good books on writing editors? 
> (Specifically: what data structures are used; input/output;
> aesthetics; special features.) I suppose I could read the emacs 
> source, but I haven't learned emacs (yet!).

i would suggest rob pike's paper on the sam editor.  sam is a
modeless, bitmapped mouse based editor with a very sophisticated
command language.  the paper is

	%A Rob Pike
	%T The Text Editor Sam
	%J Software -- Practice and Experience
	%V 17
	%N 11
	%D November 1987
	%P 813-845

the paper is both an explanation of how to use sam
and a description of the implementation.

sam (source) is available from the at&t toolchest.
i believe that the most recent version will run on
5620s, 630s, suns, or X windows.  (it can be run on
a dumb terminal or from a shell script with only the
command language).

paul haahr
princeton!haahr haahr@princeton.edu haahr@pucc.bitnet

oster@dewey.soe.berkeley.edu (David Phillip Oster) (09/23/88)

Another fun paper is "A Generalized Text Editor" by Chris Frazer in CACM,
V.23, #3, 1980 p.154-158

the abstract is:

Text is not the only data that needs editing; for example, file deletion
utilities edit directories. If all "editors" use the same command
language, they would be easier to learn, remember, and code. This paper
describes a generalized editor that edits text, directories, binary core
images, and certain operating system data with a single user interface.

See also:

University of Arizona, Dept of C.S. tech note: TR 79-7a, "the display
editor S*" has good followup info including complete source code.

Fraser, C.W. "A compact, portable CRT-based editor", Software Practise &
Experience 9, 2 (Feb. '79) 121-125

MacLoed, I. A. "Design and Implementation of a display-oriented text
editor", Software Practise & Experience 7, 6 (Nov. '77) p. 771-778

There was also a sigplan issue from the early '80s about a portland oregon
conference on text processing that had some interesting papers, including
one by Richard Stallman on the implementation of emacs.

daveb@geac.UUCP (David Collier-Brown) (09/24/88)

In article <2892@jpl-devvax.JPL.NASA.GOV>
|  	umalir@jpl-devvax.JPL.NASA.GOV (Rodrigo Umali) writes:
|  Could someone point me to some good books on writing editors? 

From article <3722@phoenix.Princeton.EDU>, by haahr@phoenix.Princeton.EDU (Paul Gluckauf Haahr):
|  i would suggest rob pike's paper on the sam editor.  

  Well, I'd suggest Bernie Greenberg[sp?]'s paper on Multics Emacs,
but I don't hace a machine-readable copy any more (I couldn't afford
a Multics machine when I left Honeybun).
  Could someone with access to this (almost seminal) paper make it
available?

--dave
-- 
 David Collier-Brown.  | yunexus!lethe!dave
 Interleaf Canada Inc. |
 1550 Enterprise Rd.   | HE's so smart he's dumb.
 Mississauga, Ontario  |       --Joyce C-B

fst@mcgp1.UUCP (Skip Tavakkolian) (09/27/88)

In article <3722@phoenix.Princeton.EDU>, haahr@phoenix.Princeton.EDU (Paul Gluckauf Haahr) writes:
> in article <2892@jpl-devvax.JPL.NASA.GOV>
> 	umalir@jpl-devvax.JPL.NASA.GOV (Rodrigo Umali) writes:
> > Could someone point me to some good books on writing editors? 
> > (Specifically: what data structures are used; input/output;
> > aesthetics; special features.) I suppose I could read the emacs 
[ deleted ]
> i would suggest rob pike's paper on the sam editor.  sam is a
> modeless, bitmapped mouse based editor with a very sophisticated
> command language.  the paper is
[ deleted ]
> paul haahr
> princeton!haahr haahr@princeton.edu haahr@pucc.bitnet


``Software Tools'' (in RATFOR) and ``Software Tools in Pascal'', both
have, almost, the complete code to a editor very similar to ``ed''.
It is explained very well.

There is also, a preprocessors, a text formatters, and filters (i.e.
``grep'', ``sort'', ``uniq'',  etc.) explained and implemented in this
book.

Books' authors are: Brian Kernighan and P. J. Plauger.

Sincerely
-- 
Fariborz ``Skip'' Tavakkolian
UUCP	...!uw-beaver!tikal!mcgp1!fst

UNIX is a registered trademark of AT&T

oz@yunexus.UUCP (Ozan Yigit) (09/30/88)

See the last chapter of "A Software Tools Sampler" by
Webb Miller (Prentice Hall, 1987) for a complete VI-clone
editor called S. It is implemented in a very modular fashion,
with intelligent screen optimization, undo, etc. It is an
excellent start for a good editor, whether it is VI like, or
something different. Also, the sources for MicroEmacs V30
[The Conroy Edition] make an excellent reading, although the
come may be too brief for some.

oz
-- 
Reflections are 	        	| Usenet: ...!utzoo!yunexus!oz
images of tarnished aspirations.	|   ...uunet!mnetor!yunexus!oz
			RACTER		| Bitnet: oz@[yulibra|yuyetti]
[an Artifically Insane program.]	| Phonet: +1 416 736-5257x3976