From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Remove all existing file notification watches from Emacs Date: Sat, 16 Oct 2021 10:29:01 +0300 Message-ID: <835ytxig1u.fsf@gnu.org> References: <87zgr9igqe.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 16 09:31:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbeAK-0006BN-CT for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Oct 2021 09:31:36 +0200 Original-Received: from localhost ([::1]:56598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbeAI-0000Bv-MC for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Oct 2021 03:31:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbe7r-0006kz-6H for emacs-devel@gnu.org; Sat, 16 Oct 2021 03:29:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42230) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbe7q-0008T1-Py; Sat, 16 Oct 2021 03:29:02 -0400 Original-Received: from [87.69.77.57] (port=2445 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbe7o-0006l3-PJ; Sat, 16 Oct 2021 03:29:02 -0400 In-Reply-To: <87zgr9igqe.fsf@gmx.de> (message from Michael Albinus on Sat, 16 Oct 2021 09:14:17 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277155 Archived-At: > From: Michael Albinus > 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?