@rohare em was the first editor I ever used, so I updated the sources from v6 to modernish (the last argument to seek(2) originally used options to work in blocks, not bytes, for example). I added em to #pkgsrc a while ago, so it should be avalable for all platforms that pkgsrc supports
@agc
At my uni we had em on V7, so that version must have been around.
I also made further changes. I mainly recall changes to make its command parsing less strict. E.g. not require the final / on s/foo/bar/ .
@rohare
@agc @rohare
The version I have at hand comes in these files:
```
total 92
drwxr-xr-x 2 rhialto users 512 Mar 1 2000 ./
drwxr-xr-x 4 rhialto users 512 Mar 1 2000 ../
-rw-r--r-- 1 rhialto users 604 Jan 1 1970 ascii.h
-rw-r--r-- 1 rhialto users 640 Jan 1 1970 ctrlkey.h
-rw-r--r-- 1 rhialto users 2251 Jan 1 1970 duem.c
-rw-r--r-- 1 rhialto users 67157 Jan 1 1970 em.c
-rw-r--r-- 1 rhialto users 1715 Jan 1 1970 em.h
```

@agc @rohare
and em.c starts off with
```
/*
Em - editor UNIX verion 7.

modified and extended by Th. A. Zoethout, KUN Nijmegen.
*/
```
Rather different from the one in pkgsrc!

@agc @rohare Both versions seem to be missing "char HELPKEYS[] = "keys"; /* helpfile with open mode keys */"

Hopefully TUHS has it?

@agc @rohare Hm, the em in pkgsrc seems rather broken. I was em-ing its DESCR file, and while iterating through its lines, this line near the end came out garbled: `make en, and then "extended" en to cf controlling prompts are described below.`
@rhialto @rohare I had a quick look at this, and I think it can be fixed by converting all the "=+" increments to "+=" in both em1.c and em2.c. (Works for me, just checking that that is indeed the fix now.) Searching with a decent engine tells me that the =+ form was a holdover from B, deprecated in 1976, as it's prone to errors in parsing (i.e. is that i = +4 or i += 4). There's more in DMR's paper on the evolution of C (page 5) at https://www.nokia.com/bell-labs/about/dennis-m-ritchie/chist.pdf
@agc @rohare
I put the version I have at http://www.falu.nl/~rhialto/f44f4626369c7689e18faf651d5e7c61/em.tar.gz (limited time only) for you to look at. I remember in particular the open mode to work better than what's in the pkgsrc version of em. But maybe my memory deceives me. I have not attempted to port this one to modern times to verify this.