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.bugs Subject: bug#35418: [PATCH] Don't poll auto-revert files that use notification Date: Wed, 24 Apr 2019 21:36:14 +0200 Message-ID: <87sgu79owh.fsf@gmx.de> References: <83sgu71b91.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="187130"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 35418@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 24 21:37:23 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 1hJNhq-000mYn-M1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2019 21:37:22 +0200 Original-Received: from localhost ([127.0.0.1]:46276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJNhp-0003CN-Lc for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2019 15:37:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJNhg-0003CD-2d for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 15:37:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJNhZ-0002L7-6p for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 15:37:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43000) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJNhX-0002KT-Cu for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 15:37:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJNhX-00071n-8V for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 15:37:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Apr 2019 19:37:03 +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.155613459126957 (code B ref 35418); Wed, 24 Apr 2019 19:37:03 +0000 Original-Received: (at 35418) by debbugs.gnu.org; 24 Apr 2019 19:36:31 +0000 Original-Received: from localhost ([127.0.0.1]:56540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJNh0-00070i-Ru for submit@debbugs.gnu.org; Wed, 24 Apr 2019 15:36:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:37361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJNgx-00070R-Bn for 35418@debbugs.gnu.org; Wed, 24 Apr 2019 15:36:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1556134577; bh=seXLrxtzcgAxZMMGjYqx6hxw1GeXKaqVobDv49UoPnI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ToTt5BrnpNgu/JEk+ggKeImes+MQe3GeqoWI/eeRo3RCtu+RxphdrDkgTHVROPaVv c4C8kuvWWIJjOxo6Ul2qRaeEJboDIqDaC3Pdtq8wMZihjfEbx04n2JJHSoqiA6KaJY 6X9PHAS1YSHCAhvYbCEdc+pLWvri01qc73tszIpE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([213.220.159.187]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRCOK-1h7L0v2ki4-00N7GK; Wed, 24 Apr 2019 21:36:17 +0200 In-Reply-To: <83sgu71b91.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Apr 2019 21:58:18 +0300") X-Provags-ID: V03:K1:Yk2mPsBkutn0ppuBaw6nmjV8P6Ze+bAz18tH4dy9sxjUrX7I0XC NMB6rs458kMmO5vHC8pZMSgcr0W/aCpnIFC4ytcPqfhaHNC/T34JgyyJM+U8zrSpskqBcBg kUMnMoabY3niK3BSZrMkoUBidOaCr1UMLQAbJE1Wfc2BwIOefqoJY5/5oZ2guCAOSaM20AZ x4oJQ4/wDnD/aQ46rn6lQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:uUswr9wAAuY=:M8Fj0wnbwMAhAY20lhncfZ 3tL9uDvTHtcVYmek6yGPcIyb1+X5QUBEllCl3mj7Uu7MOFbfsh2mR+dkxXjAc9Fa9/uxdcXy6 yVWrEs8adHLbUdm4jeReE1KKXfYFHfGaxIW4uOsBO6Zg5Ts2/YWYgw0LvAPzMgNtQ2OYa5Ell c9F0X4NA1uPVxSMQ9VepilnYFir+FPoqcc/+qi5+zDiDO3vEktqQhUXJ9HgkQRi9HymnTQ2Ws q4EuhoqRdG0E8JU00GBWlBdJ1F0ijoIkjTQWJkwYno3I4mE882EIJeHM31A0x5/jCuZJmQu2V ZNUkJ20oRPeGoWHo8X0mV1+JjqN5KGspB+pvRyPSzD8T2QYONfZk8v0FPElk7zwE3TfDudogP rks18A7mFNhHCTo3SQUkmmVy6BUqw2AdZ6uQbIfKrLffy1ukpdwzhXNtdWh7RxUYDOcjLUwrv uDB58w4WlJZHh38kRSx3VHist5dPJ2rVMfS/eYW6B72rF/2YZ4MTOGAAOeBcA7o8dYkMIzvDS CDYL/4gyytsTkhqeFkjaz9Vq07EL/FmFjBK3ga29gJep03zAWkOjuObzzyr6PswAA0FIUFCwY PNmkblBRwFRNZswb0o2Xzny0k+li/H8M6BoRNTBcNlZzjW16hR8k7O6nQGeEW7hwzDm2WwPVP ao+GLfZeCId3gd0283oF0R9DrSA06Gw/ey1WZRtEcreMr1k/eLOmthO/GBzmyyiihhkOuEeEt 0u9qk5vaInZ2B+pACWrZdpTdr8em+57geatVzPwryW6Hcy1uTBHimkMubsJq3CaveSsNvumX 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:158198 Archived-At: Eli Zaretskii writes: Hi, > 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. Inotify didn't work on mounted directories. I don't know whether this has improved. Gfile is agnostic to file systems being mounted or not. If inotify (used internally) doesn't work, it uses polling. However, gfile has shown instability; that's why it isn't the first choice anymore. I don't remember the behavior of kqueue. >> However, isn't this what `auto-revert-notify-exclude-dir-regexp' is >> for? I'm not familiar with the way Emacs is used on Windows, but >> would adding something like >> >> (rx bos >> (or "\\\\" "//") >> (one-or-more (not (any "/:\\"))) >> (any "/\\")) >> >> to `auto-revert-notify-exclude-dir-regexp' be a good start? > > 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. > > 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. The default value of `auto-revert-notify-exclude-dir-regexp' tries to identify common mount points, like /mnt or /media and alike. But like Eli said already for Samba mounts, we cannot detect all of them by their name. What might be an alternative is to let the user decide. If we provide a user option `auto-revert-dont-poll', a user could set it to t, and would live with the consequences. If she tries to enable autorevert for a mounted directory, which is not covered by file notifications, she might be surprised. > Thanks. Best regards, Michael.