How can I get emacs to save the buffer automatically every time I switch to another buffer?
(This is similar to this question, where the buffer is saved automatically when Emacs loses focus.)
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Here's what I'm using:
(defun ora-save-and-switch-buffer () (interactive) (when (and (buffer-file-name) (not (bound-and-true-p archive-subfile-mode))) (save-buffer)) (ido-switch-buffer))