Emacs に必ずインストールするアプリ

MacBook Pro を買ったので Emacs をインストールしなおした。

Emacs の設定に関することは、ググるよりも WEB+DB PRESS Vol.58 を見た方が早い。必要なことが、ほとんどまとまっている。

WEB+DB PRESS Vol.58

WEB+DB PRESS Vol.58

随時追記予定。

MacPortsEmacs を指定してコンパイル

インストール先は

アプリケーション
~/.emacs.d/lisp
設定
~/.emacs.d/conf
info
~/.emacs.d/info
その他
~/.emacs.d/etc

apel

各種 Emacs の違いを吸収するライブラリ。
SKK を使うのに必要だから。

$ emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs
$ elisp=~/.emacs.d/lisp
$ make EMACS=$emacs
$ make what-where EMACS=$emacs LISPDIR=$elisp VERSION_SPECIFIC_LISPDIR=$elisp
        # インストール先を確認
$ make install EMACS=$emacs LISPDIR=$elisp VERSION_SPECIFIC_LISPDIR=$elisp

SKK

Emacs Lisp で実装された日本語入力プログラム。
これがないと文章書けない。

(setq LISPDIR (expand-file-name (concat user-emacs-directory "lisp")))
(setq VERSION_SPECIFIC_LISPDIR
      (expand-file-name (concat user-emacs-directory "lisp")))
(setq SKK_DATA (concat user-emacs-directory "etc"))
(setq SKK_INFODIR (concat user-emacs-directory "info"))

上記の通り SKK-CFG にインストール先を設定する。

$ emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs
$ make EMACS=$emacs
$ make what-where EMACS=$emacs
        # インストール先を確認
$ make install EMACS=$emacs

C/Migemo

ローマ字のまま日本語をインクリメンタル検索するためのツール。

元々は Ruby で実装されたツールだが、Ruby 環境に依存したくなかったので、C での実装を選んだ。

--- wordbuf.c.org	2011-02-27 19:45:40.000000000 +0900
+++ wordbuf.c	2011-03-20 16:09:37.000000000 +0900
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <limits.h>
 #include "wordbuf.h"
 
 #define WORDLEN_DEF 64

途中 make に失敗したのでヘッダファイルを追加した。

$ ./configure
$ (cd src; patch wordbuf.c <wordbuf.patch)
$ cp -i ~/Library/Application\ Support/AquaSKK/SKK-JISYO.L dict
$ make osx
$ make osx-dict
$ (cd dict; make utf-8)
$ sudo make osx-install

http://gist.github.com/457761 をダウンロード。
migemo.el というファイル名で ~/.emacs.d/lisp/ にコピーする。

rcodetools

Ruby スクリプトのための支援環境。
gem でインストールした後、rcodetools.el を ~/.emacs.d/ruby/lisp にコピーする。

Mew

Emacs Lisp で実装されたメールクライアント。
もう 10年以上使ってる。

mewl などのコマンドを ~/bin にインストールするか悩んだが、そのまま /usr/local/bin にインストールした。

$ emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs
$ elisp=~/.emacs.d/lisp
$ etc=~/.emacs.d/etc
$ info=~/.emacs.d/info
$ ./configure --with-emacs=$emacs --with-elispdir=$elisp/mew --with-etcdir=$etc --infodir=$info
$ make
$ make install-el
$ make install-etc
$ make install-jinfo
$ sudo make install-bin

Lookup

Emacs 上の辞書検索インターフェイス

15年くらい前に買った辞書を今でも使ってる。

  • 広辞苑 第4版
  • 三省堂 スーパー英和・和英辞典
  • 研究者 新英和・和英中辞典

MacPorts でインストールしようとしたら emacs もインストールしようとするので、自前でインストール。*1

$ port deps lookup
Full Name: lookup @1.4-media-20110207_0
Build Dependencies:   texinfo
Library Dependencies: emacs, eblook

eblook だけでも MacPorts で入れられないかと思ったけど、もう更新されてないようだし (;_;) 全部自前で入れた。

ebeblook は、素直に configure && make install した。

$ emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs
$ elisp=~/.emacs.d/lisp
$ ./configure --with-emacs=$emacs --with-lispdir=$elisp/lookup --infodir=$info
$ make
$ make install

Session Management for Emacs

バッファのカーソル位置を覚えてくれて、次にそのファイルを開いたらカーソルをそこへ移動させてくれる。

kill-summary

キルリングの一覧から選択できるようになる。

*1:使ってるのは emacs-app