help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A *real* auto-save-mode?


From: shreevatsa
Subject: A *real* auto-save-mode?
Date: Tue, 22 Jan 2008 22:21:06 -0800 (PST)
User-agent: G2/1.0

Hello,

Emacs has an auto-save-mode, which comes useful on rare occasions such
as crashes. However, what I (and apparently, many others) would like
is a feature that automatically saves your files for you -- not to
another file but to the one your buffer is visiting, and such that you
will not be prompted to save your file on exit.

There appears to be a variable auto-save-visited-file-name which is
documented as
    "Non-nil says auto-save a buffer in the file it is visiting, when
practical.
    Normally auto-save files are written under other names."
but setting it does not make for a very usable Emacs -- each time one
tries to edit the buffer after it is (auto-)saved, one is prompted
with a
    "file changed on disk; really edit the buffer? (y, n, r, or C-h)"
message, which gets annoying. [I guess I could turn on auto-revert-
mode to fix this, but I don't want auto-revert for changes from
external sources; I only want auto-save to work.]

I have also tried
    (add-hook 'auto-save-hook 'save-buffer)
but that seems to take effect on all buffers, even completion buffers
and the minibuffer! (Why does auto-save act on these buffers anyway?)

Thanks for any advice on what to do,
Shreevatsa


reply via email to

[Prev in Thread] Current Thread [Next in Thread]