Code Monkey home page Code Monkey logo

dot-emacs's Introduction

https://github.com/yewton/.emacs.d に移行しました。

これはなに?

yewton.emacs.d です。

必要なもの

  • GNU Emacs - 24.4.x が必要です
    • Mac の場合は brew install emacs --with-glib --with-gnutls --with-imagemagick でインストールするとよいです brew linkapps を忘れずに。
  • C/Migemo — KaoriYa - 日本語をローマ字で検索する
  • GNU Aspell - スペルチェッカ

以下は依存パッケージのビルドに必要です。

  • automake
  • cvs
  • git
  • python

使い方

共通

このリポジトリをクローンします。

gitsubmodule で管理しているモノもあるので、 --recursive を使えるなら使いましょう。 使えない場合は git submodule initgit 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 として、以下の様なシェルスクリプトを置いてください:

#!/bin/sh
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"

例えば、It’s All Text! などにこのアプリケーションを指定すると、 すでに起動している Emacs の frame で、あるいは新しく Emacs を起動して編集することが出来ます。

また、以下の様なシェルスクリプトを作って VISUAL に指定しておけば、 ターミナルからの編集作業( sudo -e とか)にも利用することが出来ます。

#!/bin/sh
set -e

if [ "$#" -eq 0 ]; then
        # Emacs doesn't activate itself when there's no filename.
        /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 が動かないので注意しましょう(参考)。

for Linux

色々やりようはあると思いますが、一例としてショートカットを使うことにします。

/usr/bin/emacs24 -q --debug-init -l ~/yewton.emacs.d/init.el とかで動くと思います。

諸注意など

  1. 初回起動時は依存パッケージを落としたりなんだりで結構時間がかかります
  2. なんだかよくわからない理由でたまに初期化処理が止まったりします(Mac OS X だと起こりやすい?)。 なんだかよくわからないですが、Emacs のフレームをアクティブにして、 その上でマウスポインタを動かすと復帰する場合があるみたいです(参考)
  3. 予期せぬことが起こって、初期化が中途半端に終わってしまった場合などに、 el-get がバグった .loaddefs.el を生成してしまい、無限ループに陥る場合が稀にあります。 その場合は、 el-get のディレクトリ内の .loaddefs.el を消すか、 それでも直らない場合は、 clean.sh を実行してまっさらにしてから再度実行しましょう。

動作確認バージョン

  • GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.16)

参考

dot-emacs's People

Contributors

yewton avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dot-emacs's Issues

IRC 対応

  • キーワード通知
  • 過去ログ+検索
  • DCCファイル転送
  • mIRC の拡張(文字装飾)

plantuml 周りのリファイン

  • brewで入れた時のjarパスを自動で取得する
  • org-plantuml-jar-path と plantuml-jar-path と両方設定しないといけない
    • 前者は org-babel のため、後者は plantuml-mode のため

nav の導入

hg がなくてもインストールできるようにする

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.