unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: A *real* auto-save-mode?
@ 2008-01-23 22:37 martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2008-01-23 22:37 UTC (permalink / raw)
  To: shreevatsa.public; +Cc: help-gnu-emacs

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

`auto-save-mode' is based on a timer.  There's no guarantee that the
timer has completed its latest round when you "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.]

Setting `auto-save-visited-file-name' can be harmful.  See, for example,

http://lists.gnu.org/archive/html/emacs-devel/2003-10/msg00306.html

and

http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-11/msg00077.html

If these threads do not convince you feel free to send a bug report.

Better yet: Help us find out why and how it doesn't work ;-)

^ permalink raw reply	[flat|nested] 5+ messages in thread
* A *real* auto-save-mode?
@ 2008-01-23  6:21 shreevatsa
  2008-01-23  8:15 ` David Kastrup
  2008-01-23 13:01 ` Rupert Swarbrick
  0 siblings, 2 replies; 5+ messages in thread
From: shreevatsa @ 2008-01-23  6:21 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-01  5:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6455.1201127795.18990.help-gnu-emacs@gnu.org>
2008-02-01  5:28 ` A *real* auto-save-mode? shreevatsa
2008-01-23 22:37 martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2008-01-23  6:21 shreevatsa
2008-01-23  8:15 ` David Kastrup
2008-01-23 13:01 ` Rupert Swarbrick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).