Subject: Re: bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches

From: Michael Albinus <[email-masked]>
Date: Sat, 25 Mar 2017 19:36:53 +0100

Andreas Politz <[email-masked]> writes:

>>> (file-notify-add-watch "http://www.google.com/?s=foo" '(change) #'ignore)
>>> => File notification error: "Directory does not exist",
>>> "http://www.google.com"
>>
>> What's wrong with this? `url-handler-mode' hasn't implemented
>> `file-notify-add-watch'. 
>
> Yes, but the point is how would you ?  By restricting watches to
> directories, you are also forcing every handler to have a concept of
> such an entity and to be able to watch it; rather then the original
> "filename".

The error message says, that the upper directory of
"http://www.google.com/?s=foo", "http://www.google.com", does not
exist. This would be a problem for any file notification library. This
does not mean that the handler is forced to watch a directory only.

>>> (hypothetical-emacsfs-mode)
>
>> No problem.
>
> Let's backtrack.  
>
> I was suggesting that providing the given filename as an argument to the
> file-handler is more general than using it's directory.  Your point as I
> understood it, was, that the existing file-notify-add-watch
> tramp-handler work just fine with directories, therefore such a change
> is not needed.
>
> My argument is that there may be other ways of using the
> file-name-handler machinery, and I was presenting some examples.
>
> I also fail to see any disadvantages (of using the given filename).

Then I completely misunderstood your argumentation. What's your point
with (hypothetical-emacsfs-mode) ?

> -ap

Best regards, Michael.