[[https://github.com/yewton/.emacs.d]] に移行しました。
これはなに? [[https://twitter.com/yewton][yewton]] の =.emacs.d= です。
必要なもの
[[http://www.gnu.org/software/emacs/][GNU Emacs]] - 24.4.x が必要です
[[http://www.kaoriya.net/software/cmigemo/][C/Migemo — KaoriYa]] - 日本語をローマ字で検索する
[[http://aspell.net/][GNU Aspell]] - スペルチェッカ
以下は依存パッケージのビルドに必要です。
automake
cvs
git
python
使い方 ** 共通 このリポジトリをクローンします。
=gitsubmodule= で管理しているモノもあるので、 =--recursive= を使えるなら使いましょう。 使えない場合は =git submodule init= 、 =git submodule update= で。
git clone --recursive https://github.com/yewton/dot-emacs.git ~/yewton.emacs.d
** for Mac OS X brew でインストールしたものとします。 そうでない場合、主に =emacsclient= の場所が違ったりすると思うので、適宜読み替えてください。
シェルスクリプトと Automator を使います。
まず、 =/usr/local/bin/myemacs= として、以下の様なシェルスクリプトを置いてください:
open -a /Applications/Emacs.app --args -q --debug-init -l ~/dot-emacs/init.el --chdir ~ "$@"
次に、Automator でアプリケーションを新規作成し、 =シェルスクリプトを実行= を選択して、以下のように書いてください:
/usr/local/bin/myemacs
これを =/Applications= に保存して、Dock にでも入れておきましょう。 ここでは =MyEmacs.app= という名前で保存したとします。
各種アプリケーションから =MyEmacs.app= を利用できるように、 Automator でアプリケーションを新規作成し、 =シェルスクリプトを実行= を選択して、以下のように書いてください:
/usr/local/bin/emacsclient -n "$1" --alternate-editor /usr/local/bin/myemacs "$1"
例えば、[[https://addons.mozilla.org/ja/firefox/addon/its-all-text/][It's All Text!]] などにこのアプリケーションを指定すると、 すでに起動している Emacs の frame で、あるいは新しく Emacs を起動して編集することが出来ます。
また、以下の様なシェルスクリプトを作って =VISUAL= に指定しておけば、 ターミナルからの編集作業( =sudo -e= とか)にも利用することが出来ます。
set -e
if [ "$#" -eq 0 ]; then
/usr/local/bin/emacsclient -c -a /usr/local/bin/myemacs &
sleep 0.1
osascript -e "tell application \"Emacs\" to activate"
wait
else /usr/local/bin/emacsclient -c -a /usr/local/bin/myemacs "$@" fi
** for Windows ショートカットを使います。
=--debug-init -l ~/yewton.emacs.d/init.el= という起動オプションつきのショートカットを作成してください。
GNU Win 32 版の TexInfo に付属の =install-info= でないと、 =el-get= が動かないので注意しましょう([[https://github.com/dimitri/el-get#installation-dependencies][参考]])。
** for Linux 色々やりようはあると思いますが、一例としてショートカットを使うことにします。
=/usr/bin/emacs24 -q --debug-init -l ~/yewton.emacs.d/init.el= とかで動くと思います。
諸注意など
動作確認バージョン
=GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.16)=
参考
[[http://emacs-jp.github.io/][Emacs JP - Emacs JP]]
[[http://uwabami.junkhub.org/log/?date=20111213][平衡点(2011-12-13)]]
[[http://d.hatena.ne.jp/debiandebian/20101122/1290371677][It's All Text with Emacs導入記録 - Computingしようぜ!]]
[[http://korewanetadesu.com/tag/mac-os-x.html][Material - Mac OS X]]