unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Philipp Stephani <phst@google.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Date: Sun, 5 Apr 2020 11:52:16 +0200	[thread overview]
Message-ID: <CAArVCkTq7X+5tOCUd=xV1DeV+fFA24z5vM0V5SWXHy1O15BUcg@mail.gmail.com> (raw)
In-Reply-To: <83wo6yxb0s.fsf@gnu.org>

Am Do., 2. Apr. 2020 um 15:39 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Wed,  1 Apr 2020 19:57:36 +0200
> > Cc: Philipp Stephani <phst@google.com>
> >
> > +** Autosaving via 'auto-save-visited-mode' can now be inhibited using
> > +the buffer-local variable 'auto-save-visited-inhibit'.
> > +
> >
> >  * Changes in Specialized Modes and Packages in Emacs 28.1
> >
> > diff --git a/lisp/files.el b/lisp/files.el
> > index 55a0958f54..f3ea1d083f 100644
> > --- a/lisp/files.el
> > +++ b/lisp/files.el
> > @@ -425,12 +425,17 @@ auto-save-visited-interval
> >           (when auto-save--timer
> >             (timer-set-idle-time auto-save--timer value :repeat))))
> >
> > +(defvar-local auto-save-visited-inhibit nil
> > +  "If non-nil, ignore this buffer for `auto-save-visited-mode'.")
> > +
>
> Wouldn't it be better to have a local minor mode and a globalized
> minor mode, like we do in other cases?

I don't think that's possible here. We have one global timer, and with
a local minor mode we'd either need one timer per buffer or some
additional complexity to ensure that the timer is enabled if at least
one buffer has the minor mode on.
Alternatively we could have a global timer that's always on.



  parent reply	other threads:[~2020-04-05  9:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 17:57 [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis Philipp Stephani
2020-04-02  9:24 ` Robert Pluim
2020-04-02  9:40   ` Philipp Stephani
2020-04-02  9:47     ` Robert Pluim
2020-04-02  9:59       ` Štěpán Němec
2020-04-02 11:15         ` Philipp Stephani
2020-04-02 11:27           ` Štěpán Němec
2020-04-02 13:38 ` Eli Zaretskii
2020-04-02 15:22   ` Stefan Monnier
2020-04-05  9:50     ` Philipp Stephani
2020-04-05 14:18       ` Stefan Monnier
2020-04-05 15:51         ` Philipp Stephani
2020-04-05 18:49           ` Stefan Monnier
2020-04-05 19:58             ` Philipp Stephani
2020-04-08 11:43               ` Philipp Stephani
2020-04-08 12:03                 ` Eli Zaretskii
2020-04-08 12:19                   ` Philipp Stephani
2020-04-08 13:07                     ` Eli Zaretskii
2020-04-08 14:58                 ` Stefan Monnier
2020-04-11 16:57                   ` Philipp Stephani
2020-04-11 17:11                     ` Stefan Monnier
2020-05-25 19:16                       ` Philipp Stephani
2020-04-05  9:52   ` Philipp Stephani [this message]
2020-04-05 13:11     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkTq7X+5tOCUd=xV1DeV+fFA24z5vM0V5SWXHy1O15BUcg@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).