Is it possible to configure Emacs, so that it saves all files when the emacs window loses focus?
相关问题
- Symbol's function definition is void: declare-
- How can I set the SVN password with Emacs 23.1 bui
- Emacs shell: save commit message
- jQuery: checkbox does not lose focus (blur) [IE]
- Java: break focus cycle in jtable
相关文章
- ess-rdired: I get this error “no ESS process is as
- Emacs/xterm color annoyance on Linux
- Does learning one Lisp help in learning the other?
- Pipe less to Emacs
- Capturing the output of “diff” with org-babel
- emacs terminal mode: how to copy and paste efficie
- How to permanently enable the hs-minor-mode in ema
- Pipe emacs shell output to a new buffer
I added focus hooks to Gnu Emacs 24.4.
They are called
focus-in-hook
andfocus-out-hook
.You can add
to your .emacs file and it should save all files on loss of focus.
I use this, it will only work if emacs is running under X (like it probably would in something like ubuntu).
Not sure if this is what you want.
From: http://www.dribin.org/dave/blog/archives/2003/09/10/emacs/
EDIT: It only seems to work in XEmacs
In that case, instead of switching to the browser application, order Emacs to load the browser application (
C-c C-v
orM-x browse-url-of-buffer
). With this method, you can write your own function that saves the buffer and then brings the browser up, like:And hook it to a convenient binding.
Or you can still use the
html-autoview-mode
that each time you saves the buffer, automatically loads the file into your favorite browser.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?
This doesn't answer your original question; it's just a way to achieve something similar.