---
title: ELPA(Emacs Lisp Package Archive) を使う
tags: []
categories: ["Dev", "IDE", "Emacs"]
date: 2010-10-02T02:35:22Z
updated: 2010-10-02T02:54:29Z
---

<p>
以下を<code>*scratch*</code>に貼り付けて<code>Ctrl+j</code>で.emacs.elがupdateされる。。
</p>
<pre class="prettyprint">
(let ((buffer (url-retrieve-synchronously "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))
</pre>
<p><code>M-x package-list-package</code>で以下のようなリストが表示される。</p>
<pre class="prettyprint">
  Package           Version   Status     Description
---------------------------------------------------------------------------------
  Save-visited-files 1.2      available  save opened files across sessions
  abacus            1.0.2     available  Abacus Calculator
  applescript-mode  20090321  available  major mode for editing AppleScript source
  archive-downloader 1.1      available  Download files from archive.org
  asciidoc          0.1       available  asciidoc text file development support
  auto-dictionary   1.0.1     available  automatic dictionary switcher for flyspell
  blank-mode        6.6       available  Minor mode to visualize blanks
  bubbles           0.5       installed  Puzzle game for Emacs.
  c-eldoc           0.6       available  helpful description of the arguments to C functions
  cal-china-x       0.6       available  Chinese calendar extras
  caps-mode         1.0       available  (minor mode) letters are inserted capitalized
  changelog-url     0.1       available  ChangeLog bugzilla buttonizer
  chess             1.96      available  Play chess in Emacs
  clojure-mode      1.7.1     available  Major mode for Clojure code
  clojure-test-mode 1.4       available  Minor mode for Clojure tests
  columnify         1.0       available  arrange lines into columns
  company           0.5       available  extensible inline text completion mechanism
  compilation-recenter-end 4  available  compilation-mode window recentre
  compile-bookmarks 0.2       available  bookmarks for compilation commands
  confluence        1.4       available  Emacs mode for interacting with confluence wikis
  css-mode          1.0       available  Major mode for editing Cascading Style Sheets
  cssh              0.7       available  clusterssh implementation for emacs
  dictionary        1.8.7     available  an interface to an RFC 2229 dictionary server
  diff-git          0.1.1     available  Git integration with diff-mode
  dired-isearch     0.3       available  isearch in Dired
  drag-stuff        0.0.3     available  Drag stuff (lines, words, region, etc...) around
  echo-pick         0.1       available  filter for echo area status messages
  elisp-depend      0.4.1     available  Parse depend libraries of elisp file.
  elk-test          0.3.2     available  Emacs Lisp testing framework
  emacs             23.1.1    installed  GNU Emacs
  emms              3.0       available  The Emacs Multimedia System
  epresent          0.1       available  Simple presentation mode for Emacs
....
</pre>
<p>インストールしたいパッケージで<code>i</code>を押して、<code>x</code>でインストール。</p>
<p><a href="http://d.hatena.ne.jp/fatrow/20100505/ubuntu_clojure_setup">Special Thanks</a></p>
