gnu-emacs-sources
[Top][All Lists]
Advanced

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

Re: package.el 0.1 - simple package manager


From: Michael Olson
Subject: Re: package.el 0.1 - simple package manager
Date: Thu, 15 Mar 2007 18:23:37 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.94 (gnu/linux)

Tom Tromey <address@hidden> writes:

> Please try it out and send feedback -- not just about bugs but also
> the advisability of this idea, advice for getting it into Emacs
> proper, feature requests, etc.

I'm very interested in seeing something like this become a standard
way of telling users how to install an Emacs Lisp program.  I may
start making package definitions for Muse, EMMS, ERC, and Planner at
some point.

One concern that I have is with the format of archive-contents.el.
Better, I think, would be to call it just "archive-contents" and have
its contents be of the form:

;;; -*- Emacs-Lisp -*-
;; This is the data file for package.el.
;; Its contents are of the form:
;;
;;   (package-name . <description of rest of structure goes here>)

((bubbles . [(0 3) nil nil "Bubbles (same game) puzzle" nil])
 (newsticker . [(1 10) nil nil "Headline news ticker" nil])
 )

Then, `package-read-archive-contents' could be:

(defun package-read-archive-contents ()
  "Re-read archive-contents, if it exists."
  (setq package-archive-contents
        (car (read-from-string (with-temp-buffer
                                 (insert-file-contents-literally
                                  (concat (file-name-as-directory
                                           package-user-dir)
                                          "archive-contents"))
                                 (buffer-string))))))

This separates data from a code a bit more cleanly, in my opinion.

Also, for activation, it might be best to encourage program authors to
include just the name of a function instead of its body, load the file
named <package-name>.el, and run that function.

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net
  /` |\ | | | Projects: Emacs, Muse, ERC, EMMS, Planner, ErBot, DVC
 |_] | \| |_| Reclaim your digital rights by eliminating DRM.
      See http://www.defectivebydesign.org/what_is_drm for details.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]