mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 11:08:54 +00:00
4cfde44d09
A number of issues are no longer valid due to changes to Emacs upstream.
135 lines
4.7 KiB
Text
135 lines
4.7 KiB
Text
%% MELPA
|
|
|
|
*MELPA* or *Milkypostman's ELPA* or *Milkypostman's Experimental Lisp Package Repository* if you're not into the whole brevity thing.
|
|
|
|
[ [Packages](#current-list-of-packages) ]
|
|
[ [Installing](#installing) ]
|
|
[ [Known Issues](#known-issues) ]
|
|
[ [Updating Packages](#updating-packages) ]
|
|
[ [Development](#development) ]
|
|
|
|
**Last Update:** *<%= Time.now.strftime("%Y.%m.%d %H:%M %z") %>* -- follow [@melpa_emacs on Twitter](https://twitter.com/melpa_emacs) for updates
|
|
|
|
<%
|
|
require 'json'
|
|
archive_json = JSON.parse(File.open("../archive.json").read)
|
|
|
|
headers = ["Package", "Version", "Description", "Source"]
|
|
|
|
data = archive_json.keys.sort.map do |pkgname|
|
|
versions, deps, descr, pkgtype = archive_json[pkgname]
|
|
version = versions.join('.')
|
|
pkgurl = "packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar")
|
|
recipe_url = "https://github.com/milkypostman/melpa/blob/master/recipes/#{pkgname}"
|
|
source = 'unknown'
|
|
if descr =~ /(.*?)(\s*-\*-.*?)?\s*\[source:\s*(\w+)\]\s*/
|
|
descr, source = $1, $3
|
|
end
|
|
["<a name=\"#{pkgname}\"></a>[#{pkgname}](#{pkgurl})", version, descr, "[#{source}](#{recipe_url})"]
|
|
end
|
|
|
|
colwidth = [0,0,0, 9]
|
|
|
|
data.map do |row|
|
|
row.to_enum(:each_with_index).map do |e,i|
|
|
colwidth[i] = [colwidth[i], e.length].max
|
|
end
|
|
end
|
|
%>
|
|
<%= "## Current List of #{data.size} Packages" %>
|
|
<%=
|
|
headers.to_enum(:each_with_index).map{
|
|
|h,i| h + " "*(colwidth[i]-h.length) }.join(" ")
|
|
%>
|
|
<%= colwidth.map{ |w| "-"*w }.join(" ") %>
|
|
<%=
|
|
data.map{ |row|
|
|
row.to_enum(:each_with_index).map{ |c,i|
|
|
c + " "*(colwidth[i]-c.length)
|
|
}.join(" ")
|
|
}.join("\n")
|
|
%>
|
|
|
|
|
|
## Installing
|
|
|
|
To add the repository put this before the call to `package-initialize`
|
|
in your `init.el` file.
|
|
|
|
<!-- <script src="https://gist.github.com/1679158.js"> </script> -->
|
|
|
|
(add-to-list 'package-archives
|
|
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
|
|
|
|
|
Please read about [known issues](#known-issues) below before
|
|
attempting to install multiple packages at once.
|
|
|
|
### Customizations
|
|
|
|
There is currently no way in `package.el` to exclude or include versions. So to remedy this there is a `melpa.el` package--available in MELPA--that will allow you to enable only certain packages or exclude certain packages. You can install the package manually by pasting this into yoru `*scratch*` buffer and evaluating it.
|
|
|
|
(progn
|
|
(switch-to-buffer
|
|
(url-retrieve-synchronously
|
|
"https://raw.github.com/milkypostman/melpa/master/melpa.el"))
|
|
(package-install-from-buffer (package-buffer-info) 'single))
|
|
|
|
|
|
You can then customize two variables:
|
|
|
|
`package-archive-enable-alist`
|
|
: Optional Alist of enabled packages used by `package-filter'.
|
|
The format is (ARCHIVE . PACKAGE ...), where ARCHIVE is a string
|
|
matching an archive name in `package-archives', PACKAGE is a
|
|
symbol of a package in ARCHIVE to enable.
|
|
|
|
If no ARCHIVE exists in the alist, all packages are enabled.
|
|
|
|
|
|
`package-archive-exclude-alist`
|
|
: Alist of packages excluded by `package-filter'.
|
|
The format is (ARCHIVE . PACKAGE ...), where ARCHIVE is a string
|
|
matching an archive name in `package-archives', PACKAGE is a
|
|
symbol of a package in that archive to exclude.
|
|
|
|
Any specified package is excluded regardless of the value of
|
|
`package-archive-enable-alist'
|
|
|
|
|
|
|
|
## Known Issues
|
|
|
|
**Note:** *This fix are included in the `melpa.el` package.*
|
|
|
|
There is a small bug in Emacs24's `package.el` the order for
|
|
dependencies comes out backwards for what I needed. the problem is
|
|
patched by some *advice*.
|
|
|
|
<!-- <script src="https://gist.github.com/1679232.js"> </script> -->
|
|
|
|
(defadvice package-compute-transaction
|
|
(before
|
|
package-compute-transaction-reverse (package-list requirements)
|
|
activate compile)
|
|
"reverse the requirements"
|
|
(setq requirements (reverse requirements))
|
|
(print requirements))
|
|
|
|
|
|
|
|
## Updating Packages
|
|
|
|
`package.el` now includes a mechanism to upgrade packages. After running `package-list-packages`, type *u* (mark Upgradable packages) and then *x* (eXecute the installs and deletions). When it's done installing all the packages it will ask if you want to delete the obsolete packages and so you can hit *y* (Yes).
|
|
|
|
If you run into a problem installing or upgrading, you may need to go into your `~/.emacs.d/elpa/` directory and delete packages that are installed multiple times. This can happen when the install times out (see [Known Issues](#known-issues)).
|
|
|
|
## Development
|
|
|
|
[https://github.com/milkypostman/melpa](https://github.com/milkypostman/melpa)
|
|
|
|
Contributions are welcome. Currently, the builder only supports
|
|
packages using git, subversion, mercurial, and darcs. This covers
|
|
most of the packages that I am interested in.
|
|
|
|
|