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

Re: default editor



[ Bcc to md at linux.it; package maintainer
see
http://lists.debian.org/debian-user/2003/debian-user-200303/msg03514.html]


In linux.debian.user, you wrote:
> you@aredumb.com (Will Yardley) writes:

>> Shouldn't VISUAL (if present) override /usr/bin/editor as the
>> default full-screen editor?
 
> Some programs use VISUAL, some EDITOR, some both... the distinction
> between them has long been lost.  Set them both and it'll work almost
> everywhere.

Yes, but mutt (normally) obeys VISUAL if present - it's only the Debian
package which seems not to.

The patch (to init.c) seems to be:

   Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp");
-  Editor = safe_strdup ((p = getenv ("EDITOR")) ? p : "vi");
+  Editor = safe_strdup ((p = getenv ("EDITOR")) ? p : "/usr/bin/editor");
   Visual = safe_strdup ((p = getenv ("VISUAL")) ? p : Editor);

I'd think that VISUAL (if present) should override /usr/bin/editor (if
present), however this seems not to be the case.

Paul Johnson <baloo@ursine.dyndns.org>:

> Why not just specify your editor in .muttrc?

Usually, I do (as noted in my original message). However, I don't read
mail on our user machines generally, and I already wanted to define
$VISUAL (for other programs). The point isn't that I couldn't figure out
how to set my editor correctly, but rather that the program doesn't
follow the expected behavior. The whole point of having a unified
packaging system, like Debian, and having stuff like /usr/bin/editor is
so that software will be *more* consistent to the end-user, rather than
*less*.

Alan Shutko <ats@acm.org>:

> Some programs use VISUAL, some EDITOR, some both... the distinction
> between them has long been lost.

Perhaps, but EDITOR is supposed to be your line editor, and VISUAL your
full screen editor, or at least that's what I've always been told.

-- 
No copies, please.
To reply privately, simply reply; don't remove anything.



Reply to: