|Stories: Emacs Attacks|
Emacs is a public-domain, screen-oriented text editor that lets you see changes as
you make them. This is no big deal by today's standards, but when it was written
the most common editors were horrible line-oriented things that forced you to enter
obscure commands like:
While emacs was a great improvement, that doesn't mean it was fun
being there for its birthing pains.
A Unix user's login directory typically contains several files that begin with a dot.
For example, .login, .mail, and .forward. Normally those files are hidden from view.
One day I edited my .login file using Emacs. When emacs edits a file, it saves the
previous version using the same name with a ~ appended. In this case, that left me
with a .login file and a .login~ file.
I didn't want to clutter my directory with the backup file because my account's space
was limited so I tried to delete it.
I couldn't. To the Unix file system, the character ~ means "someone's home directory."
For example, ~rod might mean the home directory of the user rod. When I tried to
remove the file .login~ with the following command, the operating system shell
I was a novice at the time so I struggled with this for quite a while before I stumbled
across what I thought was a clever solution. I edited the file and deleted all of its
contents. The file was still there, but at least it wasn't taking up any room.
Of course them Emacs created a back of that file so now I had three files:
.login, .login~, and .login~~!
Eventually I asked a sysop and, if I remember correctly, he said to try:
That worked because the slash character \ tells Unix not to try to interpret the
following character, in this case ~.
I was in graduate school at MIT when the emacs editor was being written. In most Unix
shops, it's common for the system administrator's to install new software without warning
or testing and MIT was no exception. Whenever a new build of emacs was available,
it popped onto the systems without any notice or documentation of the changes. It was
common for the splash screen to show a version number like 3.276.1287. New builds were
posted almost daily.
|To Save Changes, Kill Session|
One day I logged on and spent an hour or so writing some paper or other. Then I couldn't
figure out how to save my file and close emacs. They had changed the exit command and
hadn't told anyone what the new command was.
After half an hour of frustration, I finally tried to kill the program and discard my
changes with Ctrl-C, Ctrl-C. That was roughly the system's equivalent of
Ctrl-Alt-Del, Ctrl-Alt-Del and, sure enough, that was the new command to exit
the program! Not only had they changed the exit command, they had changed it to
something no sane person would try. Fortunately I was practically insane with
frustration at that point so I got lucky and stumbled across the magic key sequence.
MIT's computing services were set up with centralized servers linked to a network of
workstations. You sat down at a workstation and connected to the server that held your
account. The command window took over the entire workstation surface so you
could normally run only one process at a time.
To get around that restriction, most people started programs in the background.
started emacs running in the background. Then you could switch to the command window
and execute other commands to see who else was logged in, send messages,
use online help, etc.
Unfortunately emacs had some special feature that effectively hid it from the
operating system so the system didn't know you were doing anything if you only
used emacs. After two hours, the system decided the terminal had been idle
for too long and it disconnected you. Emacs died without saving your changes
and you lost two hours' work.
To "fix" this problem, the support staff recommended that you turn on emacs' autosave
feature. You would still get disconnected, but at least you would only lose five minutes'
work instead of two hours'.
|If you would like to contribute a story, email me.|