From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Added inotify support. Date: Tue, 11 Dec 2012 17:36:41 +0100 Message-ID: <87wqwo4kbq.fsf@gmx.de> References: <2181827.T3JxG88qQt@descartes> <83mwxmazu7.fsf@gnu.org> <87a9tl6nko.fsf@gmx.de> <83hant9ez9.fsf@gnu.org> 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 1355243831 26317 80.91.229.3 (11 Dec 2012 16:37:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2012 16:37:11 +0000 (UTC) Cc: ruediger@c-plusplus.de, emacs-devel@gnu.org, sdl.web@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 17:37:23 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 1TiSpX-00064B-0z for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2012 17:37:15 +0100 Original-Received: from localhost ([::1]:48381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiSpK-0003tG-Cy for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2012 11:37:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiSp8-0003sh-40 for emacs-devel@gnu.org; Tue, 11 Dec 2012 11:36:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiSp6-0006S5-RH for emacs-devel@gnu.org; Tue, 11 Dec 2012 11:36:50 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:54923) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TiSp6-0006Rq-H6 for emacs-devel@gnu.org; Tue, 11 Dec 2012 11:36:48 -0500 Original-Received: (qmail invoked by alias); 11 Dec 2012 16:36:46 -0000 Original-Received: from p57BB98D5.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.152.213] by mail.gmx.net (mp037) with SMTP; 11 Dec 2012 17:36:46 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/zKvx6FdrzmmaKtPv2qhCuLomqnvSbcZks22Kjw+ D5I/xprEwHqP4/ In-Reply-To: <83hant9ez9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 11 Dec 2012 10:20:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.165.64.23 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:155471 Archived-At: Eli Zaretskii writes: >> I've played a little bit with this. Looks, like not all events are >> handled by the callback. Testcase: >>=20 >> In a shell, a have applied >>=20 >> $ inotifywait -mq /tmp/123 >>=20 >> In another shell, I have started Emacs >>=20 >> $ emacs --eval "(inotify-add-watch \"/tmp/123\" t (lambda (&rest >> rest) (message \"callback %s\" rest)))" >>=20 >> Then I have modified&saved /tmp/123. In the first shell, I see >>=20 >> /tmp/123 MODIFY=20 >> /tmp/123 OPEN=20 >> /tmp/123 MODIFY=20 >> /tmp/123 CLOSE_WRITE,CLOSE=20 >>=20 >> But in Emacs' *Messages* buffer, there's only >>=20 >> callback ((1 (modify) 0 nil)) >> callback ((1 (close-write) 0 nil)) >>=20 >> What do I miss? > > No idea. Perhaps R=C3=BCdiger could help. Or step with a debugger throu= gh > the code and see what's going on. I've fixed this in the trunk. There is still something not clear to me: An inotify event /tmp/123 CLOSE_WRITE,CLOSE=20 is transformed into an Emacs event (file-notify (1 (close-write) 0 nil) callback) Is there a reason, that CLOSE (and also MOVE) are not handled in mask_to_aspects? Best regards, Michael.