Re: [PROPOSAL DRAFT]: editor and sensible-editor
Steve Greenland <stevegr@debian.org> writes:
> On 03-Jun-99, 09:26 (CDT), Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de> wrote:
> > Maybe we could rename sensible-editor to editor. I just hate having
> > two things make the same.
> >
> > editor could be removed and sensible-editor would be renamed to editor
> > and call /etc/alternatives/editor when $EDITOR is unset. The
> > additional bash that gets started is irellevant, since bash will be in
> > memory anyway and exec $EDITOR frees the little unshared memory.
>
> No, this I object to. The alternative 'editor' serves a useful
> purpose: it is the system default editor, as determined by the system
> administrator. Sensible-editor tries to obey the user's desired
> editor, and attempts fallbacks if that won't work or is not set. Your
> proposal doesn't change what actually happens, it just bypasses[1] the
> update-alternatives system.
No it doesn't bypass it. sensible-editor calls /usr/bin/editor,
i.e. /etc/alternatives/editor unless $EDITOR is set. If EDITOR is set,
the user has it reasons and that should be honored.
I think the complete /etc/alternative system should be
rethough. Instead of having a link from /usr/bin to /etc/alternatives,
there should be a small script that first checks for user overrides,
e.g. for editor whether $EDITOR or ~/.alternatives/editor are set.
This could be one script for all /etc/alternative/ links, because $0
will hold the name of variable or link to use.
> Steve
>
> [1] Actually, it doesn't work at all: where does the link
> /etc/alternatives/editor come from if /usr/bin/editor isn't managed by
> update-alternatives?
Don't ask me, maybe ae?
May the Source be with you.
Goswin
Reply to: