From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: auto-revert error on macOS when auto-revert-use-notify is t Date: Tue, 02 Jan 2018 14:23:53 +0100 Message-ID: <87vagkjswm.fsf@gmx.de> References: <87po6xvom5.fsf@gmx.de> <83r2rdg7u3.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1514899336 1098 195.159.176.226 (2 Jan 2018 13:22:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 Jan 2018 13:22:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , "emacs-devel@gnu.org" To: zhang cc Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 02 14:22:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWMWB-0008Oi-1l for ged-emacs-devel@m.gmane.org; Tue, 02 Jan 2018 14:22:11 +0100 Original-Received: from localhost ([::1]:42723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWMYA-0001DH-8w for ged-emacs-devel@m.gmane.org; Tue, 02 Jan 2018 08:24:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWMY1-0001Ct-Iq for emacs-devel@gnu.org; Tue, 02 Jan 2018 08:24:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWMY0-0006OB-MV for emacs-devel@gnu.org; Tue, 02 Jan 2018 08:24:05 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:53132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWMXu-0006ME-VW; Tue, 02 Jan 2018 08:23:59 -0500 Original-Received: from detlef.gmx.de ([212.86.40.148]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MGSDw-1ejc5K2y1I-00DHgv; Tue, 02 Jan 2018 14:23:54 +0100 In-Reply-To: (zhang cc's message of "Fri, 29 Dec 2017 15:45:35 +0000") X-Provags-ID: V03:K0:O8S8E/TWnrTsdb+o+EgifLvUqhkoOvtdMMNaujQL0XF5Qk2zzSz 1I15pC5aWkDAH1HIT8e/cg68F060IkLC5BWNOHfCkAUq4Q7JH3EMLCyINIlxgJqsful7C4p tUxEh3yhEkb5NQcxdQ/rebom2f6Pcg4M8hOZznE8P5HQ9NJfLiRZGfq5f5L4yqXW5jrfWXQ +pQKYNT0SofGHWAjnMY6w== X-UI-Out-Filterresults: notjunk:1;V01:K0:xO7VvZT0i68=:nAwuQxy0hSFTQRgF9tyjTL msIpNoe8RuaRWvHMnU9n6oCdT9+Fjxn7GxMan6kGPkaao4djFxTUhbmnrHzrnhzEHlQ9nu69g 5mP46hbQ4hx516emARMPeSzVBW2AxBCnanU4RA8y1bIxJQBMvMRvoodH4Cjmlih6zLCWEBfYJ QIqtd2uDQ5JrbliUCs4usMpitFR5BC5EW3NF8YoVZTou2RdlGConlSWi/wa9L5r8pZqTu3rwR 7q2pXQz7JVB07z2ZfNSIAReMRF/68KuWJOV9fsDeRRgjuAd5608akYQQ1uWtttvMKjbSrAu8+ TAgPrsJumsa0UqYwC6DmxqlcAKbSVmYhE4vDyyTbqtFnL4EDt+x8Bv8XLYiEeQ65XrVTuYlim CWBP6v3TKsGn5xk6v82rmDpKInNvONRn/FS3E0zLuQMUDrUNJYY8/s6h9TStFa5dAfv3omcFD fbHWFWTFk1gAmjq1hq6pfeAbfv4v7avgzNCeFExBcFDU/AW+rTZg38p/sXP0pydWkoMJvpMj/ 7VJ14P6rCZnjDGfu2RxMHnHw2AVdMlGY3lfa+dTjpjDMB7OgEtzt4olc9XejNtaUzlPQ04A55 OrVl+4lsL3SRZaymsgyVi/kjs9j0bbFkYO1l0WWveQA2wNtL+i/8VKRrq6eQg3Gf1UF7rhkFN HBcDLGBFVMMtxoOIueAl2VjJCp/B323V+GkEyig+rx9zwgcbR1QxFHcEgNpgaN+p98AW+iXPh +WxR5GGK8WPZjP9b8Qfla6JSYzRAcsnMDtUmkOxHiaO6+FifTGV7+8e7v3pYIco7/37tjLNN X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:221529 Archived-At: zhang cc writes: Hi, > What about the following logic: > When the auto-revert module known the file is renamed or deleted, > delete the watch=20 > and start a one shot short timer(about 100ms) to check the visiting > file of the buffer. On timeout,=20 > if the file exists, revert the file and add a new watch, otherwise, > tell user the file doesn=E2=80=99t exist=20 > and fallback to the default polling(5s).=20 > Once the visiting file of the buffer can be accessed, go back to use > file-notify again. Sounds possible. However, I would make it optional. Some people might dislike this feature, invisible under the hood. And the timeout of 100ms might vary depending on the filesystem the supervised file is located on. In case of remote files, this will be too short I fear. I will put it in my TODO. If time permits, I'll work on this, if nobody beats me. Saying this, it might be better if you send this proposal via "M-x report-emacs-bug". I will convert this into a wishlist item, and it is much more likely to be found by other people than on my private TODO list. Best regards, Michael.