From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: filenotify.el Date: Tue, 25 Jun 2013 22:20:50 +0300 Message-ID: <83zjuegfot.fsf@gnu.org> References: <87d2ra9z4x.fsf@gmx.de> <1383316.4Bc292dOgY@descartes> <87vc52yq04.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1372188076 6143 80.91.229.3 (25 Jun 2013 19:21:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 19:21:16 +0000 (UTC) Cc: ruediger@c-plusplus.de, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 25 21:21:17 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrYne-0004Uk-Tq for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2013 21:21:11 +0200 Original-Received: from localhost ([::1]:60840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYne-0002hd-HC for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2013 15:21:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYna-0002hS-Nl for emacs-devel@gnu.org; Tue, 25 Jun 2013 15:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrYnU-0001dZ-Fk for emacs-devel@gnu.org; Tue, 25 Jun 2013 15:21:06 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:52685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYnU-0001dE-7R for emacs-devel@gnu.org; Tue, 25 Jun 2013 15:21:00 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MOY00M00R1WR200@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 25 Jun 2013 22:20:59 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOY00M46R2YE5D0@a-mtaout20.012.net.il>; Tue, 25 Jun 2013 22:20:58 +0300 (IDT) In-reply-to: <87vc52yq04.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161042 Archived-At: > From: Michael Albinus > Date: Tue, 25 Jun 2013 21:00:43 +0200 > Cc: emacs-devel@gnu.org > > > + ;; Apply callback. > > + (when (and (stringp file) (eq action 'moved)) > > + (funcall callback (list descriptor 'deleted file)) > > + (setq action 'created file file1)) > > + (when (and (stringp file) action) > > + (funcall callback (list descriptor action file))))) > > > > I don't think this is very useful because there is no way for the user to > > connect both events. Inotify provides COOKIE to do this. > > > > Maybe we should introduce a moved-from/moved-to event using a cookie instead. > > This should be easier to implement for all APIs. > > That's also my intention. But Glib's implementation does not implement > this for all backends, see the comment in > . > > The w32notify case I couldn't test yet. w32notify produces 2 events for a file that was renamed: a 'renamed-from' event, followed by a 'renamed-to' event.