From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Emacs inotify support? Date: Mon, 14 Sep 2009 00:28:54 +0200 Message-ID: References: <6fa54e4e0909111554g4165418albbdffc142b3b52ee@mail.gmail.com> <83tyz8z3sl.fsf@gnu.org> <83d45uzl60.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1252880980 4805 80.91.229.12 (13 Sep 2009 22:29:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Sep 2009 22:29:40 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, joakim@verona.se, antoine.levitt@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 14 00:29:32 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MmxZb-0005zd-Jx for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2009 00:29:31 +0200 Original-Received: from localhost ([127.0.0.1]:57260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmxZb-0008UC-0o for ged-emacs-devel@m.gmane.org; Sun, 13 Sep 2009 18:29:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmxZV-0008TF-9B for emacs-devel@gnu.org; Sun, 13 Sep 2009 18:29:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmxZQ-0008Qn-Lz for emacs-devel@gnu.org; Sun, 13 Sep 2009 18:29:25 -0400 Original-Received: from [199.232.76.173] (port=44586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmxZQ-0008Qk-G7 for emacs-devel@gnu.org; Sun, 13 Sep 2009 18:29:20 -0400 Original-Received: from mail-yx0-f182.google.com ([209.85.210.182]:40329) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmxZN-00052j-2w; Sun, 13 Sep 2009 18:29:17 -0400 Original-Received: by yxe12 with SMTP id 12so3650195yxe.1 for ; Sun, 13 Sep 2009 15:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=c2vObuRvnl5oxSF+ikxM1ekABvQqxSPYQHl4s7+6bQM=; b=ND7w0okGzMfm/UptTImnhyv6XxjWZK8VT/6wosmPcXuUnrI7MisSh+Aa4x6gwl7hE6 Fc5po5EmdY1sCVxLjUiuB7g3EL4ypQ5ZxcEDhJHqFIlDiQMTGe4XHY99grPXIkLAcNr2 cOC/KY+r8p7ZFFxV51Oo98KOk/zKEWZHoCOOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=HdVW4CV5r2IaEPf0ILi8J9NeQpmFzaYd2OuXv71kGQmTyy6deqXt6q0Ly7QgHMo/BP QVaxUSshMuNniOup3uQ6WvokcXQo1/bDws7VG79qK+ognqJkRYJL33kD+wnzeKXVGz8c 7DlAPwUHTBhTOiasrKb064WoMJFFuZivOAgNI= Original-Received: by 10.101.62.6 with SMTP id p6mr4905465ank.153.1252880954079; Sun, 13 Sep 2009 15:29:14 -0700 (PDT) In-Reply-To: <83d45uzl60.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115288 Archived-At: On Sun, Sep 13, 2009 at 9:42 PM, Eli Zaretskii wrote: >> From: joakim@verona.se >> Cc: Eli Zaretskii , antoine.levitt@gmail.com, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 lennart.borgman@gmail.com, emacs-devel@gnu.o= rg >> Date: Sun, 13 Sep 2009 19:28:45 +0200 >> >> One way to look at it is auto-revert-mode for directories visited with >> dired. Something other than Emacs is changing the contents of a >> directory and I would like dired to notice. This can be achieved in a >> number of ways, but the way I had in mind is an inotify handler in >> Emacs, that would insert some kind of event in the event stream, so one >> could bind a handler to it. This should be portable across platforms >> with different filesystem notification schemes, and consistent with >> Emacs behavior in general. > > I can hardly imagine that using inotify is more portable than looking > at the time stamp of the directory (which works even on Windows, if > you have NTFS). > > But maybe I didn't understand what you were trying to say. I do not know how inotify works, but the corresponding function in w32 will send a notification when a file has changed. It is not more portable, but it allows changes in the direcotry from outside of Emacs to be handled rather similar to those from within Emacs.