emacs-pms-dev
[Top][All Lists]
Advanced

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

[emacs-pms] Re: Please join mailing list about Emacs package managers


From: Guillaume Marceau
Subject: [emacs-pms] Re: Please join mailing list about Emacs package managers
Date: Fri, 24 Dec 2010 14:43:20 -0500

Thank you for inviting me to the list.

My package manager is called 'plugin.el'. It intends to cover basic
functionality of a package manager using no metadata beyond what is
already used by widespread conventions amongst the Emacs community. It
parses the version numbers from file names, it detects dependencies by
parsing the error message "Cannot open load file", and so on.

I wrote it in 2003. I haven't worked on it in years, but I would be
happy to help anyone who would like to take code and push it further.
As far as I know, plugin.el has not grown to be incompatible with the
latest version of Emacs. My .emacs still require plugin.el, and it
doesn't seem to be breaking. Your mileage may vary.


The principal functionality consist of four different functions:

plugin: meant to be called from .emacs to loads a package.

plugin-install-do: fetches and unpack packages, recursively following
dependencies, generates an autoload, then inserts a call to plugin in
.emacs.

plugin-make-autoload-file: extracts an autoload file from ###autoload
annotations.

plugin-uninstall: undoes is the effect of plugin-install-do

I am pasting the documentation below.



(defun plugin (feature-or-pair &optional disallow-partial-load)
  "Plugin is a `require' with an aggressive file search strategy.
Before loading a file, plugin adds the directory of the file
to `load-path'.  Thus the file being loaded can find its companions
files, if any.

FEATURE-OR-PAIR can also be a list of two elements.  The first element is the
symbol of the feature to load (as usual).  The second element should be
a filename to load it from.  This will bypass the search and make the loading
faster, unless loading directly from the file failed

Unless DISALLOW-PARTIAL-LOAD is non-nil, plugin will try to load an
\"-autoload\" file. This file should load the interface elements of
FEATURE, but delay the loading of its body.

When initially looking for a file, plugin looks across the load-path,
plugin-load-path and plugin-installation-dir (in this order) for :

module-name-VERSION/module-name-autoload.elc
then for module-name-VERSION/module-name-autoload.el
then for module-name-VERSION/module-name.elc
then for module-name-VERSION/module-name.el

then for module-name-autoload-VERSION.elc
then for module-name-autoload-VERSION.el
then for module-name-VERSION.elc
then for module-name-VERSION.el

then for module-name/module-name-autoload.elc
then for module-name/module-name-autoload.el
then for module-name/module-name.elc
then for module-name/module-name.el

then for module-name-autoload.elc
then for module-name-autoload.el
then for module-name.elc
then for module-name.el"





(defun plugin-install-do (feature-or-filename-or-url &optional no-interaction)
  "Install a feature according to Emacs packaging conventions.
First, if the feature cannot be found localy, `plugin-install-do' offers to
download it using the `plugin-module-downloader-methods'.  Then, it
calls `plugin' on FEATURE-OR-FILENAME-OR-URL.  If the call to plugin
fails, `plugin-install' will `plugin-install' any dependencies of
FEATURE-OR-FILENAME-OR-URLS and try to plugin
FEATURE-OR-FILENAME-OR-URL again.  Then `plugin-install-do' will try to
generate an otherwise missing autoload file from the ###autoload
annotations contained in the main file, if any.  Finally, it gives the
option of adding FEATURE-OR-FILENAME-OR-URL to the customization
variable `plugin-installed-modules' list, such that
FEATURE-OR-FILENAME-OR-URL will be loaded next time Emacs starts.
Goes ahead with asking for confirmations when NO-INTERACTION is non-nil."





(defun plugin-make-autoload-file (target-file)
  "Scan TARGET-FILE for the magic marker ###autoload, and make a fast-load file.
The name of the target file will follow the search convention of
`plugin'.  Returns the nil if not autoload annotations were found,
otherwise returns the name the autoload file."




(defun plugin-uninstall (feature &optional no-interaction)
  "Uninstalls a feature and remove its files.
Removes FEATURE from `plugin-installed-modules', unloads the feature
from memory and offer the delete all the files associated with the feature.
Goes ahead with asking for confirmations when NO-INTERACTION is non-nil."




On Sat, Dec 18, 2010 at 12:43 PM, Jonas Bernoulli <address@hidden> wrote:
> Hello,
>
> I am writing you this mail because you are currently working on a
> package manager for Emacs packages or have done so in the past.
>
> Various such package managers exist but collaboration between the
> authors has not been very intense in the past. I have created a
> mailing list that we can use to discuss and collaborate - please join!
>
> To join the list please go to:
> http://lists.nongnu.org/mailman/listinfo/emacs-pms-dev
>
>
> Best Regards,
> Jonas Bernoulli
>



reply via email to

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