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: [PATCH] Added basic file system watching support. Date: Tue, 11 Dec 2012 10:29:14 +0200 Message-ID: <83fw3d9elh.fsf@gnu.org> References: <6218185.ViukoKRdFp@descartes> <1604303.YKOVcvQH0F@descartes> <8738zd6n1t.fsf@gmx.de> <83ip899fd7.fsf@gnu.org> <87y5h557cx.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1355214600 10950 80.91.229.3 (11 Dec 2012 08:30:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2012 08:30:00 +0000 (UTC) Cc: ruediger@c-plusplus.de, emacs-devel@gnu.org, monnier@iro.umontreal.ca, sdl.web@gmail.com To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 09:30:13 2012 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 1TiLEC-0005Ib-F5 for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2012 09:30:12 +0100 Original-Received: from localhost ([::1]:40653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiLDz-0007Sz-Qq for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2012 03:29:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiLDs-0007SU-7j for emacs-devel@gnu.org; Tue, 11 Dec 2012 03:29:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiLDm-0007XG-54 for emacs-devel@gnu.org; Tue, 11 Dec 2012 03:29:52 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:41904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiLDl-0007W2-To for emacs-devel@gnu.org; Tue, 11 Dec 2012 03:29:46 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MEU00I00Y127A00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 11 Dec 2012 10:29:20 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MEU00HMSY8WF0G0@a-mtaout20.012.net.il>; Tue, 11 Dec 2012 10:29:20 +0200 (IST) In-reply-to: <87y5h557cx.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:155458 Archived-At: > From: Michael Albinus > Cc: monnier@iro.umontreal.ca, ruediger@c-plusplus.de, sdl.web@gmail.com, emacs-devel@gnu.org > Date: Tue, 11 Dec 2012 09:19:10 +0100 > > >> Could we extend the interface of `inotify-rm-watch' to add a file name? > > > > Why do you need an extension? This is Lisp: we could pass the file > > name _as_ the descriptor. Since the remote file handler will take > > care of the call anyway, it will assign the correct meaning to the > > descriptor. > > Sure, that would be sufficient for Tramp. I had the impression, that a > more complex structure as descriptor was chosen, because there could be > several `inotify-add-watch' calls for the *same* file, being different > in the aspect or the callback function. Then Tramp could maintain its own data structure for watched files, and give each watch a unique identifier, like (FILENAME . NUMBER), or just NUMBER, or whatever. IOW, the DESCRIPTOR is an opaque data type, which the implementation back-end, and the back-end alone, can and should interpret.