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

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

Re: Reliable indication that auto-saving should not be done


From: Johan Bockgård
Subject: Re: Reliable indication that auto-saving should not be done
Date: Fri, 30 Mar 2007 13:13:48 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

"Denis Bueno" <address@hidden> writes:

> I install that function in `auto-save-hook'. However, in some buffers
> auto-saving is off (for security reasons) but my hook still gets run.
> My questions are, first of all, should the auto-save hook be run when
> auto-saving is off?

The auto-saving mechanism is global. Periodically Emacs runs the
function `do-auto-save' ("Auto-save all buffers that need it"). This
runs `auto-save-hook' once before saving the buffers.

> Secondly, if so, what is a reliable indication that auto-save is on
> (or off)?

    Variable: buffer-auto-save-file-name
     This buffer-local variable is the name of the file used for
     auto-saving the current buffer. It is `nil' if the buffer should
     not be auto-saved.

-- 
Johan Bockgård


reply via email to

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