emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer ba


From: Philipp Stephani
Subject: Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Date: Thu, 2 Apr 2020 11:40:45 +0200

Am Do., 2. Apr. 2020 um 11:25 Uhr schrieb Robert Pluim <address@hidden>:
>
> >>>>> On Wed,  1 Apr 2020 19:57:36 +0200, Philipp Stephani <address@hidden> 
> >>>>> said:
>
>     Philipp> * lisp/files.el (auto-save-visited-inhibit): New buffer-local
>     Philipp> variable.
>     Philipp> (auto-save-visited-mode): Use it.
>
> Could you expand on why this is needed? What's stopping you from just
> turning off auto-save-visited-mode in those buffers, either directly
> or via local variables?

auto-save-visited-mode is a global mode, it can't be turned off for
individual buffers.

>
>     Philipp>  Unlike `auto-save-mode', this mode will auto-save buffer 
> contents
>     Philipp>  to the visited files directly and will also run all save-related
>     Philipp> -hooks.  See Info node `Saving' for details of the save process."
>     Philipp> +hooks.  See Info node `Saving' for details of the save process.
>     Philipp> +Buffers in which the variable `auto-save-visted-mode' is non-nil
>
> auto-save-visited-inhibit, no?

Yep, thanks for spotting!

>
>     Philipp> +are ignored."
>     Philipp>    :group 'auto-save
>     Philipp>    :global t
>     Philipp>    (when auto-save--timer (cancel-timer auto-save--timer))
>     Philipp> @@ -441,6 +446,7 @@ auto-save-visited-mode
>     Philipp>             #'save-some-buffers :no-prompt
>     Philipp>             (lambda ()
>     Philipp>               (and buffer-file-name
>     Philipp> +                  (not auto-save-visited-inhibit)
>     Philipp>                    (not (and buffer-auto-save-file-name
>     Philipp>                              auto-save-visited-file-name))))))))
>
>     Philipp> --
>
>     Philipp> 2.26.0.rc2.310.g2932bb562d-goog
>
>
>


-- 
Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise
erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes
weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich
bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

This e-mail is confidential. If you received this communication by
mistake, please don’t forward it to anyone else, please erase all
copies and attachments, and please let me know that it has gone to the
wrong person.



reply via email to

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