How to automatically save files on lose focus in Emacs

前端 未结 5 1084
日久生厌
日久生厌 2020-12-09 16:23

Is it possible to configure Emacs, so that it saves all files when the emacs window loses focus?

5条回答
  •  Happy的楠姐
    2020-12-09 17:10

    You can use `auto-save-interval' to save every n characters you type. Mine is set to 100. So about every 2-3 lines of code, maybe?

    auto-save-interval is a variable defined in `C source code'. Its value is 100

    Documentation: *Number of input events between auto-saves. Zero means disable autosaving due to number of characters typed.

    You can customize this variable.

    This doesn't answer your original question; it's just a way to achieve something similar.

提交回复
热议问题