突っ走り書き

見せるほどのものでは..

emacsclient を使う

ターミナル上で作業しているて,急に emacs でファイルを編集したくなったとき,

  1. ターミナルで作業中に a.txt を編集したくなった
  2. ターミナルから emacs に移動
  3. a.txt を探して編集

という流れだと,ファイルを探すのが面倒.

このイライラは,emacsclient で解消できる.

;; init.el
(require 'server)
(unless (server-running-p)
  (server-start))
# .zshrc
alias e='emacsclient -n`

これで,

  1. ターミナルで作業していてファイル a.txt を編集したくなった
  2. コマンド e a.txt を実行して emacs で編集する

という手順で emacs での編集に移ることができる.