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 inotify support. Date: Sun, 02 Dec 2012 22:08:44 +0200 Message-ID: <83sj7orzcj.fsf@gnu.org> References: <2181827.T3JxG88qQt@descartes> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1354478956 19073 80.91.229.3 (2 Dec 2012 20:09:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2012 20:09:16 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, sdl.web@gmail.com To: =?utf-8?Q?R=C3=BCdiger?= Sonderfeld Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 02 21:09:28 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 1TfFqf-0005yH-E7 for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2012 21:09:09 +0100 Original-Received: from localhost ([::1]:33290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfFqT-0004Vc-Nx for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2012 15:08:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfFqR-0004VX-5P for emacs-devel@gnu.org; Sun, 02 Dec 2012 15:08:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfFqQ-0006K7-0A for emacs-devel@gnu.org; Sun, 02 Dec 2012 15:08:55 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:51269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfFqP-0006Jr-Ov for emacs-devel@gnu.org; Sun, 02 Dec 2012 15:08:53 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MEF00B006E3U500@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sun, 02 Dec 2012 22:08:52 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MEF00B5N6MRLU80@a-mtaout23.012.net.il>; Sun, 02 Dec 2012 22:08:52 +0200 (IST) In-reply-to: <2181827.T3JxG88qQt@descartes> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:155179 Archived-At: > From: R=C3=BCdiger Sonderfeld > Date: Mon, 01 Oct 2012 16:09:55 +0200 > Cc: Leo , emacs-devel@gnu.org >=20 > On Monday 01 October 2012 00:38:09 Stefan Monnier wrote: > > If there's a good chance this won't work without breaking compati= bility, > > maybe a better option is to provide a low-level API that maps ver= y > > closely to inotify and then an Elisp layer on top which abstracts= away > > differences between different systems. In that case we can insta= ll the > > inotify support right away while we're still experimenting with t= he > > higher-level abstraction. >=20 > That's probably the best approach here. I changed the patch to pro= vide a low > level inotify interface. However I did not provide an inotify_init= (2) like=20 > function and instead initialization and closing of the inotify hand= le is done > internally. I don't think that this should be exposed to elisp eve= n in the=20 > low level interface. >=20 > > But if they're unlikely to be important in practice, then > > I guess the current solution might be acceptable. >=20 > I think we are safe. I added that `equal' should be used to compar= e cookies. =20 > So we can easily change it without breaking the API. >=20 > > I think the cleaner option is to define a new object type for it. > > It could be either a new Lisp_Misc type, so you can make them pri= nt as > > something like "#" (take a look at "enum > > Lisp_Misc_Type" and "union Lisp_Misc" in src/lisp.h for starters;= adding > > a new type will require adding corresponding branches to the swit= ch > > statements in alloc.c and in print.c). >=20 > That sounds like the best option. I haven't implemented it yet. I= s it=20 > possible to make the Lisp_Misc_Type comparable with `equal'? Becaus= e the=20 > watch-descriptor has to be comparable. Any news on this? The corresponding w32 implementation collects dust in my local branch, waiting for the inotify based implementation to b= e committed.