Re: xg (Re: virtual package (x-)editor ?)
(Tomas, please respect my Mail-Followup-To; I don't need two copies of
On 30-Nov-01, 01:43 (CST), Tomas Pospisek <firstname.lastname@example.org> wrote:
> On Thu, 29 Nov 2001, Steve Greenland wrote:
> > Then that person should (and probably *has*) set EDITOR to point to
> > something more to their liking.
> Ack. But I'm talking about "normal human beings" that per definition (see
> above) are not (yet) able to set an EDITOR variable nor do they know what
> it's for. An advanced user doesn't need to bother with the
> "sensible-editor script anyway since s/he's got the EDITOR variable in the
> first place.
*Users* never need to bother with the sensible-editor script: it's
strictly for the use of programs that need to start a text editor and
don't currently implement the standard Unix behavior of checking VISUAL
> > The whole point of the Debian editor policy (and the sensible-editor
> > script) is to allow the *user* to determine what editor they use.
> > Alternatives and virtual packages *cannot* do that: they work at the
> > system level.
> The base system can depend on a virtual package "editor" which would force
> the user or the sysadmin to decide for a default editor he wants to
> use/provide for the system.
Sigh. I've already explained this. There is an alternative link named
/usr/bin/editor. All text editors should provide this alternative at some
priority. The admin is free to use the update-alternatives to set the
desired default, if the priorities don't met her needs.
The sensible-editor script falls back on /usr/bin/editor if neither VISUAL
nor EDITOR is defined. If /usr/bin/editor is missing, then there is
*nothing* you can do, because there is no editor on the system.
> And as soon as the admin installs a different editor that would
> replace the other one the postscript/debconf can still ask:
> "do you want to replace the default editor by this one?"
> And this would not influence the decision of the geek-user which is as
> knowledgeable as to set EDITOR. It would only influence the "n h b" and
> let the sysadmin give him a easier to use (f.ex.) editor.
That capability is already there. Read update-alternatives(8).
> But the idea of packages is to provide some functionality and as I
> understood it "virtual packages" are there to provide some abstractly
> defined functionality ("editor file") so that other programms that
> depend on such a functionality can say so. Which is my concern.
You can depend on it. Call /usr/bin/sensibile-editor. If you don't like
the default, then either change the /usr/bin/editor alternative (to
provide a system wide default), or define EDITOR.
Yes, there is no way to force an editor to be on the system. But there
are editors in the base system, and an admin who has gone through the
effort to remove all the editors is probably building a dedicated router
or firewall or somesuch, and probably isn't going to be installing user
packages that need an editor.