Re: Preferred editor and pager
-----BEGIN PGP SIGNED MESSAGE-----
On Thu, 13 Mar 1997, Ian Jackson wrote:
> This is not a suggestion for 1.3.
>
> We keep having problems where programs invoke a less-powerful or
> less-desired-by-the-user pager or editor.
>
> I suggest the following solution:
>
> Programs should be compiled to run `pager' as their default pager and
> `edit' or perhaps `editor' as their default editor.
>
> Editors and pagers should use update-alternatives to provide these
> names.
This has the disadvantage that on multi-user systems (hey, that's what
UNIX is for!) all users have to agree which `pager' and `editor' to use.
(Just image the flame war if we have to decide, which `pager' and `editor'
we should install on master!)
IMHO all programs should be changed to read the environment variables
`PAGER' and `EDITOR'. Thus every user can choose the program he likes.
If these variables are not set, then the program should fall back on a
default `pager' or `editor', which will be defined in our policy manual.
(This pager and editor has to be garanteed to be installed, so it should
be tagged `essential'. AFAIK `ae' is actually the only editor which is
`essential'. Couldn't someone come up via a very simple and small `vi'
that could replace the ugly ae? :-)
Someone pointed out that the env vars will fail if the programs take
different arguments. The only solution I see is to make all programs
envoke `/usr/lib/debian/editor' and `/usr/lib/debian/pager', or something
similar, which take well defined arguments and which test for current
environment variables. Depending on how these are set, they should invoke
the appropriate editor/pager and translate all command line options for
this specific program.
The editor/pager "wrapper" scripts would have to be created be us and when
a new editor/pager is debianized, they would have to be changed.
Note that this solution is perhaps a bit complicated. Do we really have
the editors/pagers to take specific command line arguments? IMHO they only
have to take one or more file names as arguments.
Anyways, I thought that this is already covered in our Policy but I
haven't found it. We should definitely add a section about it.
Thanks,
Chris
- -- Christian Schwarz
schwarz@monet.m.isar.de, schwarz@debian.org,
Don't know Perl? schwarz@mathematik.tu-muenchen.de, bm955877@muenchen.org
Visit PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA
http://www.perl.com http://fatman.mathematik.tu-muenchen.de/~schwarz/
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1
iQCVAwUBMykYl04c72jvRVaFAQFZowQArmUOa2G0NMB/cFyTb++Q8WWI/o2tz6Ta
6zpo10UNijUbzbOh/56Olx6O0lbBP07fQJSBnfMuGOplgPQTPpB2ClWVaY8ZkjhU
uOe6RSLeByF6aoBtRakGcAfWyvYi0kb4n8b2GauL4n4nPVgSGblwt6IIAcvHSEVh
K2V+HhsahBc=
=XOtC
-----END PGP SIGNATURE-----
Reply to: