David Bakhash writes:
> I was wondering what people would think of a smarter `save-buffer'
> function. I was thinking that, if a file has been auto-saved since
> the last time it was edited, then C-s (save-buffer) should maybe save
> by renaming the auto-save file to the file itself.
This would only work if the buffer has not changed since it has last
been auto-saved. If there have been any changes since, then we need
to do the real save.
Also, if the `write-contents-hooks' makes modifications, then we will
And finally, if the auto-save file is on a different partition than
the actual file, moving the auto-save file is no cheaper than doing
the save itself.
This last issue is realistic. I use the `auto-save' package, so
all my autosave files are on local disk.
> That would be faster, right? (especially for our VM folders :-)
 Once people find out about this package, they usually jump to it.
The package puts all the autosave files in the same directory.
It gives you the function `recover-all-files' for after a crash.
Also, if you have a slow network, make the auto-save-directory a