From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: OSX FSEvents file watching support Date: Thu, 18 Jul 2019 16:29:17 +0200 Message-ID: <87ftn3pgaq.fsf@gmx.de> References: <0ce358e3-9333-4717-97d5-f03d882bc2d0@www.fastmail.com> <83lfwvy9ai.fsf@gnu.org> <87muhbeg01.fsf@gmx.de> <83a7dby2lp.fsf@gnu.org> <877e8fedwi.fsf@gmx.de> <834l3jy17z.fsf@gnu.org> <87o91rpgzh.fsf@gmx.de> <83k1cfwhn2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="135036"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: muir@mnd.rs, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 18 16:29:36 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 1ho7PY-000Ys1-PR for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 16:29:32 +0200 Original-Received: from localhost ([::1]:38598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho7PX-0007NY-Mc for ged-emacs-devel@m.gmane.org; Thu, 18 Jul 2019 10:29:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56833) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho7PU-0007NE-LQ for emacs-devel@gnu.org; Thu, 18 Jul 2019 10:29:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ho7PT-0001xM-1r for emacs-devel@gnu.org; Thu, 18 Jul 2019 10:29:28 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:33359) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ho7PQ-0001vb-Lv; Thu, 18 Jul 2019 10:29:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563460158; bh=wKNxV5gC4DD6CfpsaUnx052tT+HMOWqpeys8BouZw6w=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=dutkv0pHsuLDHO6v3efXyo4RmBbdF05lu/z1oPWRIAhJAwJ5aojWLzSyrBpzmhlSt ztQoLa0opNN93Q2jiPl4T2I0Gvx0QAMiQ6kNHXSUNecR2nvNRWRxldhaQuVIuF5O1o W1Cm1I32LLaxX4CT+u09Zzjv6Lw3mIc/IM4IbL8w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.58.192]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MzQkK-1iaSre10ee-00vS2X; Thu, 18 Jul 2019 16:29:18 +0200 In-Reply-To: <83k1cfwhn2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Jul 2019 17:18:25 +0300") X-Provags-ID: V03:K1:WdtTf+R5s38+S+OCjmIXnMcp65bIpRjwv9zGXRxI9StdUvLEX6M glxS8b75JoVOJ7C1LEbmDwWbKIksjeDFSu8e4Bx+TP226IsiPRQ1YDbBO1BGKjYE1OLn0l5 QbqxCQHgrMTm7jaJKgTUTr/g9sqwGKP88fU5/NEF8M8IzRkz4YRiC8Frya9aOvSnlfn/IJk Yso9wj1kS+ItChGVdl+AQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:gd8+8vi68Ns=:YZ8NYTN6ckRldmaN1Fb5Z4 4frPFK4if/ixMDD2lS3hrofrEyNCVWOX2Ykc9b18JQQrXxcgfpbHiv90MVRYO+ram7VeNPaL5 h8ZG/DOyYrqQQQvENiPVuNuFeySx7zVv8CVUgIygM9YeLD4wqG/GWYeAArFHrk8uQOWoM3dpS awh0V53hyqKqS97vpgheQ0GoubSn7op0j7ZXuLA4d1VeJfjal+xJx9VDdPyAygWZSCW8S/Rzn 7ZWzurrVixd2Bt+Ea8sjq2hEy8rqyQXCju/bivCI0twPRXKwLGL4JuukUXFEaGEymlKJ60WAl OiIy9evig2gQRnAGOXvCVYtcSo0tELtia4VHp1b1VaSlz7cUk1mkvjIZ/ketn361jIiibHw8U dlSEXy4jZx/4GbMNyV9QAt2NtpBHJe7zWdaWpWZqsXgCdnOjh7zoU0Fnkso1dAyR8W/FGdNlg UmF8BoRICCW44i/TsFbEiE2/vzd7SQ+F16ALzlZnMdQMd1P7gk3NKvTQgP2eqrnVunBq8dTO9 AMZxoMnyGj5622olpr2lXHyNHU1TKqOKY2vKl8zCydlcpW2rPdvWUo4P9eJIIzppwi1NmUr0F RMiKK/qWuXFTkpBksnC33VjjqZ1wKjElxp2RwTf8I86qw3tcmtg7LYkdC4Hbj35qoOjouIDWL S68PtocxNqoS/jQzQ1SsDjVBl9bsJbWfO1LqxMBJ/Fdpqm/s9OkcHKX92dJ76NoeBe56DvsF1 ZV3w+ieyVHz8eYH7J7qrauL4QMuKy81nsl/peOZZLLBR2hoT7E6VkwvvTdp/chYOetR2ama/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:238667 Archived-At: Eli Zaretskii writes: >> Tramp doesn't. Injection the event would trigger the call of the >> respective handler from special-event-map. Instead, Tramp calls this >> handler directly. > > That only works if (a) Tramp knows in advance what handler to call, > and (b) that handler is callable from Lisp. > > I don't think it's reasonable to base a native notification back-end > on these assumptions, they are too shaky, and it's unnecessary in the > first place. We can change it, of course. But see also the comment in both filter functions directly before the call of the handler: I tried it the other way, and there were problems. And yes, both (a) and (b) are fulfilled. Likely (a) is fulfilled because it is the same guy who has written Tramp and the filenotify event handler. (b) is fulfilled, because it is a Lisp function, which is given by special-event-map as handler for file notification events. I don't recommend to apply this technique for other events. But for file notifications, it works for years. Best regards, Michael.