emacsclient を使うためのメモ。
Windows
- runemacs.exe のショートカットをスタートアップフォルダに置く
- init.el (昔の .emacs) に、起動時にサーバを起動するよう記述する
- 各ファイルに emacsclientw.exe を関連付ける
- emacs 単体で起動するときは emacsclientw.exe -c -a "" を起動する(ショートカットを作成する)
サーバーを起動するには以下を初期設定ファイルに書く。*1
(when (eq window-system 'w32) (when (require 'server nil t) (server-start)))
Linux
- $ systemctl --user enable --now emacs を実行して systemd に登録する
- 再起動する
- emacsclient -c -a "" で起動する。ファイル名があるときは emacsclient ファイル名 で良い。
*1:https://sekisuiseien.com/computer/10255/ を参照しました。ありがとうございました。