emacs/meadow初心者。 #br #br *実行環境がmeadowかどうか判定する [#d000bf68] Linux上のemacsとWindows上のmeadowで.emacsを共有できる(同じファイルをコピーして使える)ようにするために、実行環境によって処理を分岐する場合に使う。 (if (featurep 'meadow) (meadowの処理) (そうでない処理)) #br * GNU global (gtags) [#uf0f845c] emacsを使う理由の1つが、GNU globalの存在。ほんと助かっている。感謝。ここが[[メインページ:http://www.gnu.org/software/global/global.html]] ubuntuでapt-get installして入れたがバージョンが古かったので、ソースコードをダウンロードしてインストールした。2009/10/27での最新はバージョン5.7.6。 tar zxvf global-5.7.6.tar.gz cd global-5.7.6 ./configure make sudo make install デフォルトでは /usr/local 以下にインストールされるようだ。そのまま gtags -v とかやってみるとタグを生成することがわかる。emacsで使用するのが主目的なので、site-lispにもインストール sudo cp gtags.el /usr/share/emacs/site-lisp/ #br * shellでのlsコマンドでカラーESCシーケンスを抑止 [#l9667cd8] ubuntuのemacs shellでlsコマンドでdirectory表示すると、カラーのESCシーケンスが出力されるので、.bashrcを書き換えて抑止した。 変更前。 # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then 変更後。 # enable color support of ls and also add handy aliases if [ "$TERM" != dumb ] && [ -x /usr/bin/dircolors ]; then #br または以下の2行を.emacs.elに書いてカラーESCシーケンスを有効にする。 (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) #br * Carbon emacsをターミナルから起動 [#p6e26b08] Mac OS XのCarbon emacsをターミナルから起動する場合は、~/.bash_profileに以下を書く。 # Launch Carbon emacs from console alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs' 同じウインドウに開きたい場合は以下を書く。 # Launch Carbon emacs from console alias emacs='open -a /Applications/Emacs.app/Contents/MacOS/Emacs' #br *.emacsのバイトコンパイル [#l296a232] % emacs -Q -batch -f batch-byte-compile ~/.emacs #br * MacPortsからインストール [#a6891437] sudo port install emacs-app +patches /Application/MacPorts にインストールされる。 #br *Mac OS XでCUAを使うとC-vが使えなかった [#y8ac8ae1] テキスト読み上げでC-vを使っていたせいだった。(←デフォルトじゃなくて、自分で設定したんだったかなぁ。アホw)テキスト読み上げのキーボードショートカットをオフにした。 #br * Development [#fdb064e2] [[iMacのEmacsでEmacsをデバッグした話:http://d.hatena.ne.jp/ssknot/20120304/1330868959]] * 10万行とかの大きなbufferでbeginning-of-bufferが遅い [#t4ec4b54] - (linum-mode 1) で beginning-of-bufferをすると遅い? - 以下のバージョンで確認。原因調査はしていない・・・ - (linum-mode 1) で beginning-of-bufferをすると遅い? (詳細調査はしていない・・・) - 以下のバージョンで確認。 -- 24.3.1 (i386-mingw-nt6.1.7601) -- 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) * References [#jfe78300] http://www.fan.gr.jp/~ring/doc/elisp_19/elisp-jp.html http://sakito.jp/emacs/emacs23.html#emacs22-emacs23 http://tezfm.blogspot.com/2009/11/cocoa-emacs.html http://cha.la.coocan.jp/doc/NTEmacs.html |