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#25478: 26.0.50; No hooks are called when auto-saving Date: Fri, 28 Apr 2017 12:27:19 +0300 Message-ID: <83mvb0naq0.fsf@gnu.org> References: <837f5q6rxq.fsf@gnu.org> <83wpbb98rc.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1493371756 20786 195.159.176.226 (28 Apr 2017 09:29:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Apr 2017 09:29:16 +0000 (UTC) Cc: 25478@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 28 11:29:11 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 1d42D7-0005Fd-Hp for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Apr 2017 11:29:10 +0200 Original-Received: from localhost ([::1]:36026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d42DA-0006Av-5l for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Apr 2017 05:29:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d42D4-0006Ae-92 for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2017 05:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d42D0-0001i6-3q for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2017 05:29:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d42Cz-0001i2-Vx for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2017 05:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d42Cz-00065Q-NG for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2017 05:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Apr 2017 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25478-submit@debbugs.gnu.org id=B25478.149337168423328 (code B ref 25478); Fri, 28 Apr 2017 09:29:01 +0000 Original-Received: (at 25478) by debbugs.gnu.org; 28 Apr 2017 09:28:04 +0000 Original-Received: from localhost ([127.0.0.1]:43592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d42C4-00064C-9g for submit@debbugs.gnu.org; Fri, 28 Apr 2017 05:28:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d42C2-00063i-AG for 25478@debbugs.gnu.org; Fri, 28 Apr 2017 05:28:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d42Bt-0001Oj-O1 for 25478@debbugs.gnu.org; Fri, 28 Apr 2017 05:27:57 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d42Bt-0001Of-Jj; Fri, 28 Apr 2017 05:27:53 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2702 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d42Bs-0002Uu-Oe; Fri, 28 Apr 2017 05:27:53 -0400 In-reply-to: (message from Philipp Stephani on Sat, 22 Apr 2017 19:01:50 +0000) 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:132073 Archived-At: > From: Philipp Stephani > Date: Sat, 22 Apr 2017 19:01:50 +0000 > Cc: rgm@gnu.org, 25478@debbugs.gnu.org > > Here's a patch. Thanks. A few minor comments: > --- a/doc/emacs/files.texi > +++ b/doc/emacs/files.texi > @@ -1040,14 +1040,13 @@ Auto Save Files > this happens, save the buffer with @kbd{C-x C-s}, or use @kbd{C-u 1 M-x > auto-save-mode}. > > -@vindex auto-save-visited-file-name > +@vindex auto-save-visited-mode I wonder whether auto-save-files-mode is a better name, as the "visited" part looks now out of place. (If you do rename it, please also rename the time-interval variable accordingly.) > +in a separate auto-save file, enable the global minor mode > +@code{auto-save-visited-mode}. In this mode, auto-saving is very > +similar to explicit saving. "Very similar" begs the question "what's the difference?" If there are differences, let's describe them; if there aren't, let's say "identical to" or "the same as". > Note that this mode is orthogonal to the > +@code{auto-save} mode described above; you can enable both at the same > +time. But if auto-save mode is enabled and auto-save-visited-file-name is set, then this new mode will not auto-save, right? This should be documented. > @@ -1091,6 +1090,13 @@ Auto Save Control > a while; second, it may avoid some auto-saving while you are actually > typing. > > +@vindex auto-save-visited-interval I suggest to mention this variable where you describe the new mode, since the two descriptions are several tens of lines apart. > + When @code{auto-save-visited-mode} is enabled, Emacs will auto-save > +file-visiting buffers after five seconds of idle time. You can > +customize the variable @code{auto-save-visited-interval} to change the > +idle time interval. @code{auto-save-interval} and > +@code{auto-save-timeout} have no effect on this mode. I think the last sentence should be part of the description of the mode, not of the variable. Doing so will also provide a good opportunity to mention auto-save-visited-interval. > +(defcustom auto-save-visited-interval 5 > + "Interval in seconds for `auto-save-visited-mode'. > +If `auto-save-visited-mode' is enabled, Emacs will save all > +buffers visiting a file to the visited file after it has been > +idle for `auto-save-visited-interval' seconds." > + :group 'auto-save > + :type 'number > + :set (lambda (symbol value) > + (set-default symbol value) > + (when auto-save--timer > + (timer-set-idle-time auto-save--timer value :repeat)))) Please add a :version tag to new defcustoms. > +(define-minor-mode auto-save-visited-mode > + "Toggle automatic saving to file-visiting buffers on or off. > +With a prefix argument ARG, enable regular saving of all buffers > +vising a file if ARG is positive, and disable it otherwise. ^^^^^^ A typo.