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: Wed, 8 May 2019 16:13:37 +0200 Message-ID: <1149CD1A-B094-4179-ACBF-612FD8E402F1@acm.org> References: <83d0l7v193.fsf@gnu.org> <86EFE367-90FF-4786-BC91-FC28FAF38A4E@acm.org> <877ebdqmbj.fsf@gmx.de> <834l6gu6ee.fsf@gnu.org> <834l6eqdam.fsf@gnu.org> <8bbbdc62bee1dc16b6fd684e7da5ffac43f1e232.camel@acm.org> <87woj9nj77.fsf@gmx.de> <83r29fmz3f.fsf@gnu.org> <6b722334f6eaddcbbf3def636b5181c9439a172c.camel@acm.org> <831s1emvz7.fsf@gnu.org> <26e8159ac86da37d9cf555f6cb3f2dcb63ac0a67.camel@acm.org> <87y33mgo0c.fsf@gmx.de> <05128E42-E970-4C41-9DF9-E9E0BC1C9E4A@acm.org> <87tveagg4f.fsf@gmx.de> <87pnoygdx6.fsf@gmx.de> <8FEB518A-F5AA-488B-BDC5-7947FFE51394@acm.org> <87lfzlgvka.fsf@gmx.de> <3D200C55-AD11-4214-9C50-C2183F6598CC@acm.org> <78A0704A-59E6-4D25-8FF3-8FD011942885@acm.org> <837eb1ib84.fsf@gnu.org> <855D9426-4B27-4CB8-8E85-B9100B868207@acm.org> <835zqli55l.fsf@gnu.org> <831s19i0ot.fsf@gnu.org> <2A4E0221-878F-4591-9C97-56B7BB8508D3@acm.org> <83woj1gjna.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_8BAE67DE-1DED-443D-9E16-7D949471420A" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244272"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Michael Albinus , 35418@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 08 16:14:15 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 1hONKo-0011Q6-Jd for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 16:14:14 +0200 Original-Received: from localhost ([127.0.0.1]:37950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hONKn-0006O1-H1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2019 10:14:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hONKe-0006Md-BQ for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 10:14:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hONKd-0001IR-CJ for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 10:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hONKc-0001Hq-7M for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 10:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hONKc-0005xh-10 for bug-gnu-emacs@gnu.org; Wed, 08 May 2019 10:14: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: Wed, 08 May 2019 14:14:01 +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.155732482422882 (code B ref 35418); Wed, 08 May 2019 14:14:01 +0000 Original-Received: (at 35418) by debbugs.gnu.org; 8 May 2019 14:13:44 +0000 Original-Received: from localhost ([127.0.0.1]:33684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hONKK-0005x0-CM for submit@debbugs.gnu.org; Wed, 08 May 2019 10:13:44 -0400 Original-Received: from mail78c50.megamailservers.eu ([91.136.10.88]:41166 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hONKH-0005wq-E8 for 35418@debbugs.gnu.org; Wed, 08 May 2019 10:13:42 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1557324819; bh=3/GkSC/EPxde/ZcXOCmX2tRMY8CsxADYtZgjFwhwA6c=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Fi69cYUjsyftCXwvCLD02VDT24LQihLT6EZemr+UHnTIT1kJuOdkt2elIbeHHr80X oRAlwaHWSuVPUReX2VMze7YgrIfk1fqXjkwTYp4ZFGcgwRwHH4vRGlYZ85pQFn5lm6 +2CU40fOgH3+UNhDFG8vjY9eopAFO7ZwZueN+Bc8= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x48EDbuQ026990; Wed, 8 May 2019 14:13:39 +0000 In-Reply-To: <83woj1gjna.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.8) X-CTCH-RefID: str=0001.0A0B0202.5CD2E413.006A, 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=epTxMLhX c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=mDV3o1hIAAAA:8 a=AOgGGgTOfrf9p0zdByIA:9 a=CjuIK1q_8ugA:10 a=ausD_beliIWWzayK3jAA:9 a=B2y7HmGcmWMA: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:158945 Archived-At: --Apple-Mail=_8BAE67DE-1DED-443D-9E16-7D949471420A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 8 maj 2019 kl. 15.28 skrev Eli Zaretskii : >>=20 >>> OK, so how about adding such a variable as part of this improvement? >>=20 >> If it's all the same to you, I'd like to keep it separate. >=20 > I don't understand why: the change as it is looks a bit unclean to me, > whereas the effort to make it cleaner and more future-proof is not a > substantial one. How about dropping the Dired special case for the time being? Then the = immediate bug is fixed, and all we need to worry about is the 2.5 second = delay to Dired auto-revert updates, which we can fix separately in a = manner of our choosing. Simplified patch attached. --Apple-Mail=_8BAE67DE-1DED-443D-9E16-7D949471420A Content-Disposition: attachment; filename=0001-Don-t-use-file-notification-on-non-file-buffers.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-use-file-notification-on-non-file-buffers.patch" Content-Transfer-Encoding: quoted-printable =46rom=200ac97e913ffb3096934c64715f12921af5fce64a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=208=20May=202019=2000:02:59=20+0200=0A= Subject:=20[PATCH]=20Don't=20use=20file=20notification=20on=20non-file=20= buffers=0A=0AMost=20non-file=20buffers=20aren't=20served=20by=20file=20= notification=20in=0Aauto-revert=20mode;=20typically,=20they=20need=20to=20= be=20polled,=20like=20the=20Buffer=20List.=0AWith=20= `auto-revert-avoid-polling',=20setting=20a=20useless=20notification=20= means=0Athat=20such=20buffers=20may=20never=20be=20updated=20at=20all=20= (bug#35418).=0A=0A*=20lisp/autorevert.el=20(auto-revert-buffers):=0A= Modify=20condition=20for=20using=20notification.=0A---=0A=20= lisp/autorevert.el=20|=203=20++-=0A=201=20file=20changed,=202=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/lisp/autorevert.el=20b/lisp/autorevert.el=0Aindex=20= 7cd5e7ee8b..fbaffbf0d6=20100644=0A---=20a/lisp/autorevert.el=0A+++=20= b/lisp/autorevert.el=0A@@=20-859,7=20+859,8=20@@=20the=20timer=20when=20= no=20buffers=20need=20to=20be=20checked."=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(when=20(auto-revert-active-p)=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20;;=20Enable=20file=20notification.=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(when=20(and=20= auto-revert-use-notify=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(not=20= auto-revert-notify-watch-descriptor))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20= auto-revert-notify-watch-descriptor)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20buffer-file-name)=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (auto-revert-notify-add-watch))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(auto-revert-handler)))))=0A=20=09(setq=20bufs=20(cdr=20= bufs)))=0A--=20=0A2.20.1=20(Apple=20Git-117)=0A=0A= --Apple-Mail=_8BAE67DE-1DED-443D-9E16-7D949471420A--