Re: update-alternatives priorities for editors

2003-07-26 Thread Bob Proulx
Adam Heath wrote:
 /usr/bin/vi should be an alternative for vi-compatible editors.
 
 /usr/bin/vi should then be an alternative that is hooked into /usr/bin/editor.

But, but, but...  How does it work if /usr/bin/vi is an alternative
hooked into /usr/bin/editor?  What package would own that hook?  Just
speaking academically since I am really not proposing we change this,
would there need to be an vi-editor meta package just for the second
level of indirection?  And a similar emacs-editor meta package for
emacs.  And so on for each editor?  I think this is too much.

 Same for emacs.

Agreed on the basis of symmetry.  (And I am an emacs user.)  But from
a pragmatic standpoint I think editor should be something for the
untrained masses.

Bob


pgpIjAoK8ozzd.pgp
Description: PGP signature


Re: update-alternatives priorities for editors

2003-07-25 Thread Bob Proulx
Georg Neis wrote:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=121303
 Elvis as the standard editor (priority 120) is not very convenient. Imagine 
 a newbie thrown into elvis, and he will be lost, and cannot quit:(

 This bugreport says that the elvis package (a vi clone) uses a too
 high priority for the 'editor'-alternative (or for all
 alternatives?).

 Which changes do you propose?

As I read the original bug report and apply my own spin onto it I see
the original poster was concerned that a user invoking /usr/bin/editor
is probably not wanting either of the traditional vi or emacs editors.
They are probably a user that wants a simpler to use editor.  Perhaps
something more like 'nano' or 'ee' than like either vi or emacs.
(Note that emacs does not supply an alternative for /usr/bin/editor.)
I personally would not have had either elvis or vim supply an
alternative for /usr/bin/editor.

But elvis is only one of the bunch.  The vim program also supplies
itself as an alternative for /usr/bin/editor.  Changing elvis I do not
believe addresses that concern in any way unless vim is also
coordinated in this action.

I think there is much room for a judgement call to be made here.  I am
not sure what a good list of basic newbie editors would be appropriate
for someone that invokes editor.  Perhaps out of that list a good
priority list for the alternatives could be proposed.

As far as elvis being an alternative for /usr/bin/vi I think the
current value is fine and I would not change it.  I personally don't
like the present defaults for /usr/bin/vi.  But so much water has
passed under the bridge that changing it now would be problematic.

Bob


pgppzwbiy25dc.pgp
Description: PGP signature


Re: update-alternatives priorities for editors

2003-07-25 Thread Colin Watson
On Thu, Jul 24, 2003 at 11:00:56PM -0600, Bob Proulx wrote:
 Georg Neis wrote:
  This bugreport says that the elvis package (a vi clone) uses a too
  high priority for the 'editor'-alternative (or for all
  alternatives?).
 
  Which changes do you propose?
 
 As I read the original bug report and apply my own spin onto it I see
 the original poster was concerned that a user invoking /usr/bin/editor
 is probably not wanting either of the traditional vi or emacs editors.
 They are probably a user that wants a simpler to use editor.  Perhaps
 something more like 'nano' or 'ee' than like either vi or emacs.
 (Note that emacs does not supply an alternative for /usr/bin/editor.)
 I personally would not have had either elvis or vim supply an
 alternative for /usr/bin/editor.

/usr/bin/editor is not only something invoked directly. It's also
invoked by programs as the default editor. And, if vim is the only
editor installed on the system, it had better be the default editor for
such programs! (I set $EDITOR for my ordinary user anyway, granted, but
not for root, which uses editor for such things as visudo.)

I don't mind lowering the priority of vi clones, or whatever; but please
don't try to get them removed from the editor alternative. It's quite
sufficient to have higher-priority editors installed by default.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]




Re: update-alternatives priorities for editors

2003-07-25 Thread Michael Piefel
Am 25.07.03 um 09:21:47 schrieb Colin Watson:
 /usr/bin/editor is not only something invoked directly. It's also
 invoked by programs as the default editor.

Shouldn't that be sensible-editor?

Bye,
Mike

-- 
|=| Michael Piefel
|=| Humboldt-Universität zu Berlin
|=| Tel. (+49 30) 2093 3831




Re: update-alternatives priorities for editors

2003-07-25 Thread Colin Watson
On Fri, Jul 25, 2003 at 11:05:25AM +0200, Michael Piefel wrote:
 Am 25.07.03 um 09:21:47 schrieb Colin Watson:
  /usr/bin/editor is not only something invoked directly. It's also
  invoked by programs as the default editor.
 
 Shouldn't that be sensible-editor?

Which calls editor if $VISUAL and $EDITOR aren't set, yes.

-- 
Colin Watson  [EMAIL PROTECTED]




Re: update-alternatives priorities for editors

2003-07-25 Thread Manoj Srivastava
On Fri, 25 Jul 2003 09:21:47 +0100, Colin Watson [EMAIL PROTECTED] said: 

 /usr/bin/editor is not only something invoked directly. It's also
 invoked by programs as the default editor. And, if vim is the only
 editor installed on the system, it had better be the default editor
 for such programs! 

Is that not an argument for emacs also providing
 /usr/bin/editor alternatives, since emacs may be the sole editor on
 the system?

manoj
-- 
If truth is beauty, how come no one has their hair done in the
library? Lily Tomlin
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




Re: update-alternatives priorities for editors

2003-07-25 Thread Andreas Metzler
Michael Piefel [EMAIL PROTECTED] wrote:
 Am 25.07.03 um 09:21:47 schrieb Colin Watson:
 /usr/bin/editor is not only something invoked directly. It's also
 invoked by programs as the default editor.

 Shouldn't that be sensible-editor?

No. see policy. sensible-editor is just for programs for which it is
very hard to adapt a program to make use of the EDITOR or PAGER
variables
   cu andreas




Re: update-alternatives priorities for editors

2003-07-25 Thread Colin Watson
On Fri, Jul 25, 2003 at 04:22:42AM -0500, Manoj Srivastava wrote:
 On Fri, 25 Jul 2003 09:21:47 +0100, Colin Watson [EMAIL PROTECTED] said: 
  /usr/bin/editor is not only something invoked directly. It's also
  invoked by programs as the default editor. And, if vim is the only
  editor installed on the system, it had better be the default editor
  for such programs! 
 
   Is that not an argument for emacs also providing
  /usr/bin/editor alternatives, since emacs may be the sole editor on
  the system?

Yes, I see no reason why emacs (or emacsclient or whatever - I don't use
it myself) shouldn't provide an editor alternative.

-- 
Colin Watson  [EMAIL PROTECTED]




Re: update-alternatives priorities for editors

2003-07-25 Thread Michael Piefel
Am 25.07.03 um 11:38:33 schrieb Andreas Metzler:
 No. see policy. sensible-editor is just for programs for which it is
 very hard to adapt a program to make use of the EDITOR or PAGER
 variables

Okay, so when somebody is not able to set their EDITOR variable, isn't
it quite safe to assume that they are not the people who are satisfied
with vi as their editor?

In summary: Someone said vi should be an alternative for editor, because
/usr/bin/editor is called from other programs; that suggested you can't
use vi then from there. Which isn't true, just set EDITOR. On my system,
/usr/bin/editor can be a dangling symlink, it never gets called.

Bye,
Mike

-- 
|=| Michael Piefel
|=| Humboldt-Universität zu Berlin
|=| Tel. (+49 30) 2093 3831




Re: update-alternatives priorities for editors

2003-07-25 Thread Mark Brown
On Fri, Jul 25, 2003 at 01:43:52PM +0200, Michael Piefel wrote:

 Okay, so when somebody is not able to set their EDITOR variable, isn't
 it quite safe to assume that they are not the people who are satisfied
 with vi as their editor?

It could also be that they are people who only ever uses vi and
therefore have no other editors installed on their systems.  Completely
excluding vi from the alternatives for editor isn't desparately helpful.
It may be wise to prefer other editors but that's a different matter.

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.




Re: update-alternatives priorities for editors

2003-07-25 Thread Bob Proulx
Colin Watson wrote:
 On Fri, Jul 25, 2003 at 11:05:25AM +0200, Michael Piefel wrote:
  Am 25.07.03 um 09:21:47 schrieb Colin Watson:
   /usr/bin/editor is not only something invoked directly. It's also
   invoked by programs as the default editor.
  
  Shouldn't that be sensible-editor?
 
 Which calls editor if $VISUAL and $EDITOR aren't set, yes.

Interesting that if sensible-editor fails to find $VISUAL, $EDITOR,
'editor' that it tries 'ae' and then 'vi'.  I could find no reference
to /usr/bin/ae in the package contents of any Debian package.  Does it
exist?  (I remember it being an 'ee' type of program.)  In the current
distribution it should probably call 'nano' as the first fallback.  I
will file a minor bug in a little bit about it.

Bob


pgpRd02Rr7C5d.pgp
Description: PGP signature


Re: update-alternatives priorities for editors

2003-07-25 Thread Bob Proulx
Colin Watson wrote:
 Bob Proulx wrote:
  I personally would not have had either elvis or vim supply an
  alternative for /usr/bin/editor.

 I don't mind lowering the priority of vi clones, or whatever; but please
 don't try to get them removed from the editor alternative. It's quite
 sufficient to have higher-priority editors installed by default.

Just to clarify, I am not advocating a change here.  What I meant was
that I would not have done it that way myself had I been doing it when
it was originally done.  But having been done so long ago it should
probably stay like it is.  Like many things, once broken it must
always be broken or something else breaks.

Bob


pgpTCKL3drhvp.pgp
Description: PGP signature


Re: update-alternatives priorities for editors

2003-07-25 Thread Colin Watson
On Fri, Jul 25, 2003 at 10:11:05AM -0600, Bob Proulx wrote:
 Colin Watson wrote:
  On Fri, Jul 25, 2003 at 11:05:25AM +0200, Michael Piefel wrote:
   Shouldn't that be sensible-editor?
  
  Which calls editor if $VISUAL and $EDITOR aren't set, yes.
 
 Interesting that if sensible-editor fails to find $VISUAL, $EDITOR,
 'editor' that it tries 'ae' and then 'vi'.  I could find no reference
 to /usr/bin/ae in the package contents of any Debian package.  Does it
 exist?  (I remember it being an 'ee' type of program.)

It used to exist, but was removed back in 2001; see bug #110678.

 In the current distribution it should probably call 'nano' as the
 first fallback.

That's exactly what the version in testing and unstable does.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]




Re: update-alternatives priorities for editors

2003-07-25 Thread Mario Lang
Manoj Srivastava [EMAIL PROTECTED] writes:

 On Fri, 25 Jul 2003 09:21:47 +0100, Colin Watson [EMAIL PROTECTED] said: 

 /usr/bin/editor is not only something invoked directly. It's also
 invoked by programs as the default editor. And, if vim is the only
 editor installed on the system, it had better be the default editor
 for such programs! 

   Is that not an argument for emacs also providing
  /usr/bin/editor alternatives, since emacs may be the sole editor on
  the system?

It might just not be very useful by default since Emacs usually takes quite
some time to startup, and therefore people prefer to use emacsclient
if they really set $EDITOR to something emacsish.  OTOH, for
emacsclient to work, you actually need some code in your .emacs,
like

(add-hook 'after-init-hook 'server-start)

P.S.: Tip of the day

(add-hook 'server-done-hook
  (lambda ()
(shell-command screen -r -X select `cat 
~/tmp/emacsclient-caller`)))

-- 
CYa,
  Mario




Re: update-alternatives priorities for editors

2003-07-25 Thread Adam Heath
On Thu, 24 Jul 2003, Bob Proulx wrote:

 As I read the original bug report and apply my own spin onto it I see
 the original poster was concerned that a user invoking /usr/bin/editor
 is probably not wanting either of the traditional vi or emacs editors.
 They are probably a user that wants a simpler to use editor.  Perhaps
 something more like 'nano' or 'ee' than like either vi or emacs.
 (Note that emacs does not supply an alternative for /usr/bin/editor.)
 I personally would not have had either elvis or vim supply an
 alternative for /usr/bin/editor.

/usr/bin/vi should be an alternative for vi-compatible editors.

/usr/bin/vi should then be an alternative that is hooked into /usr/bin/editor.

Same for emacs.




Re: update-alternatives priorities for editors

2003-07-25 Thread Joey Hess
Adam Heath wrote:
 /usr/bin/vi should be an alternative for vi-compatible editors.
 
 /usr/bin/vi should then be an alternative that is hooked into /usr/bin/editor.

Yeah, I've always wanted to resolve 6 levels of symlinks to get to my
editor.

-- 
see shy jo


pgpULHcwFmFrZ.pgp
Description: PGP signature