記事執筆時点で、apt-getで導入できるemacsは23系です
が、24系付属のelpaの快適さを知ってしまったので、もう戻りたくありません・
というわけで、なんとか24系を導入してみます
調べてみると、有志の方が用意してくれたaptのリポジトリがあるようなので利用させてもらいます。
実行すると、色々と使い方に関する情報が表示されます。
$ sudo add-apt-repository ppa:cassou/emacs You are about to add the following PPA to your system: NEWS: New builds for Emacs 24 + builds for Saucy Salamander! - emacs24 will be updated only when I change the build process or when new emacs24 versions are realeased - emacs-snapshot are updated between once a week and once every two weeks on average. These versions are created from those of Julien Danjou for Debian unstable: http://emacs.naquadah.org/. To build this PPA, I created this script: https://gist.github.com/2360655 Please report bugs to https://bugs.launchpad.net/emacs-snapshot/, but before reporting, please follow these steps that will ensure a clean installation: $ sudo apt-get update $ sudo apt-get install $ sudo apt-get purge emacs emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex apel emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg To add this PPA: $ sudo add-apt-repository ppa:cassou/emacs $ sudo apt-get update Then, for emacs-snapshot: $ sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot *Or*, for emacs24: $ sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg More info: https://launchpad.net/~cassou/+archive/emacs Press [ENTER] to continue or ctrl-c to cancel adding it
読んで、問題なれけばRET
gpg: 鍵輪「/tmp/tmpiiEcx6/secring.gpg」ができました gpg: 鍵輪「/tmp/tmpiiEcx6/pubring.gpg」ができました gpg: 鍵CEC45805をhkpからサーバーkeyserver.ubuntu.comに要求 gpg: /tmp/tmpiiEcx6/trustdb.gpg: 信用データベースができました gpg: 鍵CEC45805: 公開鍵“Launchpad PPA for Damien Cassou”を読み込みました gpg: 処理数の合計: 1 gpg: 読込み: 1 (RSA: 1) OK
準備完了です。
指示通りの手順で、emacs24を導入します。
導入
$ sudo apt-get update && sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
上記実行時になにかエラーが起こった場合(未検証)
私は特に問題がなかったものの、もし上記手順でダメだった場合
$ sudo apt-get update $ sudo apt-get install $ sudo apt-get purge emacs emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex apel emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg
をしてから、再インストール。
だめならhttps://bugs.launchpad.net/emacs-snapshot/にバグを報告
動作検証
無事終われば
$ emacs --version GNU Emacs 24.3.1 Copyright (C) 2013 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.
として確認できます。
その他
当然、自前でビルドする方法もあります。
というか、Emacs遣いとしては本来こちらが正統な方法でしょう。