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

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

auto saves and process buffers


From: Noah Friedman
Subject: auto saves and process buffers
Date: Fri, 22 Dec 2000 15:02:05 -0800 (PST)

Both mechanisms for auto saving are effectvely based on keyboard input:
either number of keystrokes, or if an idle time threshold has been exceeded
since the last keyboard input.

But sometimes buffers accumulate data from other sources, such as a
process.  It may be perfectly reasonable to have a shell buffer associated
with a file to create a transcript of the session.  (And not just shell
buffers, but irc clients and other network applications as well.)

Currently, if I leave a shell buffer with process activity producing output
(such as a long `make'), auto-save happens only once even if I'm gone for
several hours.

A cheesy workaround might be:

    (add-hook 'auto-save-hook
              #'(lambda ()
                  (run-at-time 10 nil
                               #'(lambda ()
                                   (setq num-nonmacro-input-events
                                         (1+ num-nonmacro-input-events))))))

But perhaps the autosave mechanism needs to run *every* auto-save-timeout
seconds of idleness, instead of just once.  To do that, I think it would
suffice to increment num_nonmacro_input_events in the function
keyboard.c:record_auto_save.  (Even though this somewhat distorts the
meaning of num_nonmacro_input_events, it doesn't seem to be used for
anything else.)



reply via email to

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