2013-08-24 10:06:45 +00:00
|
|
|
|
<h1>Getting started</h1>
|
|
|
|
|
<section>
|
|
|
|
|
<a name="installing"></a>
|
|
|
|
|
<h2>Installing</h2>
|
2014-08-08 07:51:10 +00:00
|
|
|
|
<p>
|
|
|
|
|
To add the snapshot package repository put this before the
|
|
|
|
|
call to <code>package-initialize</code> in
|
|
|
|
|
your <code>init.el</code> file.
|
|
|
|
|
</p>
|
2013-08-24 10:06:45 +00:00
|
|
|
|
|
2013-10-18 09:32:37 +00:00
|
|
|
|
<pre><code>(require 'package)
|
|
|
|
|
(add-to-list 'package-archives
|
2013-08-24 10:06:45 +00:00
|
|
|
|
'("melpa" . "http://melpa.milkbox.net/packages/") t)</code></pre>
|
|
|
|
|
|
2014-08-08 07:51:10 +00:00
|
|
|
|
<p>or to add the stable package repository, use this snippet:</p>
|
|
|
|
|
|
|
|
|
|
<pre><code>(require 'package)
|
|
|
|
|
(add-to-list 'package-archives
|
|
|
|
|
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)</code></pre>
|
|
|
|
|
|
2013-08-24 10:06:45 +00:00
|
|
|
|
<p>In Emacs < 24, you'll also need to explicitly include the GNU
|
|
|
|
|
ELPA archive, which provides important compatibility libraries like <code>cl-lib</code>:</p>
|
|
|
|
|
<pre><code>(when (< emacs-major-version 24)
|
|
|
|
|
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))</code></pre>
|
2013-09-05 08:25:04 +00:00
|
|
|
|
|
2013-08-24 10:06:45 +00:00
|
|
|
|
<h3>Customizations</h3>
|
|
|
|
|
<p>
|
2013-09-11 19:50:44 +00:00
|
|
|
|
What if you only want some of your packages to be installed
|
|
|
|
|
from MELPA, and the rest from Marmalade or elsewhere?
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
Only in the very latest Emacs snapshots is there a way to
|
|
|
|
|
exclude or include versions according to their source
|
|
|
|
|
(see <code>package-pinned-packages</code>). For all other
|
2014-03-01 13:48:54 +00:00
|
|
|
|
users, we provide a <code>package-filter.el</code> package (available
|
2013-09-11 19:50:44 +00:00
|
|
|
|
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 your <code>*scratch*</code>
|
|
|
|
|
buffer and evaluating it.
|
2013-08-24 10:06:45 +00:00
|
|
|
|
</p>
|
|
|
|
|
<pre><code>(progn
|
|
|
|
|
(switch-to-buffer
|
|
|
|
|
(url-retrieve-synchronously
|
2014-03-01 13:48:54 +00:00
|
|
|
|
"https://raw.github.com/milkypostman/package-filter/master/package-filter.el"))
|
2013-08-24 10:06:45 +00:00
|
|
|
|
(package-install-from-buffer (package-buffer-info) 'single))</code></pre>
|
2013-09-11 19:50:44 +00:00
|
|
|
|
|
2013-08-24 10:06:45 +00:00
|
|
|
|
<p>You can then customize two variables:</p>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt><code>package-archive-enable-alist</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<p>
|
|
|
|
|
Optional Alist of enabled packages used
|
|
|
|
|
by <code>package-filter</code>. The format
|
|
|
|
|
is <code>(ARCHIVE . PACKAGE ...)</code>,
|
|
|
|
|
where <code>ARCHIVE</code> is a string matching an archive
|
|
|
|
|
name in<code>package-archives</code>, <code>PACKAGE</code>
|
|
|
|
|
is a symbol of a package in <code>ARCHIVE</code> to
|
|
|
|
|
enable.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
If no <code>ARCHIVE</code> exists in the alist, all
|
|
|
|
|
packages are enabled.
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>package-archive-exclude-alist</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<p>
|
|
|
|
|
Alist of packages excluded by <code> package-filter
|
|
|
|
|
</code>. The format is <code>(ARCHIVE . PACKAGE
|
|
|
|
|
...)</code>, where <code>ARCHIVE</code> is a string
|
|
|
|
|
matching an archive name
|
|
|
|
|
in</code>package-archives</code>, <code>PACKAGE</code> is
|
|
|
|
|
a symbol of a package in that archive to exclude.</p>
|
|
|
|
|
<p>
|
|
|
|
|
Any specified package is excluded regardless of the value
|
|
|
|
|
of <code>package-archive-enable-alist</code>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<a name="known-issues"></a>
|
|
|
|
|
<h2>Known Issues</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<strong>Note:</strong> <em>These fixes are included in
|
2014-03-01 13:48:54 +00:00
|
|
|
|
the <code>package-filter.el</code> package.</em>
|
2013-08-24 10:06:45 +00:00
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
There is a small bug in Emacs24’s <code>package.el</code> such
|
|
|
|
|
that the dependency order comes out backwards. The problem is
|
|
|
|
|
patched by some <em>advice</em>.
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<pre><code> (defadvice package-compute-transaction
|
|
|
|
|
(before package-compute-transaction-reverse (package-list requirements) activate compile)
|
|
|
|
|
"reverse the requirements"
|
|
|
|
|
(setq requirements (reverse requirements))
|
|
|
|
|
(print requirements))</code></pre>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<a name="updating"></a>
|
|
|
|
|
<h2>Updating Packages</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<code>package.el</code> now includes a mechanism to upgrade
|
|
|
|
|
packages. After running <code>package-list-packages</code>,
|
|
|
|
|
type <em>U</em> (mark Upgradable packages) and then <em>x</em>
|
|
|
|
|
(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 <em>y</em> (Yes).
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
If you run into a problem installing or upgrading, you may
|
|
|
|
|
need to go into your <code>~/.emacs.d/elpa/</code> directory
|
|
|
|
|
and delete packages that are installed multiple times. This
|
|
|
|
|
can happen when the install times out.
|
|
|
|
|
</p>
|
|
|
|
|
<a name="development"></a>
|
|
|
|
|
<h2>Development</h2>
|
|
|
|
|
<p><a href="https://github.com/milkypostman/melpa">https://github.com/milkypostman/melpa</a></p>
|
|
|
|
|
<p>
|
|
|
|
|
Contributions are welcome. Currently, the builder supports
|
2014-07-07 09:56:33 +00:00
|
|
|
|
packages using git, subversion, mercurial, bzr, cvs, darcs, fossil and
|
2013-08-24 10:06:45 +00:00
|
|
|
|
emacswiki.
|
|
|
|
|
</p>
|
|
|
|
|
</section>
|