[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Added basic file system watching support.

From: Eli Zaretskii
Subject: Re: [PATCH] Added basic file system watching support.
Date: Tue, 11 Dec 2012 12:15:25 +0200

> Date: Tue, 11 Dec 2012 11:39:15 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden,
>       address@hidden
> > --8<---------------cut here---------------start------------->8---
> >   /* If the file name has special constructs in it,
> >      call the corresponding file handler.  */
> >   handler = Ffind_file_name_handler (file_name, Qinotify_add_watch);
> >   if (!NILP (handler))
> >     {
> >       return call4 (handler, Qinotify_add_watch, file_name, aspect,
> >      callback);
> >     }
> > --8<---------------cut here---------------end--------------->8---
> > 
> > In inotify-rm-watch I couldn't add similar lines, because file_name is
> > unknown. My proposal is either to add file_name as first argument of
> > inotify-rm-watch, or to declare WATCH-DESCRIPTOR as a cons cell, which
> > car is always the file name.
> IMO, this design is wrong.  Tramp is just one more back-end for this
> feature, in addition to two others: inotify and w32notify.  So I think
> Tramp handlers should be called from a higher-level code, one that
> calls whichever back-end is appropriate.  Otherwise, we will need to
> implement the Tramp support twice, in 2 different sets of primitives.

Moreover, Tramp shouldn't use Qinotify_* symbols, but some (currently
non-existent) platform-independent symbols, e.g. Qfile_notify_*.
Otherwise, a Windows user will not be able to use this feature in
conjunction with remote files residing on Posix hosts, because
Qinotify_* are only defined when Emacs is built with local inotify
support, which is impossible on Windows.

Again, this calls for some design discussions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]