From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Muir Manders" Newsgroups: gmane.emacs.devel Subject: Re: OSX FSEvents file watching support Date: Thu, 18 Jul 2019 07:53:39 -0700 Message-ID: References: <0ce358e3-9333-4717-97d5-f03d882bc2d0@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="242121"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Cyrus-JMAP/3.1.6-736-gdfb8e44-fmstable-20190718v2 Cc: emacs-devel@gnu.org To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 18 16:53:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ho7n3-0010sO-9w for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 16:53:49 +0200 Original-Received: from localhost ([::1]:38794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho7n2-0008Lf-B2 for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 10:53:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36801) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho7mz-0008J5-T1 for emacs-devel@gnu.org; Thu, 18 Jul 2019 10:53:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ho7mx-0003V3-NF for emacs-devel@gnu.org; Thu, 18 Jul 2019 10:53:45 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49075) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ho7mv-0003ST-Ni for emacs-devel@gnu.org; Thu, 18 Jul 2019 10:53:43 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 07D8022302; Thu, 18 Jul 2019 10:53:39 -0400 (EDT) Original-Received: from imap4 ([10.202.2.54]) by compute5.internal (MEProxy); Thu, 18 Jul 2019 10:53:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnd.rs; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm3; bh=0j1tP tA6fhstiz4+XmdvR4QcQxUuGnnLD8uQ+ae/yRM=; b=WGVCtKkgsvRLi1H1iYwbB HF7BcxeC/sqwzUWgXerag6RzZoWsYpSrZxFY4oIgnt/OeI+vUB7dp02jAxj1XLMM A36mU/5acdwuhmkzItP98/5toQCayRVKa+EViFwLuj/lExLNEl16bFkNBVaUyN1G 9LOJHjpkztt+t+HHE9eOmRvVx/GCAiVF4NNAUz51UwWkVwtrwVQVblvHBFj5xtU9 xCsY0BQIl2azUkdLaysIklXiBdLgMbw0mX5AJys++6NrcPf1HJcXo6ixZGDdIUFv vReqyYxQJEiMq7p7M0oWJLXk3vRqgRLzsbFwuWzVMn1vsfezSQCZolhLX81bdfOq g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=0j1tPtA6fhstiz4+XmdvR4QcQxUuGnnLD8uQ+ae/y RM=; b=11l+Vt83IjvW/w1HsWvwrOOA1TSOUq/NiK7HZw5TEzun844MpKHhU52/d NqIVsz6UwI0hfTit75hWpCapIEUmHbA6HC0IVa1o8rG7RK9O+ckKuUOeolsrxEE8 bNymUjcM7FpVySrDk2vPrdWR85o68fZzwDifVzKmljLdsyqRdah5k87ZSBqRlhCp 11pPY4d0OIYZSLSs472CHe/sHCnSJ4/ldtPYMGioJ/3FWeYDwvCnPsBwlE+TxYaw bxQEdj9PuehPi+fAzDRCYB8YO9lcTXfoNZ0B53xiEK62i0vMsgSctZ+TyVpJl2Fx KbDS4DlrgEYUSlpfExXRUT97KHWGA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieehgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfouhhi rhcuofgrnhguvghrshdfuceomhhuihhrsehmnhgurdhrsheqnecuffhomhgrihhnpehgih hthhhusgdrtghomhenucfrrghrrghmpehmrghilhhfrhhomhepmhhuihhrsehmnhgurdhr shenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6C7383C00A1; Thu, 18 Jul 2019 10:53:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:238673 Archived-At: > FSEvents only reports the directory where changes occurred. Based on my testing, FSEvents reports the full file path for each change= along with metadata about the file and the change. Here is the test program I was using to play around with it: https://gis= t.github.com/muirrn/ea8c63c22ca7624f304f805ba77b25f4 Muir On Thu, Jul 18, 2019, at 2:54 AM, Mattias Engdeg=C3=A5rd wrote: > 17 juli 2019 kl. 06.18 skrev Muir Manders : > >=20 > > I am interested in adding support in Emacs for Mac OS "FSEvents" fil= e watching. FSEvents allows for efficient recursive directory watching, = which would be a boon for packages like lsp-mode. >=20 > Good! >=20 > > 1. Write a new backend for filenotify.el. The existing backends expl= icitly don't support recursive watching, so I'm not sure if it makes sen= se to have one special backend that does support recursive watching. >=20 > This is probably the way to go, but some careful interface design is=20= > necessary. For example, FSEvents only reports the directory where=20 > changes occurred. For some applications this may be sufficient, but fo= r=20 > others, the exact file names are required. What about lsp-mode? Withou= t=20 > a specific application in mind, we risk over-engineering. >=20 > FSEvents can probably co-exist with kqueue which fits the filenotify=20= > model better for watching individual files, but it would be nice to=20= > have something that scales better (kqueue uses up file descriptors). O= n=20 > the other hand, FSEvents may require careful filtering to avoid being=20= > swamped with notifications during periods of intensive file system=20 > change. >=20 >