[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PROPOSAL DRAFT]: editor and sensible-editor



On debian-policy, Chris Waters <xtifr@dsp.net> wrote:
>> The EDITOR and VISUAL variables are *NIX traditions, and are
>> already supported by most well-written programs, and even many
>> badly written ones.

Edward Betts <edward@debian.org> writes:
> Talking about the enviroment variables EDITOR and VISUAL, I was
> under the impression that EDITOR is meant for a line editor, like ed
> or ex, and VISUAL is for a visual editor, like vi or emacs.

Well, traditionally, EDITOR was used even on dumb terminals, whereas
the VISUAL editor is only required to function on terminals with at
least some cursor positioning capability.  So, by that reasoning,
(vanilla or POSIX) vi is OK (because they have "open mode"), but
emacs is right out (it, in fact, refuses to run on dumb terminals).

> I currently have both VISUAL and EDITOR set to vim.

If you agree with my traditional usage summary, vim would not be
suitable because it does not implement open mode and is thus pretty
unusable on dumb terminals.

However, dumb terminals are pretty rare nowadays.  I pretty much
encounter this situation only when in single user mode on my non-Linux
boxes.  (I suppose dumb terminal capability could be important for
doing crash recovery on Linux boxes with a damaged terminfo database.)
That rarity is probably why current Debian policy specifies that
EDITOR is the user's preferred editor in all cases (dumb terminal or
smart); VISUAL is not part of policy at all.

Personally, I would prefer to change the policy since it makes EDITOR
preferred over VISUAL, which is the reverse of the behavior on my
other systems.  This difference makes it (minimally) harder to share
accounts between Debian and non-Debian systems (or it would if all
Debian packages followed this bit of policy--sensible-editor, for
example, does not).

There are a few messages discussing this issue further in the 98/07
archives for those interested.

-ccwf


Reply to: