From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25460: 26.0.50; Documentation request: Save/write hooks and autosave Date: Fri, 20 Jan 2017 11:03:18 +0200 Message-ID: <8360la6r3d.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1484903057 15509 195.159.176.226 (20 Jan 2017 09:04:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2017 09:04:17 +0000 (UTC) Cc: 25460-done@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 20 10:04:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUV78-0003Cr-J7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2017 10:04:06 +0100 Original-Received: from localhost ([::1]:53210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUV7D-0008U4-Ag for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2017 04:04:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUV77-0008TS-Gs for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 04:04:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUV74-0006Om-Di for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 04:04:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUV74-0006Og-B2 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 04:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cUV74-0005P9-2K for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 04:04:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2017 09:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 25460 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 25460@debbugs.gnu.org, eliz@gnu.org, p.stephani2@gmail.com Original-Received: via spool by 25460-done@debbugs.gnu.org id=D25460.148490301720738 (code D ref 25460); Fri, 20 Jan 2017 09:04:01 +0000 Original-Received: (at 25460-done) by debbugs.gnu.org; 20 Jan 2017 09:03:37 +0000 Original-Received: from localhost ([127.0.0.1]:36032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUV6f-0005OQ-2M for submit@debbugs.gnu.org; Fri, 20 Jan 2017 04:03:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUV6d-0005OD-8p for 25460-done@debbugs.gnu.org; Fri, 20 Jan 2017 04:03:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUV6V-0006EL-72 for 25460-done@debbugs.gnu.org; Fri, 20 Jan 2017 04:03:30 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUV6V-0006EH-4Z; Fri, 20 Jan 2017 04:03:27 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4137 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cUV6U-0003An-Gm; Fri, 20 Jan 2017 04:03:26 -0500 In-reply-to: (message from Philipp Stephani on Mon, 16 Jan 2017 19:09:58 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128269 Archived-At: > From: Philipp Stephani > 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.