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

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

bug#25460: 26.0.50; Documentation request: Save/write hooks and autosave


From: Eli Zaretskii
Subject: bug#25460: 26.0.50; Documentation request: Save/write hooks and autosave
Date: Fri, 20 Jan 2017 11:03:18 +0200

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Mon, 16 Jan 2017 19:09:58 +0100
> 
> Please document how {before,after}-save-hook and
> write-{buffer,file}-functions relate to autosave

They don't.  These hooks are only run by basic-save-buffer.

> I noticed that even if auto-save-visited-file-name is t, autosaving
> doesn't run before-save-hook.

I added notes (on the release branch) that these hooks are only run by
save-buffer.

> The documentation should provide some guidance which hook to use
> depending on the value of auto-save-visited-file-name and on whether
> the current save operation is an auto-save or not.

It looks like you consider auto-save-visited-file-name as an option
that makes auto-saving exactly equivalent to saving the buffer.  But
that is far from reality; in fact, as I wrote elsewhere, this option
has subtle issues, so much so that I don't recommend its use at all.
If we want it to be equivalent to saving, we should reimplement it so
that auto-saving uses basic-save-buffer when this option is non-nil.
But that is probably something for a separate bug report, so I'm
closing this one.





reply via email to

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