LoginSignup
3
3

More than 5 years have passed since last update.

Emacsのバッファファイルをvagrant rsync-autoに含めない

Posted at

Emacsのバッファファイルをvagrant rsync-autoから除外

Emacsでファイル編集中にセーブせずに他のファイルを開いたりすると、先ほど編集していたファイルのバッファへのシムリンクが作成されます。

vagrantでrsync-autoをしている状態でこのファイルが作成されると、このシムリンク先のバッファをrsyncしようとしてエラーが発生し、rsyncが止まってしまいます。

この状態で開発するのはさすがに厳しいものがあるので、以下のようにVagrantfileを編集してrsync-autoにEmacsが作るバッファへのシムリンクをrsync対象外に設定します。

Vagrantfile
  config.vm.synced_folder "./host/sync_dir",
                          "/guest/sync_dir",
                          create: true,
                          type: "rsync", rsync__exclude: [".vagrant/", ".#*"]


Emacsのバッファへのシムリンクは.#editing_file_nameという形式で作成されるので、rsync__excludeオプションに".#*"を追記しました。

これで安心してEmacsで作業が行えます^^

3
3
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
3
3