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

Re: sensible-editor and stuff

This is a followup for bug :

>> Those 3 bugs: #280279, #285797 and #289591
>> I'm still investigating why sensible-editor is always spawning
>> vi
>> instead of nano which is the first choice in this
>> sensible-editor.
>> Well after some investigating i saw this in the manpage of
>> bash:
>> In sensible-editor script you find the following construct:
>> ${EDITOR:-editor} "$@"
>> When editor is not set the default editor will started and from
>> the
>> manpage of bash: "If EDITOR or FCEDIT is not set, vi will be
>> used."

This is a bashism interpretation, sensible-editor use /bin/sh which for me
(dash) has "ed" has the FCEDIT default value. Which have nothing
to do here as EDITOR is always defined ( ${EDITOR:-editor} define
EDITOR to /usr/bin/editor if EDITOR is not defined. Only if
/usr/bin/editor is missing (may it happens ? maybe during first
install ...), EDITOR is set to /usr/bin/nano ...

As an example having dash as the shell sensible-editor does not
fire up "ed" but /usr/bin/editor . If i change it to nano ,
without env EDITOR being defined i got nano firing up.

This is a "general" bug as vim set its alternative level to the higgest
(120) though it should not be the preferred editor by default
(due to its requirement of advanced knowledge). A lot of newest
editor seems to have followed this alternative level inflation
(mostly vi derivatives) from 40 for easy to use editors to above
 100 for advanced ones ... 

If this goes on i upload my pet editor with 9.99^999 in the hope
that it ends up the issue of who has the biggest :)

>> So i think this is nog our problem and should be reassigned to
>> debianutils

We have an internal childish fight for the one which handle
editor. As this is not a technical issue (we want newbies to be
able to use debian) it needs to be arbitrated.
I am thus forwarding it to debian-devel to feed the usual trolls
and maybe have someone interested enough to produce rationale enough
 arguments to reach consensus .

To illustrate my /var/lib/dpkg/alternatives/editor is:



Why vim and elvisnox are 120 i have no idea ... they should be
around 0 like emacs21, nvi ...
I wonder how we got from ae being the default editor to vi ...
have user improved this much since potato ?

Maybe we should define max and min for categories : 
- advanced <0 : ed
- medium  0 - x : joe , vi and emacs derivative (jmacs, jstars - elvis* ,
- beginner > x  : nano , mcedit , pico derivatives ... (and maybe
  medium derivatives if they show basics commands for the
newbies via marcos ...), jed

'x' seems to have been 40, though joe and derivatives (jmacs,
jstars) and especially vim and elvisnox breaks this.
100 for mcedit-debian may be a bit too high too , it is not that
easier than the others than that :->

PS: nedit is an gui/x11 only editor , maybe adding an x-editor
for them (gedit ..) would be more appropriate (as is does for

PS2: i found out debian-project and send it there first. It seems
more appropriate for such a flaming issue.


Reply to: