CarbonEmacsPackage/追加ライブラリのインストール手順
目次
追加ライブラリのインストール手順
「Carbon Emacs パッケージ」の Emacs は 全ファイルがアプリケーションアイコンの中に入っていて、主なディレクトリは (Emacs.app)/Contents/Resources の下に展開されています。小さなライブラリを使う場合は ファイルを site-lisp ディレクトリに置くだけで大丈夫でしょう。 メニューバーの 「Help > Carbon Emacs Package > Open Site-Lisp Directory」を 選ぶと Finder で site-lisp ディレクトリを開くことができます。
$ ls (Emacs.app)/Contents/Resources CVS English.lproj leim man var Emacs.icns etc lib share Emacs.rsrc info lisp site-lisp
インストールに configure を使うライブラリは、 次のようにオプションを指定すればいいと思います。
./configure --prefix=(Emacs.app)/Contents/Resources \ --bindir=(Emacs.app)/Contents/MacOS/bin \ --with-emacs=(Emacs.app)/Contents/MacOS/Emacs
- lispライブラリではない周辺コマンドは、パスなどを適切に設定できれば
普通に configure して /usr/local/ 以下にインストールしても大丈夫です。
- Emacs.app 内にインストールしたとしても、
リロケータブル(Emacs.app アイコンをどこに置いても動作する)になるわけではありません。
- make で --with-emacs オプションが効いていない場合もあるそうです。
その場合は、make コマンドに次のようなオプションを渡して下さい。
make [install] EMACS=(Emacs.app)/Contents/MacOS/Emacs
emacs-w3m
$ configure --with-addpath=\ /Applications/Emacs.app/Contents/Resources/site-lisp/apel:\ /Applications/Emacs.app/Contents/Resources/site-lisp/flim:\ /Applications/Emacs.app/Contents/Resources/site-lisp/emu \ --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/w3m \ --with-icondir=/Applications/Emacs.app/Contents/Resources/etc/w3m/icons \ --infodir=/Applications/Emacs.app/Contents/Resources/info \ --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs $ make $ make install $ make install-icons
goby
- EasyPackage などで netpbm をインストール
- goby-0.91 をダウンロードして解凍
- make, make install を実行
make all install ELCDIR=/Applications/Emacs.app/Contents/Resources/site-lisp/goby
- .emacs.el に次の項目を追加
(autoload 'goby "goby" nil t)
- .emacs.el に次の項目を追加(廣松さんのメニューバーパッチを当てて自分で Build している方は不要です)
(add-hook 'goby-view-mode-enter-hook 'mac-hide-menu-bar) (add-hook 'goby-view-mode-exit-hook 'mac-show-menu-bar)
- M-x goby で goby を起動する
goby 0.9 はマルチディスプレイ環境に対応していないので、「画面のミラーリングをオン」をオンにして使うと良い。
imaxima
Imaximaにインストール方法が記載されています。
ispell
パッケージには aspell が同梱されています。
関連ページ
- International Ispell - http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html
- Dictionaries - http://ficus-www.cs.ucla.edu/geoff/ispell-dictionaries.html
ライセンス
- 配布ファイル中の Conributors ファイルに GPL ではない旨の記載があります。BSDライセンス?
- http://www.gnu.org/directory/ispell.html
>Licensed under BSDAdClause.
インストール
下のようにlocal.hを書き換えて、make; make install します。
#define BINDIR "/Applications/Emacs.app/Contents/MacOS/bin" #define LIBDIR "/Applications/Emacs.app/Contents/Resources/lib/ispell" #define MAN1DIR "/Applications/Emacs.app/Contents/Resources/man/man1" #define MAN4DIR "/Applications/Emacs.app/Contents/Resources/man/man4" #define TERMLIB "-lcurses"
インストールしてみて、「辞書がない」と怒られる場合は 環境変数 ISPELLDICTDIR を LIBDIR に設定して対処。 その際、↓のようにするとリロケータブルになる。
(setenv "ISPELLDICTDIR" (concat carbon-emacs-package-prefix "/lib/ispell"))
ref: http://hp.vector.co.jp/authors/VA028080/ispell.html
- ispellで日本語まじりのテキストをチェック
.emacsに以下のように書く。
;; M-x ispell で日本語混じりのバッファでエラーが起きるのを防ぐ設定 ;; (ELF:01329) by 山岡さん ;; (eval-after-load "ispell" '(setq ispell-skip-region-alist (cons '("[^\000-\377]+") ispell-skip-region-alist)))
lookup
- http://openlab.ring.gr.jp/edict/lookup/
- http://www.interq.or.jp/mars/cherry/mac/macos-main.html から辿ったいくつかの記事。
- http://www.interq.or.jp/mars/cherry/mac/eblook-panther.html
- http://www.math.s.chiba-u.ac.jp/~matsu/emacs/emacs21/lookup.html
- cf. リスト/辞書ツール
- ebライブラリ
./configure --prefix=/Applications/Emacs.app/Contents \ --bindir=/Applications/Emacs.app/Contents/MacOS/bin make make install
- eblookup
./configure --prefix=/Applications/Emacs.app/Contents \ --bindir=/Applications/Emacs.app/Contents/MacOS/bin make make install
- lookup
./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs \ --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/lookup \ --infodir=/Applications/Emacs.app/Contents/Resources/info make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs install
- 設定など
- 起動ロゴが五月蝿い
- (setq lookup-enable-splash nil) とするらしいです。
- 起動ロゴが五月蝿い
migemo
Emacs.app内にインストールする手順。
- bsearch.rb, romkan.rb, SKK-JISYO.L を migemo-0.40のディレクトリに置く。
- configure, make
./configure --prefix=/Applications/Emacs.app/Contents/Resources \ --bindir=/Applications/Emacs.app/Contents/MacOS/bin \ --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs make make install rubydir=/Applications/Emacs.app/Contents/Resources/lib/ruby/site_ruby cp bsearch.rb /Applications/Emacs.app/Contents/Resources/lib/ruby/site_ruby cp romkan.rb /Applications/Emacs.app/Contents/Resources/lib/ruby/site_ruby cp migemo.el migemo.elc /Applications/Emacs.app/Contents/Resources/site-lisp/
- .emacs.elで下の設定を追加。
(setq migemo-command "migemo" migemo-options '("-t" "emacs" "-i" "¥a")) (setenv "RUBYLIB" "/Applications/Emacs.app/Contents/Resources/lib/ruby/site_ruby/") (require 'migemo)
mu-cite
make install \ EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs \ LISPDIR=/Applications/Emacs.app/Contents/Resources/site-lisp
./configure \ --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/navi2ch \ --with-icondir=/Applications/Emacs.app/Contents/Resources/etc/navi2ch/icons \ --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs make; make install
skk
日本語入力/かな漢字変換システム。
- http://openlab.ring.gr.jp/skk/main-ja.html から tarball を入手
- http://openlab.ring.gr.jp/skk/maintrunk/
- ddskk-*.tar.gz を解凍
tar zxvf GPL/ddskk-*.tar.gz cd ddskk-*
- 辞書ファイル(SKK-JISYO.L)を入手して、同じディレクトリに置く
export SKK_LISPDIR=/Applications/Emacs.app/Contents/Resources/site-lisp/skk \ SKK_INFODIR=/Applications/Emacs.app/Contents/Resources/info \ SKK_DATADIR=/Applications/Emacs.app/Contents/Resources/share/skk ; \ make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs \ prefix=/Applications/Emacs.app/Contents/Resources install
yatex
CarbonEmacsAndYatex を参照して下さい。
YC(Yet another Canna client)
http://www.ceres.dti.ne.jp/~knak/yc.html
Makefileを手動で
EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs elispdir = /Applications/Emacs.app/Contents/Resources/site-lisp INSTALL_PATH = /Applications/Emacs.app/Contents/MacOS/bin
と書き換える。
wanderlust (2.12.0)
shimbunをインストールするためには・・・
- インストールの順番を変えるだけで良さそう。ref: http://www.ki.nu/~makoto/diary/?0119
(setq load-path (cons "/Applications/Emacs.app/Contents/Resources/site-lisp/w3m" load-path))
をWL-CFGに追加してmake;make install したら無事インストールされるようになりました。(SaY)
psgml
./configure \ --prefix=/Applications/Emacs.app/Contents/Resources \ --bindir=/Applications/Emacs.app/Contents/MacOS/bin
生成されたMakefileを以下のように修正
lispdir = $(prefix)/site-lisp EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs
あとはmake, make install
make [install] EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs \ lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/psgml
でも良さそうですね。
HaRe
snapshot を落としてきて、Emacs のパッケージ内に入れて make (自動生成で make したディレクトリにあるリファクタリングツールにパスが通るよう editor 内に haskell-refac.el が作られるため、この方法が望ましいと思われる。)
また、configure などを使わないので、GHC をインストールの上 /usr/local/bin にパスを通したり、readline ライブラリのパスの通った状態で用意しておく必要がある。(ソースや http://wxhaskell.sourceforge.net/building-macosx.html で参照されているパッケージからインストールした場合は、この点について特に考える必要なし。 Fink から入れた場合、http://www.cse.unsw.edu.au/~sseefried/ghc_nightly.html に載っているような設定でパスを通す必要がある。)
(autoload 'haskell-refac-mode "haskell-refac" "Minor mode for refactoring Haskell programs" t) (add-hook 'haskell-mode-hook 'haskell-refac-mode)
を設定するとデフォルトで HaRe モードが起動します。
tamago
Makefileを編集
EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs lispdir = /Applications/Emacs.app/Contents/Resources/site-lisp
そのまま
sudo make install
あとは、(setq default-input-environment "Japanese")など、設定すればよいです。