emacs-devel
[Top][All Lists]
Advanced

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

Re: Remove all existing file notification watches from Emacs


From: Eli Zaretskii
Subject: Re: Remove all existing file notification watches from Emacs
Date: Sat, 16 Oct 2021 10:29:01 +0300

> 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 via email to

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