steve@yetti.UUCP (11/30/87)
Our version of GnuEmacs (18.47) presently saves the auto-save file even when theuser specifically requests that he/she doesn't wish to save that file. Thereafter, when editing the file the message "Auto save file is newer; consider M-x recover-file" will appear. Is this what we want? Certainly other editors, notablyEDT on VMS does not save a journal file when the user wishes to not save his present file. The real purpose of auto-save files (it seems to me) is to recover afile after a system crash. We've noted two area in GnuEmacs where the auto-save file remains intact even after the user decides not to save the changes...they are: save-some-buffers kill-buffer There are likely others...any thoughts? UUCP:...!{mnetor|utzoo}!yetti!steve Bitnet: steve@yulibra :w
smith@COS.COM (Steve Smith) (12/03/87)
In article <217@yetti.UUCP> steve@yetti.UUCP writes: >Our version of GnuEmacs (18.47) presently saves the auto-save file even >when theuser specifically requests that he/she doesn't wish to save that >file. Thereafter, when editing the file the message "Auto save file is >newer; consider M-x recover-file" will appear. Is this what we want? >Certainly other editors, notablyEDT on VMS does not save a journal file >when the user wishes to not save his present file. The real purpose of >auto-save files (it seems to me) is to recover afile after a system >crash. I have had problems, also with the auto-save function. In particular, GNU does an auto-save every "n" characters, regardless of what is going on. This is extremely annoying if I am doing some hot & fast editing and suddenly everything freezes while I get an "auto save" message. The ideal way do handle auto-saving (from my point of view, of course) is to wait until the keyboard is inactive for "n" seconds. I don't think most people can maintain full speed typing for long enough to cause trouble. BTW - helpful hint. You will have less trouble sending mail and articles if you limit your lines to 80 characters. -- __ -- Steve / / \ / "Truth is stranger than S. G. Smith I \ O | _ O \ I fiction because fiction smith@cos.com / \__/ / has to make sense."
douglis@ucbvax.berkeley.edu (12/03/87)
In article <217@yetti.UUCP>, steve@yetti writes: >We've noted two area in GnuEmacs where the auto-save file remains intact even after the user decides not to save the changes...they are: > >save-some-buffers >kill-buffer > Save some buffers does not kill the buffer if the user decides not to save it; therefore, the autosave should be left around since the associated file is still being edited. Later on, the user might save the file or delete the buffer. Kill-buffer should definitely delete the autosave file (or prompt the user about it). My version of kill-buffer is: (defun kill-buffer (buffer) "Kill a buffer and remove any associated auto-save file." (interactive "bKill buffer: ") (let ((filename nil)) (if (and buffer-auto-save-file-name (recent-auto-save-p)) (if (y-or-n-p "Delete autosave file? ") (setq filename buffer-auto-save-file-name))) (kill-buffer buffer) (if filename (delete-file filename)))) -- =========== =========================== ============== Fred Douglis douglis@ginger.Berkeley.EDU ucbvax!douglis =========== =========================== ==============
jr@LF-SERVER-2.BBN.COM.UUCP (12/04/87)
>> The ideal way do handle auto-saving (from my point of view, of course) >> is to wait until the keyboard is inactive for "n" seconds. I don't >> think most people can maintain full speed typing for long enough to >> cause trouble. BBN's PEN editor had a (configurable) combination of the two techniques. After N keystrokes, the editor looked for an idle time of K1 seconds to do its auto-saving. It would also auto-save after K2 seconds since the last auto-save. There was a posting I stashed away somehwere that implemented timer-based auto-saving by hooking to display-time. If I get inspired, I might expand it to have this behavior too. This depends on the availability of subprocesses, unfortunately; the portable version probably requires source changes. /jr jr@bbn.com or jr@bbn.uucp
jk3k+@ANDREW.CMU.EDU.UUCP (12/05/87)
How about this: if you've got a buffer that's been checkpointed and not later changed, when you go to save the file, it writes it out again, even though the checkpoint file is up-to-date. Wouldn't it be easier to rename the checkpoint file? --Joe