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: Robert Pluim
Subject: Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Date: Thu, 02 Apr 2020 11:24:59 +0200

>>>>> 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?

    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?

    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






reply via email to

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