2012-01-21 03:05:56 +00:00
%% MELPA
2012-04-30 21:54:04 +00:00
*MELPA* or *Milkypostman's ELPA* or *Milkypostman's Experimental Lisp Package Repository* if you're not into the whole brevity thing.
2012-01-25 17:33:47 +00:00
[ [Packages](#current-list-of-packages) ]
[ [Installing](#installing) ]
[ [Known Issues](#known-issues) ]
[ [Updating Packages](#updating-packages) ]
[ [Development](#development) ]
2012-07-26 14:36:47 +00:00
**Last Update:** *<%= Time.now.strftime("%Y.%m.%d %H:%M %z") %>* -- follow [@melpa_emacs on Twitter](https://twitter.com/melpa_emacs) for updates
2012-01-21 03:05:56 +00:00
2012-01-22 19:57:48 +00:00
<%
2012-07-25 13:01:04 +00:00
require 'json'
archive_json = JSON.parse(File.open("../archive.json").read)
2012-01-22 19:57:48 +00:00
2012-04-16 16:14:11 +00:00
headers = ["Package", "Version", "Description", "Source"]
2012-01-22 19:57:48 +00:00
2012-07-25 13:01:04 +00:00
data = archive_json.keys.sort.map do |pkgname|
versions, deps, descr, pkgtype = archive_json[pkgname]
2012-09-01 13:02:10 +00:00
version = versions.join('.')
2012-07-25 13:01:04 +00:00
pkgurl = "packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar")
2012-04-16 16:14:11 +00:00
recipe_url = "https://github.com/milkypostman/melpa/blob/master/recipes/#{pkgname}"
2012-07-25 13:01:04 +00:00
source = 'unknown'
2012-04-21 09:33:03 +00:00
if descr =~ /(.*?)(\s*-\*-.*?)?\s*\[source:\s*(\w+)\]\s*/
descr, source = $1, $3
2012-04-16 16:14:11 +00:00
end
2012-07-26 14:45:04 +00:00
["<a name=\"#{pkgname}\"></a>[#{pkgname}](#{pkgurl})", version, descr, "[#{source}](#{recipe_url})"]
2012-01-22 20:28:13 +00:00
end
2012-01-22 19:57:48 +00:00
2012-04-16 16:14:11 +00:00
colwidth = [0,0,0, 9]
2012-01-22 19:57:48 +00:00
data.map do |row|
row.to_enum(:each_with_index).map do |e,i|
colwidth[i] = [colwidth[i], e.length].max
end
end
%>
2012-05-24 11:51:56 +00:00
<%= "## Current List of #{data.size} Packages" %>
2012-01-22 19:57:48 +00:00
<%=
headers.to_enum(:each_with_index).map{
|h,i| h + " "*(colwidth[i]-h.length) }.join(" ")
2012-01-21 22:11:17 +00:00
%>
2012-01-22 19:57:48 +00:00
<%= 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")
%>
2012-01-21 03:05:56 +00:00
## Installing
To add the repository put this before the call to `package-initialize`
in your `init.el` file.
2012-01-25 23:21:24 +00:00
<!-- <script src="https://gist.github.com/1679158.js"> </script> -->
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
2012-01-21 03:05:56 +00:00
Please read about [known issues](#known-issues) below before
attempting to install multiple packages at once.
2012-01-28 04:04:33 +00:00
### Customizations
2012-03-24 16:59:20 +00:00
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.
2012-01-28 04:04:33 +00:00
(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:
2012-03-24 16:59:20 +00:00
`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'
2012-01-28 04:04:33 +00:00
2012-01-21 03:05:56 +00:00
## Known Issues
2012-11-08 19:58:19 +00:00
**Note:** *This fix are included in the `melpa.el` package.*
2012-01-21 03:05:56 +00:00
2012-11-08 19:58:19 +00:00
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*.
2012-01-25 22:42:59 +00:00
2012-01-25 23:21:24 +00:00
<!-- <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))
2012-01-25 22:42:59 +00:00
2012-01-21 03:05:56 +00:00
## Updating Packages
2012-06-22 14:43:25 +00:00
`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).
2012-01-21 03:05:56 +00:00
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.
2012-12-16 13:13:34 +00:00
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/jquery.dataTables.min.js" type="text/javascript"></script>
2012-12-16 13:18:21 +00:00
<script language="javascript">
$("table").dataTable({bPaginate: false, bLengthChange: false});
$('div.dataTables_filter input').focus().attr("placeholder", "Enter filter terms");
</script>