Calling file-notify-rm-watch on an invalid descriptor may throw a invalid-function error, but it should throw a file-notify-error instead. 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. Attached you'll find a test case for this. -ap