From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#35418: [PATCH] Don't poll auto-revert files that use notification Date: Thu, 25 Apr 2019 11:56:59 +0200 Message-ID: <74CB5185-5DA1-4786-BD9C-9EEB3D43B3C1@acm.org> References: <83sgu71b91.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="2956"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35418@debbugs.gnu.org, michael.albinus@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 25 12:01:06 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJbBi-0000Yw-LN for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 12:01:06 +0200 Original-Received: from localhost ([127.0.0.1]:54650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJbBh-00052m-Hz for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 06:01:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJbAf-0004MH-El for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 06:00:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJb8k-00019f-Dl for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 05:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJb8k-00018S-AD for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 05:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJb8k-0004Gj-8U for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 05:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Apr 2019 09:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35418-submit@debbugs.gnu.org id=B35418.155618622716337 (code B ref 35418); Thu, 25 Apr 2019 09:58:02 +0000 Original-Received: (at 35418) by debbugs.gnu.org; 25 Apr 2019 09:57:07 +0000 Original-Received: from localhost ([127.0.0.1]:57488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJb7r-0004FR-Bb for submit@debbugs.gnu.org; Thu, 25 Apr 2019 05:57:07 -0400 Original-Received: from mail76c50.megamailservers.eu ([91.136.10.86]:44396 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJb7o-0004FG-FX for 35418@debbugs.gnu.org; Thu, 25 Apr 2019 05:57:06 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1556186222; bh=jr6mFOfpCnHQ4JE8JJZ4EQXyEzK4R1DTnM612T8Jbjc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=J63XfeaQLKPE5DD9phShEZ5ku7jMbkZvcxNmwIK/DPT/BNsJrfzIXD4vt0QDe7SIw UtKuGIyHkgy3AEE0zbOjKRUI+K9JtuJb2iZFb+Xxcnq5SzoR2d8y7ffzhhTdmI5yHj UYCNQfigl5+9ucDmisqZ7m6Qdf6h3oo00FDQdLE4= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x3P9uxC2025975; Thu, 25 Apr 2019 09:57:01 +0000 In-Reply-To: <83sgu71b91.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.8) X-CTCH-RefID: str=0001.0A0B0215.5CC1846E.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=XdenMrx5 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=RZQY-mb0yVNJb3Z96m4A:9 a=GeH1N157bFKydk9D:21 a=h8emM1ep2tkE_pZm:21 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:158238 Archived-At: 24 apr. 2019 kl. 20.58 skrev Eli Zaretskii : >=20 > The polling was added for a reason, and the reason was not reliability > of the notifications. The reason is hinted upon in this comment: >=20 > ;; If we have file notifications, we want to update the auto-revert = buffers > ;; immediately when a notification occurs. Since file updates can = happen very > ;; often, we want to skip some revert operations so that we don't = spend all our > ;; time reverting the buffer. > ;; > ;; We do this by reverting immediately in response to the first in a = flurry of > ;; notifications. We suppress subsequent notifications until the next = time > ;; `auto-revert-buffers' is called (this happens on a timer with a = period set by > ;; `auto-revert-interval'). Thank you, interesting! In any case, that should not be a problem: the = patch takes care of it in a more principled way, by the means of a = timer. Currently, auto-revert is inhibited until next periodic poll, = which can be anything between 0 and 5 seconds away. The patch sets this = to a fixed value (2.5 s). > If you look at bug reports and discussions around the time this > comment was written, you will find the descriptions of the use cases > that caused this design. AFAIR, the main problem was with inotify, > not with w32notify. The inotify problems at the time seem to have stemmed from not using = unique notification descriptors. This was fixed some time ago = (158bb8555d etc, bug#26126). > If you imply that Samba drives can be identified by the syntax of the > file name alone, then I don't think this is a valid assumption. A > certain drive letter can be mapped to a Samba volume, and we can never > know that by looking just at the file name. Certainly, but the intent was to add something like the attempts to = identify network file systems on Unix machines: "^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/")) If that regexp is acceptable as rough heuristics on Unix, surely = something like the regexp proposed, matching \\SOMETHING\, shouldn't be = out of the question on Windows? Full precision cannot be attained, as = you point out, but perhaps we can make life easier for the user. > More generally, auto-revert-notify-exclude-dir-regexp is for any > situation where a filesystem doesn't cause notifications. You will > find caveats about such issues in the documentation of every > notification system we support. Yes, that is my understanding as well. Are you arguing that the default = value of auto-revert-notify-exclude-dir-regexp should not be extended in = the proposed way, or that the variable is fundamentally incompatible = with the patch?