LoginSignup
4
5

More than 5 years have passed since last update.

git commit 時に Emacs.app を起動しない方法

Last updated at Posted at 2016-05-19

問題

Homebrew で emacs 24.5 をいれたところ、git commit 時にターミナルから Emacs.app が起動されるようになった。

毎度別アプリケーションが開くのはわずらわしいからターミナル内で済ませたい。
alias 設定して emacs たたいても emacsclient を呼ぶようにしていたが、git commit 時には効いてない模様。

解決

.gitconfig に emacs ではなく emacsclient を指定。

[core]
  editor = emacsclient

快適。

参考

MacにHomebrewでEmacsを導入&便利なエイリアスで起動速度UP

追記(2016/08/18)

上記設定だと、コミット時に revert 確認される時がある。
(ないときもあるのがよく分からない)

以下の様な設定だと解消されることを確認。
正直 emacs の設定がまだ理解しきれてないので、もう少し検証したい。
ちなみに -nw は別ウィンドウを開かずに emacs を利用するオプション。

[core]
  editor = emacs -nw
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5