unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <daniel.jacobowitz@gmail.com>
Cc: 66381@debbugs.gnu.org, michael.albinus@gmx.de
Subject: bug#66381: 29.1; Auto-revert not polling files when notifications are enabled
Date: Sat, 07 Oct 2023 22:00:39 +0300	[thread overview]
Message-ID: <83edi6z294.fsf@gnu.org> (raw)
In-Reply-To: <CAN9gPaFOsMxXGs9ZKYia4CQ54tkT7URMEiGF7yYTmMR5k6PEaA@mail.gmail.com> (message from Daniel Jacobowitz on Sat, 7 Oct 2023 14:41:35 -0400)

> From: Daniel Jacobowitz <daniel.jacobowitz@gmail.com>
> 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.





  parent reply	other threads:[~2023-10-07 19:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 17:13 bug#66381: 29.1; Auto-revert not polling files when notifications are enabled Daniel Jacobowitz
2023-10-07  6:17 ` Eli Zaretskii
2023-10-07 15:15   ` Michael Albinus
2023-10-07 16:14     ` Daniel Jacobowitz
2023-10-07 17:02       ` Michael Albinus
     [not found]         ` <CAN9gPaEi7yPgC4cA9fR-TtSmsVg6CoTOZ=bbZFa1gjQA_B1vGA@mail.gmail.com>
2023-10-07 17:59           ` Michael Albinus
2023-10-07 18:14             ` Daniel Jacobowitz
2023-10-07 18:28               ` Eli Zaretskii
2023-10-07 18:41                 ` Daniel Jacobowitz
2023-10-07 18:48                   ` Daniel Jacobowitz
2023-10-07 19:00                   ` Eli Zaretskii [this message]
2023-10-08  8:24                     ` Michael Albinus
2023-10-08 12:38                       ` Michael Albinus
2023-10-09 18:17                         ` Daniel Jacobowitz
2023-10-10 18:03                           ` Michael Albinus
2023-10-13 12:05                             ` Eli Zaretskii
2023-10-15 13:58                               ` Michael Albinus
2023-10-16 12:38                                 ` Eli Zaretskii
2023-10-16 14:29                                   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83edi6z294.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=66381@debbugs.gnu.org \
    --cc=daniel.jacobowitz@gmail.com \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).