* [gentoo-dev] gentoo text editors
@ 2003-09-10 8:38 Matthew Kennedy
2003-09-10 9:12 ` Seemant Kulleen
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Kennedy @ 2003-09-10 8:38 UTC (permalink / raw
To: gentoo-dev
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
--
Matthew Kennedy
Gentoo Linux Developer
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
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
0 siblings, 1 reply; 11+ messages in thread
From: Seemant Kulleen @ 2003-09-10 9:12 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
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.
Thanks,
--
Seemant Kulleen
Developer and Project Co-ordinator,
Gentoo Linux http://dev.gentoo.org/~seemant
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x3458780E
Key fingerprint = 23A9 7CB5 9BBB 4F8D 549B 6593 EDA2 65D8 3458 780E
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-10 9:12 ` Seemant Kulleen
@ 2003-09-11 1:07 ` Matthew Kennedy
2003-09-11 2:08 ` Brian Friday
2003-09-11 4:13 ` C. Brewer
0 siblings, 2 replies; 11+ messages in thread
From: Matthew Kennedy @ 2003-09-11 1:07 UTC (permalink / raw
To: gentoo-dev
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 1:07 ` Matthew Kennedy
@ 2003-09-11 2:08 ` Brian Friday
2003-09-11 2:25 ` Brian Friday
2003-09-11 8:44 ` Matthew Kennedy
2003-09-11 4:13 ` C. Brewer
1 sibling, 2 replies; 11+ messages in thread
From: Brian Friday @ 2003-09-11 2:08 UTC (permalink / raw
To: gentoo-dev
Matthew Kennedy wrote:
>
> 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.
>
Redhat implements something similar for their bundled MTA's
and just like above you just change the "mta" to be your
favorite. All the applications which call sendmail are now
routed to sendmail.exim or sendmail.postfix. This type of
setup is an elegant way of allowing the user to choose the
tool they want. Though it could take a bit of legwork to
find all the places this type of change would work best.
In one sense I see this as being very much like SLOT in
portage right now (at least as I understand slot as a user)
but this specific idea while similar goes further than slot
in some ways and not as far as others. In a, I don't
maintain portage so don't know how hard this might be to
implement brainstorm, maybe enhancing SLOT or the idea
behind it to do the following. If two ebuilds which deploy
similar applications are called for and they block each
other (ie I try to install postfix when exim or qmail are
already installed). The portage system automatically engages
"SWITCH" which would then setup the applications to have the
symlink structure like shown above.
Of course this only works in situations where a block has
been identified by developers but perhaps (again thinking
way ahead) doing a scan after the package has been imaged
(ie /var/tmp/portage/pkgname/image) but before it is merged.
To keep things gentoo-ish we could leverage portage and make
a "switch" area like:
/etc/switch/net-mail/postfix
/etc/switch/net-mail/exim
/etc/switch/app-editor/emacs
/etc/switch/app-editor/vi
my 2cents
- Brian
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
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
1 sibling, 1 reply; 11+ messages in thread
From: Brian Friday @ 2003-09-11 2:25 UTC (permalink / raw
To: gentoo-dev
Holy never finished the thought batman! Teaches me to spell
check before I finish...
---
Of course this only works in situations where a block has
been identified by developers but perhaps (again thinking
way ahead) doing a scan after the package has been imaged
(ie /var/tmp/portage/pkgname/image) but before it is
merged. This scan would check to make sure we won't be
overwriting an application/file with this new ebuild that
isn't an upgrade or downgrade of the package being built.
---
the full 2cents
- Brian
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 2:25 ` Brian Friday
@ 2003-09-11 3:54 ` Marius Mauch
0 siblings, 0 replies; 11+ messages in thread
From: Marius Mauch @ 2003-09-11 3:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
On 09/10/03 Brian Friday wrote:
>
> Holy never finished the thought batman! Teaches me to spell
> check before I finish...
>
> ---
> Of course this only works in situations where a block has
> been identified by developers but perhaps (again thinking
> way ahead) doing a scan after the package has been imaged
> (ie /var/tmp/portage/pkgname/image) but before it is
> merged. This scan would check to make sure we won't be
> overwriting an application/file with this new ebuild that
> isn't an upgrade or downgrade of the package being built.
That's exactly what I'm currently working on, I hope once it is finished
and integrated into portage it will reduce the number of
file collision bugs to near zero.
Also I don't think you mean SLOTs but virtual dependencies like
virtual/mta as SLOTs are package-internal.
For the editor problem I think we can just install a simple wrapper
script that calls $EDITOR, it has the advantage that the default editor
can be changed in one place and needs no change for things that can use
$EDITOR directly.
Marius
--
Public Key at http://www.genone.de/info/gpg-key.pub
In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 1:07 ` Matthew Kennedy
2003-09-11 2:08 ` Brian Friday
@ 2003-09-11 4:13 ` C. Brewer
2003-09-11 7:54 ` donnie berkholz
2003-09-11 8:39 ` Matthew Kennedy
1 sibling, 2 replies; 11+ messages in thread
From: C. Brewer @ 2003-09-11 4:13 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
On Wed, 10 Sep 2003 20:07:36 -0500
Matthew Kennedy <mkennedy@gentoo.org> wrote:
> >> 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
Rather than make Gentoo more like Debian-like (ick!), wouldn't it be simpler
to set the ebuild for clisp to /usr/bin/editor and have src_unpack do a
ln -s $EDITOR /usr/bin/editor, which would give a specific editor while
leaving the $EDITOR variable alone? I think that if we are gonna just absorb
Debian setups, it would be just easier and faster in the long run to port
portage over to Debian and have the ebuilds modify src.debs to build, and
just about kill the need for a distfiles server.
I'm not trying to anger anyone with this, but when you starting picking up
good stuff from other places, chances are you will pick up their
shortcomings as well.
--
Chuck Brewer
Registered Linux User #284015
Get my gpg public key at pgp.mit.edu!! Encrypted e-mail preferred.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
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
1 sibling, 1 reply; 11+ messages in thread
From: donnie berkholz @ 2003-09-11 7:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Thu, 2003-09-11 at 00:13, C. Brewer wrote:
> On Wed, 10 Sep 2003 20:07:36 -0500
> Rather than make Gentoo more like Debian-like (ick!), wouldn't it be simpler
> to set the ebuild for clisp to /usr/bin/editor and have src_unpack do a
> ln -s $EDITOR /usr/bin/editor, which would give a specific editor while
> leaving the $EDITOR variable alone?
What if I happen to emerge emacs because I want to learn how to use it,
but would prefer that my default editor remain nano? Things like that
shouldn't change just because I emerged emacs.
Besides, I see it as quite Gentoo-like, given our history of *-config
utilities (java-config, gcc-config). It might make sense to have an
optional front end to all of them, so one just needs to remember
sys-config, and from there select various options (java, gcc, editor,
etc.).
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 4:13 ` C. Brewer
2003-09-11 7:54 ` donnie berkholz
@ 2003-09-11 8:39 ` Matthew Kennedy
1 sibling, 0 replies; 11+ messages in thread
From: Matthew Kennedy @ 2003-09-11 8:39 UTC (permalink / raw
To: gentoo-dev
"C. Brewer" <cbrewer@stealthaccess.net> writes:
> Rather than make Gentoo more like Debian-like (ick!), wouldn't it be simpler
> to set the ebuild for clisp to /usr/bin/editor and have src_unpack do a
> ln -s $EDITOR /usr/bin/editor, which would give a specific editor while
I dunno... doesn't seem like an elegant solution to me.
> I'm not trying to anger anyone with this, but when you starting picking up
> good stuff from other places, chances are you will pick up their
> shortcomings as well.
I'm interested in what those short coming might be. I think I may
find time in the next few days to scope what it might take to port
the alternatives system to Gentoo.
Matt
--
Matthew Kennedy
Gentoo Linux Developer
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 2:08 ` Brian Friday
2003-09-11 2:25 ` Brian Friday
@ 2003-09-11 8:44 ` Matthew Kennedy
1 sibling, 0 replies; 11+ messages in thread
From: Matthew Kennedy @ 2003-09-11 8:44 UTC (permalink / raw
To: gentoo-dev
Brian Friday <bfriday@lasierra.edu> writes:
> Matthew Kennedy wrote:
>> 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.
>>
>
> Redhat implements something similar for their bundled MTA's and just
> /etc/switch/net-mail/postfix
> /etc/switch/net-mail/exim
> /etc/switch/app-editor/emacs
> /etc/switch/app-editor/vi
I like this per category approach.
Also I forgot to mention, in Debian's /etc/alternatives system, the
are able to cope with groups of alternatives... for example (and I
know java-config does this already), if you switch from sun's java
compiler to to, say, IBM's then naturally, the others JDK tools such
as the corba server and RMI compiler should also change with it.
It seems like a pretty capable system to me.
Matt
--
Matthew Kennedy
Gentoo Linux Developer
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] gentoo text editors
2003-09-11 7:54 ` donnie berkholz
@ 2003-09-11 18:06 ` C. Brewer
0 siblings, 0 replies; 11+ messages in thread
From: C. Brewer @ 2003-09-11 18:06 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
On Thu, 11 Sep 2003 03:54:00 -0400
donnie berkholz <spyderous@gentoo.org> wrote:
> What if I happen to emerge emacs because I want to learn how to use it,
> but would prefer that my default editor remain nano? Things like that
> shouldn't change just because I emerged emacs.
>
> Besides, I see it as quite Gentoo-like, given our history of *-config
> utilities (java-config, gcc-config). It might make sense to have an
> optional front end to all of them, so one just needs to remember
> sys-config, and from there select various options (java, gcc, editor,
> etc.).
Since the individual editors don't set the $EDITOR value, you could emerge
emacs, vi, vim, elvis, pico, etc.,and as long as EDITOR in /etc/rc.conf
still points to /bin/nano, it wouldn't matter. In fact, I'm sure someone
could whip up something that even checked the value in rc.conf and adjusted
the link accordingly. I'm not against an optional front end, or an optional
/etc/alternatives, with the key being optional. Currently when I feel like
dealing with that, I roll my chair over 3 feet to the Debian box. i realize
that it might help alot of people and have no wish to hinder such a effort,
as long as the tools are provided, not forced:)
--
Chuck Brewer
Registered Linux User #284015
Get my gpg public key at pgp.mit.edu!! Encrypted e-mail preferred.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-09-11 18:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox