Kent Pitman<p><span class="h-card" translate="no"><a href="https://mastodon.sdf.org/@screwtape" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>screwtape</span></a></span> </p><p>This will be very rambly and informal and free-format and approximate, but someone might like it...</p><p>TECO has been around a long time. It was certainly around when I arrived on the MIT scene 1977-ish. But probably a long time before.</p><p>You asked what people used as a screen editor and I have to laugh. TECO was not really a screen editor, but was the implementation substrate for original Emacs. I'll tell the story I know.</p><p>TECO had commands that were single character (mostly, though some composed) and you did a set of commands and then could ask to see what you did. Usually, because it also worked on a paper terminal (which recorded everything you typed onto reams of paper), you saw maybe one line of context and then made some change. Some people did really long lives with entire defuns on one line. But it kind of didn't matter. c was the command to move foward. d to delete a character. 3c-4d would go forward 3 characters and delete 4 characters backward. You ended your command with Esc Esc (which echoed as $$) so 3c-4d$$ would show you the edited line and then you'd do more. A single Esc was a command separator or terminator, but two caused it to go.</p><p>You could put "macros" (really just strings of commands) in a thing called a q-register (really just a variable, except primitive Teco had no variables). The q-registers were so-called because they were named q0, q1, etc. and also qA, qB, ... qZ. You could put something in them with u. 5uA puts 5 into qA. Some commands were modifiable with @ or : (like in format strings in CL). So while ifoo$ would insert foo into the buffer at the current point, :i05c-4d$ would not insert anything in the buffer but would instead insert '5c-4d' into q0. So once you have strings in q registers you could execute them with m, as in m0 which would execute my sample string from above.</p><p>At some point, they changed it on glass (non-paper) screens to show you the buffer as edited, but still it was not doing the WYSIWYG thing. You saw part of a buffer with /\ as a cursor. So /\foo if the cursor was before foo. And Steele suggested that if there was a q-register assigned to each key, you could have it run that macro on hitting that key, which was the origin of emacs ^R (control-R) mode, ^R being the command that would get you into it. R for "real-time" mode. Stallman implemented it. I don't know who thought up the naming, probably Stallman.</p><p>The key bindings were on specially named new q-registers that had dots in their names. I think q^RA, q^RB, etc. where ^R was a control-R character. For control-A, q^R.A, for meta-A, q^R..A, etc. and for c-m-A q^R...A, so that allowed binding all the keys. </p><p>And at that point you had a realtime mode that was emacs-like. People could have init files that loaded up any of the q-registers with their own bindings, and there were library formats created so people could pre-load complicated definitions.</p><p>There was a lot of competition for whose library bindings would win out. Emacs was not the only early offering. Whole other packagings were available from various people. But eventually there was a mostly-consensus on a lot of it, and the rest became libraries on that.</p><p>TECO, especially the MIT variant, looks a bit like line noise since nearly every character was a command. But fortunately in libraries the style was to include code on the first half of the line and use the last half of the line as a comment explaining it. Here's a pointer to a library I wrote in TECO that tried to emulate some of the Lisp Machine's mail reader Zmail. If you want to see how the language worked by just kind of letting it roll past you.</p><p><a href="https://pdp-10.trailing-edge.com/mit_emacs_170_teco_1220/01/emacs/zbabyl.emacs.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">pdp-10.trailing-edge.com/mit_e</span><span class="invisible">macs_170_teco_1220/01/emacs/zbabyl.emacs.html</span></a></p><p><a href="https://climatejustice.social/tags/LispyGopher" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LispyGopher</span></a> <a href="https://climatejustice.social/tags/TECO" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TECO</span></a> <a href="https://climatejustice.social/tags/history" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>history</span></a></p>