From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 22 Apr 2017 19:01:50 +0000
> Cc: rgm@gnu.org, = 25478@debbugs.gn= u.org
>
> Here's a patch.
Thanks.=C2=A0 A few minor comments:
> --- a/doc/emacs/files.texi
> +++ b/doc/emacs/files.texi
> @@ -1040,14 +1040,13 @@ Auto Save Files
>=C2=A0 this happens, save the buffer with @kbd{C-x C-s}, or use @kbd{C-= u 1 M-x
>=C2=A0 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.=C2=A0 (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}.=C2=A0 In this mode, auto-saving is ver= y
> +similar to explicit saving.
"Very similar" begs the question "what's the difference?= "=C2=A0 If there
are differences, let's describe them; if there aren't, let's sa= y
"identical to" or "the same as".
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Note that this mode is orthogonal= to the
> +@code{auto-save} mode described above; you can enable both at the sam= e
> +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?=C2=A0 This should be
documented.
> @@ -1091,6 +1090,13 @@ Auto Save Control
>=C2=A0 a while; second, it may avoid some auto-saving while you are act= ually
>=C2=A0 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.
> +=C2=A0 When @code{auto-save-visited-mode} is enabled, Emacs will auto= -save
> +file-visiting buffers after five seconds of idle time.=C2=A0 You can<= br> > +customize the variable @code{auto-save-visited-interval} to change th= e
> +idle time interval.=C2=A0 @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.=C2=A0 Doing so will also provide a good
opportunity to mention auto-save-visited-interval.
> +(defcustom auto-save-visited-interval 5
> +=C2=A0 "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."
> +=C2=A0 :group 'auto-save
> +=C2=A0 :type 'number
> +=C2=A0 :set (lambda (symbol value)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(set-default symbol value)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when auto-save--timer
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(timer-set-idle-time auto-sa= ve--timer value :repeat))))
Please add a :version tag to new defcustoms.
> +(define-minor-mode auto-save-visited-mode
> +=C2=A0 "Toggle automatic saving to file-visiting buffers on or o= ff.
> +With a prefix argument ARG, enable regular saving of all buffers
> +vising a file if ARG is positive, and disable it otherwise.
=C2=A0 =C2=A0^^^^^^
A typo.