Clojure: Macの環境構築をする、の補足

昨日のエントリーの補足。

  • gitを初めて使う時
$ git clone https://github.com/flyingmachine/emacs-for-clojure .emacs.d

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

上記のように、Xcode/iOSライセンスへの同意を要求されることがあります。
その場合、下記のようにsudoを付けて実行します。

$ sudo git clone https://github.com/flyingmachine/emacs-for-clojure .emacs.d
Password: パスワードを入力


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Enterキーでライセンスが表示されます。
後は英語をしっかり読んで、画面のメッセージに従ってインストールを続行してください。

MacEmacsをダウンロードして起動しようとすると、次のメッセージが表示される場合があります。
f:id:soutoku:20151214224923p:plain

その場合、Controlキーを押しながらEmacsアイコンをクリックして[開く]か、[システム環境設定]の[セキュリティとプライバシー]の
f:id:soutoku:20151214225453p:plain
[このまま開く]ボタンを押して制限を解除します。

  • The lein executable (specified by `cider-lein-command') isn't on your exec-path

leinコマンドをPATHの通っている場所にインストールしたくない(または出来ない)場合、MacEmacsで

M-x cider-jack-in

した場合、

The lein executable (specified by `cider-lein-command') isn't on your exec-path

と表示されてCIDERが実行できません。

その場合、
/Users/ユーザ名/.emacs.d/init.el の末尾に

;; (setenv "PATH" (concat (getenv "PATH") ":leanがインストールされたディレクトリ"))
;; (setq exec-path (append exec-path '("leanがインストールされたディレクトリ")))
;; 例えば /Users/username/lein に配置した場合
(setenv "PATH" (concat (getenv "PATH") ":/Users/username"))
(setq exec-path (append exec-path '("/Users/username")))

のように、実行パスの設定を追加します。