MAJOR BUG (mode lines)

Dick Dunn rcd at opus.UUCP
Thu Apr 19 06:15:25 AEST 1984


Mark Horton, on "vi" taking commands from its input file:
>Why do you assume this is a bug?  It was put in as a feature at the
>request of some users, so that vi "set" commands could automatically
>be run when certain files are entered...

I suspect that if response in unix-wizards is any indication, there are
more people who think that this is bad than people who want it.  The slip
in not documenting it means that many users may have not had a chance to
express opinions about it--until now, with many of them (myself included)
becoming paranoid about using "vi".

There is a fairly basic principle about text editors being ignored in this
feature:  A text editor is a tool for manipulating text files.  The fewer
assumptions the editor makes about its data, the more general its
applicability.  We mostly accept the idea that editors work with ASCII and
are therefore somewhat ungracious in handling characters with the top bit
set (but please, that's a different discussion), and we tend to expect line
boundaries now and then (another different discussion), BUT most of the
text we manipulate satisfies these conditions.

If you put editor commands in the file to be edited, you've said that the
file is, in part, not data but a command script for the editor.  What other
programs can process that file?  They have to understand or ignore the
editor commands.  You've got a fundamentally different type of file if it
has editor commands embedded.

Moreover, consider what happens if you get a gonzo command string in a file
that you were editing!  Now you've got to figure out what happened and use
ANOTHER EDITOR to fix the mess.

If you MUST spend still more of our dwindling memory (and no, it's NOT all
virtual anyway) on such a feature, isolate it somehow so that the general
users of vi don't have to worry about stepping in it every time they edit a
file.  For example, invoke the editor with a different name (as in the e/ex
dodge) or add a flag to the command line; just don't make it the default.
-- 
...Are you making this up as you go along?		Dick Dunn
{hao,ucbvax,allegra}!nbires!rcd				(303) 444-5710 x3086



More information about the Net.bugs mailing list