From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#26127: 26.0.50; Using file-notify-rm-watch on invalid descriptor raises invalid-function Date: Fri, 17 Mar 2017 10:31:59 +0100 Message-ID: <87inn89rlc.fsf@detlef> References: <87mvcl9u7f.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489743201 5252 195.159.176.226 (17 Mar 2017 09:33:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2017 09:33:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26127@debbugs.gnu.org To: Andreas Politz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 17 10:33:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cooFw-00008g-3C for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2017 10:33:08 +0100 Original-Received: from localhost ([::1]:47895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cooG1-0004EZ-Vh for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2017 05:33:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cooFt-0004DQ-MG for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 05:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cooFq-0006MC-1P for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 05:33:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33191) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cooFp-0006M2-Tm for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 05:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cooFp-0007UI-Ln for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 05:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Mar 2017 09:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26127 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26127-submit@debbugs.gnu.org id=B26127.148974313528729 (code B ref 26127); Fri, 17 Mar 2017 09:33:01 +0000 Original-Received: (at 26127) by debbugs.gnu.org; 17 Mar 2017 09:32:15 +0000 Original-Received: from localhost ([127.0.0.1]:59623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cooF5-0007TJ-HW for submit@debbugs.gnu.org; Fri, 17 Mar 2017 05:32:15 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cooF2-0007T1-1c for 26127@debbugs.gnu.org; Fri, 17 Mar 2017 05:32:12 -0400 Original-Received: from detlef.gmx.de ([93.209.75.8]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MSdNs-1ch8lB0Kjk-00RayV; Fri, 17 Mar 2017 10:32:01 +0100 In-Reply-To: <87mvcl9u7f.fsf@luca> (Andreas Politz's message of "Thu, 16 Mar 2017 15:23:16 +0100") X-Provags-ID: V03:K0:7cXbXdZbszeStkWXeQFYO1oQZV8J+4on111iyTC0sKO+fu18zgC Nj1TALW67UOxCLWApH7b2QDxESbSUEB5IMuimQ8iglZ5tKPMP74lJkqC0RhfjNMNAiPLPbi rL0ygV5ogsSqyE0Nbvsv4w7b5HUqpNPp9cMuBFAnQMoFpLQYZD8FkoV7WTnvzdOtaJK5g8a U+KffOCfmUGZncsYneUMg== X-UI-Out-Filterresults: notjunk:1;V01:K0:z+WYnE6i1Ug=:yZgGsa4l+WNUcodi9kuD8H IwMhQF6SnqRjuocqTuRQkyVBP0Hdee2jvXZ8RCg7UeufAnftx+2mstg1sj++EqPWdmf86LAuh 1xcR8UO/0evUvyVreH8tzDKkqzafremTvJX/qFZgyPlHIp1U9Xfu3hF2MjmTej/IfRY/FVqSx cAmGsQxzNy312REGr7eGvYOAfN0Z5sK/koxi5+TroYf1+UfGatNZPC8uc7kUekBdJlybZilam 2jraJlPnCm1SR4bAthI+iFhB5VVVW+TYFJ6O318zI2NeOE6XYz7ZY9qUYkIt3CaH0HJOSjKV2 GUYDV7vfKs6sg6laO46zFMzsG5skDqVxA20t+/JdbNhy+e+Eb9uRDmWNQqmWiUMt7dCUHEwgA kHHX60RtjoEcZWRKA/cns8AwVWaQuFlegS3+K1uh/RMGx74vNaHr+0nJKf9DKTSJ7SpGmbR17 vBAzGa9TittzO4xqKxLFFp+T0j9ayLYhwmWLxbM8iOtLf8wkFfcY48ruW00rwvSWzuCXmS8pm dDxEXbQtvWHM2XOjBmPvBFsqMSoclag4MCjPv/R4O6X4GAfJR9FV1Lvt6Cf8hkTdLWLMVB0Il LzRfOm1Uk3e9SPtbzsqbOH03Zoo63yH0mgQHRjxO9HlQs6OQcpUXB8BF8h8QPLGlcNktUTvby 1JJCcBDSglwFj/dq9GJjgQXwFE1USq80URys0cZ9Zgn1jujT1LLm/PPmjK3uMCMTo566W7LmD QDw0voIRj2MUmKmSQNHFL4aOgbyhizxgnH0Vf1hufpMhj/OvIBp0go7ITN20w59OXmRvYkCw X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130668 Archived-At: Andreas Politz writes: Hi Andreas, Thanks for the bug report! > Calling file-notify-rm-watch on an invalid descriptor may throw a > invalid-function error, but it should throw a file-notify-error instead. `file-notify-error' shall appear only from `file-notify-add-watch'. `file-notify-rm-watch' shall not raise an error at all. > For example, this may occur when calling the function multiple times on > the same descriptor. > > The error stems from file-notify--rm-descriptor, which contains the expression > > (funcall > (cdr (assoc file (cdr registered))) > `(,descriptor stopped ,(if file (expand-file-name file dir) > dir))) > > , but (assoc file (cdr registered)) is nil. I think this error is > confusing. I've fixed this in the master branch; there shouldn't be an error anymore. > Attached you'll find a test case for this. Thanks also for this. I've added it, modified, to filenotify-tests.el. > -ap Best regards, Michael.