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

Re: virtual package (x-)editor ?



Thanks and ...

On Sat, 24 Nov 2001, Steve Greenland wrote:

> > * I require a program that opens up an editor under X. Right now I am
> >   using:
> >
> > 	Suggests: editor, x-terminal-emulator
>               ^^^^^
>
> No such virtual package. Therefore, a violation of policy.

So why:

tpo@tpo2:tmp$ grep-available -F Provides editor -s Package,Provides
Package: vim
Provides: editor, vim-rt

Package: jed
Provides: info-browser, mail-reader, editor

Package: nano
Provides: editor

Package: xjed
Provides: info-browser, mail-reader, editor

Package: elvis
Provides: editor, ctags

Package: nano-tiny
Provides: editor

>     It is not required for a package to depend on editor and pager, nor
>     is it required for a package to provide such virtual packages.
>
> (For much the same reason that packages don't need to "Suggests: ls" -
> it's part of the base system. Yes, you can, with some effort, remove all
> the "editors" from your system. But someone that has gone to that effort
> is likely to be annoyed by your "Suggests".)

Possibly maybe.

> It sounds like what we could really use is something like
> 'sensible-x-editor' and an associated XEDITOR environment variable,
> which would fall back on starting $EDITOR in a terminal window.

Yup. It's just that for me an editor doesn't have to be able to be
programmable and to brew coffe. It just needs to open the roght file when
I start it with "editor file" and allthough I haven't gone through the
effort of testing all existing editors I have yet to see one that wouldn't
accept a filename as a CL parameter.

> For that matter, your code could do something like
>
> 	if ((exec("/usr/bin/sensible-editor") == FAILED) {
> 	    exec("/usr/bin/x-terminal-emulator -e /usr/bin/sensible-editor")
>     }
>
>    (Yes, I know that's not real C code...)
>
> so that if the user had defined EDITOR to something X-based, the first
> exec succeeds, otherwise try again in an terminal.

yup.

> - Stop using the /etc/alternatives links, use the correct link in
> /usr/bin.

acc.

> - There's no need for an editor (or xeditor) virtual package.

nack.

*t

----------------------------------------------------------------------------
             Tomas Pospisek
	     SourcePole   -  Linux & Open Source Solutions
	     http://sourcepole.ch
	     Elestastrasse 18, 7310 Bad Ragaz, Switzerland
	     Tel: +41 (81) 330 77 11
----------------------------------------------------------------------------





Reply to: