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

Re: default editor



On Thu, 20 Mar 2003 00:20:39 +0100 "Marco d'Itri" <md@Linux.IT> wrote:
> On Mar 19, Will Yardley <you@aredumb.com> wrote:
>  >Yes, but mutt (normally) obeys VISUAL if present - it's only the
>  >Debian package which seems not to.
> Maybe you think this because the debian package is a 1.5 snaphost, and
> handling of $EDITOR and $VISUAL has changed since 1.4 (something else
> needed to be fixed, maybe this broken something too...).
> 
> I will *not* further discuss this with the mutt upstream unless
> somebody will provide reference to authoritative documentation about
> the correct semantics of $EDITOR and $VISUAL (I could not find any)
> and a patch implementing this.

The Debian Policy Manual[1] states:

every program that launches an editor or pager must use the EDITOR or
PAGER environment variable to determine the editor or pager the user
wishes to use. If these variables are not set, the programs
/usr/bin/editor and /usr/bin/pager should be used, respectively.

...

A program may also use the VISUAL environment variable to determine the
user's choice of editor. If it exists, it should take precedence over
EDITOR. This is in fact what /usr/bin/sensible-editor does.

This topic also appears to have been discussed on a few Debian mailing
lists in the past, with most people suggesting that it should be $VISUAL
then $EDITOR then /usr/bin/editor, but with no obvious conclusion to the
thread.

I usually have $VISUAL set but $EDITOR unset (it is expected that
$VISUAL will be set to a full screen editor (something like vi) and that
$EDITOR will be set to a line editor (something like ed), and I don't
really want to use a line editor) so would prefer the behavior
suggested here that $VISUAL is inspected before $EDITOR.

LINKS
[1] Debian Policy Manual - Customized Programs
http://www.debian.org/doc/debian-policy/ch-customized-programs.html

-- 
Michael Wardle
Adacel Technologies



Reply to: