public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matthew Kennedy <mkennedy@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] gentoo text editors
Date: Wed, 10 Sep 2003 20:07:36 -0500	[thread overview]
Message-ID: <868yowp1yf.fsf@killr.ath.cx> (raw)
In-Reply-To: <1063185172.22714.50.camel@localhost> (Seemant Kulleen's message of "Wed, 10 Sep 2003 02:12:52 -0700")

Seemant Kulleen <seemant@gentoo.org> writes:

> On Wed, 2003-09-10 at 01:38, Matthew Kennedy wrote:
>> I know we have virtual/editor etc. but do we have a mechanism to
>> invoke the users choice in editor?
>> 
>> Not all stuff I've encountered cares about $EDITOR etc., and I ask
>> because of a recent change in dev-lisp/clisp where i needed to set a
>> specific editor.
>> 
>> Any volunteers to implement the Debian "alternatives" system?  Or
>> maybe we just want a /usr/bin/generic-editor...
>> 
>> Matt
>
> For the slightly clueless, of which I am one, can you explain both
> methods?  The /usr/bin/generic-editor in particular piques my
> interest.

Really they are the same thing in the general sense.  IIRC, Debian's
alternative system works like this (arrows are symlinks)

  /usr/bin/editor --> /etc/alternatives/editor

  /etc/alternatives/editor --> /usr/bin/emacs

Just a simple indirection, really.

The cool part is the Debian update-alternatives program.  You run it
like this:

# update-alternatives --config editor
 
There are 3 programs which provide `editor'.
 
  Selection    Command
-----------------------------------------------
*+    1        /usr/bin/nano
      2        /bin/ed
      3        /usr/bin/nvi
 
Enter to keep the default[*], or type selection number:

The "+" indicates the currently selected program. Selecting a new
choice adjusts what that symlink from /etc/alternatives/editor points
to.  This works system-wide of course.

Debian really have got this well integrated into their distro.  The
have alternatives arranged for editors, awks, ftps, infobrowsers,
pagers, telnet clients, java runtimes and sdks, etc.

I think if we really want to continue with our mantra of
customizability, we really need something like this respected portage
wide.

Matt
-- 
Matthew Kennedy
Gentoo Linux Developer

--
gentoo-dev@gentoo.org mailing list


  reply	other threads:[~2003-09-11  1:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10  8:38 [gentoo-dev] gentoo text editors Matthew Kennedy
2003-09-10  9:12 ` Seemant Kulleen
2003-09-11  1:07   ` Matthew Kennedy [this message]
2003-09-11  2:08     ` Brian Friday
2003-09-11  2:25       ` Brian Friday
2003-09-11  3:54         ` Marius Mauch
2003-09-11  8:44       ` Matthew Kennedy
2003-09-11  4:13     ` C. Brewer
2003-09-11  7:54       ` donnie berkholz
2003-09-11 18:06         ` C. Brewer
2003-09-11  8:39       ` Matthew Kennedy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868yowp1yf.fsf@killr.ath.cx \
    --to=mkennedy@gentoo.org \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox