unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: Remove all existing file notification watches from Emacs
Date: Sat, 16 Oct 2021 10:29:01 +0300	[thread overview]
Message-ID: <835ytxig1u.fsf@gnu.org> (raw)
In-Reply-To: <87zgr9igqe.fsf@gmx.de> (message from Michael Albinus on Sat, 16 Oct 2021 09:14:17 +0200)

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Sat, 16 Oct 2021 09:14:17 +0200
> 
> While working on bug#51146, I found the following command useful, which
> removes all file notification watches from an Emacs instance:
> 
> --8<---------------cut here---------------start------------->8---
> (defun file-notify-rm-all-watches ()
>   "Remove all existing file notification watches from Emacs."
>   (interactive)
>   (maphash
>    (lambda (key _value)
>      (file-notify-rm-watch key))
>    file-notify-descriptors))
> --8<---------------cut here---------------end--------------->8---
> 
> The code is simple enough to avoid regressions. I'd like to add it to
> the emacs-28 branch (plus doc), any objection?

I don't necessarily object, but why is it important to have this
command in Emacs 28?  Just being useful is not enough, IMO: there are
quite a few features that have this property and are orthogonal to the
rest of the code, so allowing this addition will then beg the question
why not those others as well?



  reply	other threads:[~2021-10-16  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16  7:14 Remove all existing file notification watches from Emacs Michael Albinus
2021-10-16  7:29 ` Eli Zaretskii [this message]
2021-10-16  7:36   ` Michael Albinus
2021-10-16  7:48     ` Eli Zaretskii
2021-10-16 13:23 ` Stefan Monnier
2021-10-16 13:30   ` Michael Albinus
2021-10-16 14:09     ` Stefan Monnier
2021-10-16 14:21       ` Michael Albinus
2021-10-16 16:13         ` Michael Albinus
2021-10-16 16:34           ` Stefan Monnier
2021-10-16 14:32   ` Stefan Kangas
2021-10-16 14:35     ` Michael Albinus

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=835ytxig1u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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).