From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66381: 29.1; Auto-revert not polling files when notifications are enabled Date: Sat, 07 Oct 2023 22:00:39 +0300 Message-ID: <83edi6z294.fsf@gnu.org> References: <83jzrz0xeq.fsf@gnu.org> <87bkdaihuo.fsf@gmx.de> <87il7igybs.fsf@gmx.de> <875y3igvp3.fsf@gmx.de> <83fs2mz3r6.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66381@debbugs.gnu.org, michael.albinus@gmx.de To: Daniel Jacobowitz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 07 21:02:10 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qpCZ0-000APk-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Oct 2023 21:02:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpCYa-0005xY-9e; Sat, 07 Oct 2023 15:01:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpCYZ-0005xB-4I for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 15:01:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpCYY-00089v-S5 for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 15:01:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpCYs-0002yX-3q for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 15:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2023 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66381 X-GNU-PR-Package: emacs Original-Received: via spool by 66381-submit@debbugs.gnu.org id=B66381.169670528511374 (code B ref 66381); Sat, 07 Oct 2023 19:02:02 +0000 Original-Received: (at 66381) by debbugs.gnu.org; 7 Oct 2023 19:01:25 +0000 Original-Received: from localhost ([127.0.0.1]:55926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpCYG-0002xN-Hk for submit@debbugs.gnu.org; Sat, 07 Oct 2023 15:01:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpCYE-0002xB-8A for 66381@debbugs.gnu.org; Sat, 07 Oct 2023 15:01:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpCXn-00085O-Jt; Sat, 07 Oct 2023 15:00:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5MkAnqxiWmQGJ8h7x3vdiXLeIrOSt50xNLQQE3MnQFM=; b=SEcpGy+lMfo5 vd+XHASnDkpv27tF5Vxkg3dIv+NY1oF9/GKLfmvqkS+v/DBdUKnCKLfUjxpBcOrcL+Do/xhUu1CXy F92DDjVExUEqyJthapR4yPlLJJWBk+LxHRdyC8xS1s6htauf0dTCTESJddBKBW7c87QmuRn7UAj3v kL/uOD0T7KGaYmevmHu4G/kdZxA7FTrBA0i16ftW/lAObwbBfCm5Wk+gpAP35rwk3S55Nbs1xkwZw lgu8brXXZefKmIjhWUxefKV96rjHy997HneFFk6x+jJaTxO8HsUfGhJ6Iibh6zhKRtQ3aWr5+avxc 6fc3Ve29DFG/oRv7ebu2EA==; In-Reply-To: (message from Daniel Jacobowitz on Sat, 7 Oct 2023 14:41:35 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272038 Archived-At: > From: Daniel Jacobowitz > Date: Sat, 7 Oct 2023 14:41:35 -0400 > Cc: michael.albinus@gmx.de, 66381@debbugs.gnu.org > > In auto-revert-handler: > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/autorevert.el#n779 > > (if buffer-file-name > (and (or auto-revert-remote-files > (not (file-remote-p buffer-file-name))) > (or (not auto-revert-notify-watch-descriptor) > auto-revert-notify-modified-p) > (if auto-revert-tail-mode > (and (file-readable-p buffer-file-name) > (/= auto-revert-tail-pos > (setq size > (file-attribute-size > (file-attributes buffer-file-name))))) > (funcall (or buffer-stale-function > #'buffer-stale--default-function) > t))) > > When buffer-file-name, revert is true iff: > > 1. auto-revert-remote-files or the file is not remote > AND 2. there is no watch descriptor or a notification was received > AND 3. some details about auto-revert-tail-mode OR t > > If auto-revert-notify-watch-descriptor and not > auto-revert-notify-modified-p, then the file won't be reverted. > auto-revert-handler does get called by the polling timer, but it > doesn't revert. That's not what your sentence said, which I said wasn't true. You said something much more radical: The implementation does not poll if there's a notification registered. Moreover, the documentation says that "polling is used even if notifications are enabled", and that is true regardless of whether the file is actually reverted or not. IOW, the documentation describes the usual case, where notifications are enabled and the watch descriptor is valid. It says nothing at all about your situation.