GNU bug report logs -
#26126
26.0.50; file-notify-rm-watch removes arbitrary watches
Previous Next
Reported by: Andreas Politz <politza <at> hochschule-trier.de>
Date: Thu, 16 Mar 2017 14:16:02 UTC
Severity: normal
Tags: fixed
Found in version 26.0.50
Fixed in version 26.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 26126 <at> debbugs.gnu.org (full text, mbox):
Andreas Politz <politza <at> hochschule-trier.de> writes:
Hi Andreas,
> Do you remember what this comment from file-notify-callback is talking
> about ?
>
> #+BEGIN_SRC emacs-lisp
> ((memq action '(moved rename))
> ;; The kqueue rename event does not return file1 in
> ;; case a file monitor is established.
> (if (setq file1 (file-notify--event-file1-name event))
> 'renamed 'deleted))
> #+END_SRC
kqueue is the oldest of he supported native libraries. It is the only
one (IIRC), which does not return source and target file name in case of
a rename. That's why that the kqueue `rename' event is transformed into
a `deleted' event. This is what the comment is speaking about.
I admit it would be more understandable if there would be an overview of
the events and their arguments, the different libraries are sending.
> And file-notify--event-file1-name basically returns nil, if the file1
> argument of event is not a string. But this seems to contradict the
> comment, which states that file1 *is* nil, implying that the stored
> filename should be used, or not ?
The fourth slot of an event structure could be either a string (file1)
or a cookie, or nil. This is tried to check.
> -ap
Best regards, Michael.
This bug report was last modified 8 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.