From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13662: 24.3.50; inotify-add-watch fails in batch mode Date: Sat, 25 Jan 2014 16:16:57 +0200 Message-ID: <83zjmkb0yu.fsf@gnu.org> References: <87obft367u.fsf@gnu.org> <87fvomstx8.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390659492 12416 80.91.229.3 (25 Jan 2014 14:18:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 14:18:12 +0000 (UTC) Cc: 13662@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 25 15:18:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W743s-00057g-Bw for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 15:18:16 +0100 Original-Received: from localhost ([::1]:51337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W743r-0003zd-Ux for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 09:18:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W743k-0003zU-5y for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 09:18:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W743f-0003TA-2l for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 09:18:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W743f-0003T4-0B for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 09:18:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W743e-000238-HQ for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 09:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2014 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13662 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13662-submit@debbugs.gnu.org id=B13662.13906594357791 (code B ref 13662); Sat, 25 Jan 2014 14:18:02 +0000 Original-Received: (at 13662) by debbugs.gnu.org; 25 Jan 2014 14:17:15 +0000 Original-Received: from localhost ([127.0.0.1]:35217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W742t-00021a-4H for submit@debbugs.gnu.org; Sat, 25 Jan 2014 09:17:15 -0500 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:51946) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W742q-00021R-FV for 13662@debbugs.gnu.org; Sat, 25 Jan 2014 09:17:13 -0500 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0MZY00M00ML0KA00@mtaout27.012.net.il> for 13662@debbugs.gnu.org; Sat, 25 Jan 2014 16:16:27 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY00H2ENNF7B90@mtaout27.012.net.il>; Sat, 25 Jan 2014 16:16:27 +0200 (IST) In-reply-to: <87fvomstx8.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83990 Archived-At: > From: Michael Albinus > Date: Fri, 17 Jan 2014 12:56:51 +0100 > Cc: 13662-done@debbugs.gnu.org > > Chong Yidong writes: > > > Another way to see this is to create a file with the contents > > > > (let* ((temp-file (make-temp-file "inotify-simple")) > > (events 0) > > (wd > > (inotify-add-watch temp-file t (lambda (ev) > > (setq events (1+ events)))))) > > (unwind-protect > > (progn > > (with-temp-file temp-file > > (insert "Foo\n")) > > (sit-for 5) > > (message ">> %d <<" events)) > > (inotify-rm-watch wd))) > > > > and run `emacs -batch -l foo.el'. This prints ">> 0 <<", indicating > > that the inotify watcher failed to run. If you repeat omitting -batch, > > ">> 4 <<" is printed, as expected. > > Should be fixed with r116052. Instead of `sit-for', one needs to apply > `read-event'. This breaks the file-notify-test02-events test on w32. It looks like read-event never returns there. If I replace that with sit-for, it does return, but the test still fails because file-notify--test-results remains nil, something that wasn't being tested when I last ran the test (in early December). Frankly, given the inordinate amount of work it took to try to get file notifications work in batch mode, I'd rather we declared they are not expected to work in batch, and moved on. If you, for some reason, still want to stick with that test, please mark file-notify-test02-events to be skipped for w32, as I'm tired of fixing the breakage there time and again. Thanks.