GNU bug report logs -
#25460
26.0.50; Documentation request: Save/write hooks and autosave
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Mon, 16 Jan 2017 18:11:01 UTC
Severity: wishlist
Found in version 26.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 25460-done <at> debbugs.gnu.org (full text, mbox):
> From: Philipp Stephani <p.stephani2 <at> 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.
This bug report was last modified 8 years and 125 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.