Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Quick installation of Emacs modules?

19 views
Skip to first unread message

kj

unread,
May 15, 2012, 5:25:11 PM5/15/12
to



Suppose that you get wind of an intriguing extension toocool.el,
and you'd like to take it for a spin right away, in your current
Emacs session. Is there some handy extension (e.g.) that would
let you run something like

(get-me-right-now "toocool")

to locate toocool.el (through channels suitably vetted to avoid
unsavory code), download/install it it, and finally load toocool?
(As a bonus, the details of this process would be cached in a way
that would facilitate reproducing the current repertoire of additions
in a different system, for example, or restoring the current one
if necessary.)

I have not found anything this powerful yet. The best I've found
is Stefan Monnier's install.el, but it "only" installs a previously
downloaded *.el file (I write "only" because I'm sure that there
are plenty of corner-cases and subtleties that install.el must
handle correctly).

Is there a shorter distance between wish and reality here?

Thanks!

Jason Earl

unread,
May 15, 2012, 6:28:31 PM5/15/12
to
Emacs 24 will come complete with package.el. This allows you to add
repositories of packages (it comes with elpa.gnu.org by default) and
install by simply selecting them from a list.

I currently use it to install AucTeX and company-mode, but there are
quite a few packages available that I am itching to try. I am sure that
once Emacs 24 is actually released this is going to become a *lot* more
popular, as it really simplifies installing Emacs packages.

Jason

kj

unread,
May 15, 2012, 8:11:36 PM5/15/12
to
In <87aa19d...@notengoamigos.org> Jason Earl <je...@notengoamigos.org> writes:

>On Tue, May 15 2012, kj wrote:

>> Is there a shorter distance between wish and reality here?

>Emacs 24 will come complete with package.el. This allows you to add
>repositories of packages (it comes with elpa.gnu.org by default) and
>install by simply selecting them from a list.

Okay, as of now it looks like one cannot add any other repos; the
doc says:

;; This code supports a single package repository, ELPA.

ELPA is still tiny, though it has a few interesting-looking items
in it. Thanks for the pointer, anyway. Looking forward to Emacs
24!

Duncan Oag

unread,
May 15, 2012, 9:20:17 PM5/15/12
to
kj <no.e...@please.post> writes:
>
> Okay, as of now it looks like one cannot add any other repos; the
> doc says:
>
> ;; This code supports a single package repository, ELPA.
>
> ELPA is still tiny, though it has a few interesting-looking items
> in it. Thanks for the pointer, anyway. Looking forward to Emacs
> 24!

The version of package.el available at Marmalade supports the use of
multiple repositories. Marmalade also has a lot more packages in it
than is currently in ELPA.

http://marmalade-repo.org/

Jason Earl

unread,
May 15, 2012, 9:38:57 PM5/15/12
to
On Tue, May 15 2012, kj wrote:

> In <87aa19d...@notengoamigos.org> Jason Earl <je...@notengoamigos.org> writes:
>
>>On Tue, May 15 2012, kj wrote:
>
>>> Is there a shorter distance between wish and reality here?
>
>>Emacs 24 will come complete with package.el. This allows you to add
>>repositories of packages (it comes with elpa.gnu.org by default) and
>>install by simply selecting them from a list.
>
> Okay, as of now it looks like one cannot add any other repos; the
> doc says:
>
> ;; This code supports a single package repository, ELPA.
>
> ELPA is still tiny, though it has a few interesting-looking items
> in it. Thanks for the pointer, anyway. Looking forward to Emacs
> 24!

That's interesting, a quick perusal of the package.el source that comes
with my copy of Emacs turns up this:

;; The downloader downloads all dependent packages. By default,
;; packages come from the official GNU sources, but others may be
;; added by customizing the `package-archives' alist. Packages get
;; byte-compiled at install time.

Which seems to jibe with what I remember from lurking on emacs-devel.
Interestingly enough one of the GNU ELPA packages is load-dir which
should also help make loading random packages easier.

Jason

Stefan Monnier

unread,
May 15, 2012, 10:49:42 PM5/15/12
to
> Okay, as of now it looks like one cannot add any other repos; the
> doc says:
> ;; This code supports a single package repository, ELPA.

Not sure what definition of "now" you're using, but the above sentence
is not in Emacs-24's code, instead we have:

(defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/"))
"An alist of archives from which to fetch.
The default value points to the GNU Emacs package repository.

Each element has the form (ID . LOCATION).
ID is an archive name, as a string.
LOCATION specifies the base location for the archive.
If it starts with \"http:\", it is treated as a HTTP URL;
otherwise it should be an absolute directory name.
(Other types of URL are currently not supported.)

Only add locations that you trust, since fetching and installing
a package can run arbitrary code."
:type '(alist :key-type (string :tag "Archive name")
:value-type (string :tag "URL or directory name"))
:risky t
:group 'package
:version "24.1")

> The version of package.el available at Marmalade supports the use of
> multiple repositories. Marmalade also has a lot more packages in it

I hope any improvement they might have made was contributed back to
Emacs, so we don't fork that code unnecessarily.


Stefan

Duncan Oag

unread,
May 15, 2012, 11:34:16 PM5/15/12
to
Stefan Monnier <mon...@iro.umontreal.ca> writes:

>
> I hope any improvement they might have made was contributed back to
> Emacs, so we don't fork that code unnecessarily.
>

i don't think its a fork, just an older snapshot of the package.el in
the bzr repository. (but newer than the one available to download on the
old ELPA site http://tromey.com/elpa/). I'm not sure why Marmalade
aren't linking to the most recent package.el, some incompatibilities
with Emacs 23 maybe?

Duncan

kj

unread,
May 18, 2012, 4:08:45 PM5/18/12
to
In <jwvfwb0zvu0.fsf-mon...@gnu.org> Stefan Monnier <mon...@iro.umontreal.ca> writes:

>> Okay, as of now it looks like one cannot add any other repos; the
>> doc says:
>> ;; This code supports a single package repository, ELPA.

>Not sure what definition of "now" you're using, ...

Well, I wrote that under the apparently erroneous impression that
the version I downloaded by following the instructions given in
tromey.com/elpa/install.html was the latest/"official" version of
package.el. FWIW:

% head ~/.emacs.d/elpa/package.el
;;; package.el --- Simple package system for Emacs

;; Copyright (C) 2007, 2008, 2009 Tom Tromey <tro...@redhat.com>

;; Author: Tom Tromey <tro...@redhat.com>
;; Created: 10 Mar 2007
;; Version: 0.9
;; Keywords: tools

;; This file is not (yet) part of GNU Emacs.


(This thread inadvertently/amusingly/ironically illustrates the
situation that motivated the initial query in the first place:
using publicly available Emacs extensions can be a lot trickier
than one might think...)

Stefan Monnier

unread,
May 20, 2012, 11:30:10 AM5/20/12
to
> Well, I wrote that under the apparently erroneous impression that
> the version I downloaded by following the instructions given in
> tromey.com/elpa/install.html was the latest/"official" version of
> package.el. FWIW:

That's just an old version kept around for Emacs<24.


Stefan

kj

unread,
May 22, 2012, 2:57:02 PM5/22/12
to
Fascinating.



So how is one supposed to find the latest/"official" version?

Mark Skilbeck

unread,
May 22, 2012, 3:11:45 PM5/22/12
to kj, help-gn...@gnu.org

Stefan Monnier

unread,
May 22, 2012, 9:00:18 PM5/22/12
to
> So how is one supposed to find the latest/"official" version?

It's the one bundled with Emacs-24 (aka the one in Emacs's Bzr trunk).


Stefan
0 new messages