Subject: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers

From: "Aaron Zeng" <[email-masked]>
Date: Sat, 08 Jun 2024 11:30:08 -0400

On Sat, Jun 8, 2024, at 03:03, Eli Zaretskii wrote:

> To see that at least the basic functionality works in Emacs, I did the
> following:
>
>   emacs -Q
>   C-x C-f SOME-FILE RET
>   M-x global-auto-revert-mode RET
>   M-x clone-indirect-buffer RET
>
> Then, outside Emacs, typed from the shell prompt
>
>   $ cat OTHER-FILE >> SOME-FILE
>
> where OTHER-FILE is some other existing file.  After that, I saw both
> the base buffer's text and that of its indirect clone change to
> reflect the appended text.

Indeed, while the indirect buffer is live, everything works fine.  However, after you kill the indirect buffer, then the buffer no longer gets auto-reverted when you modify SOME-FILE outside Emacs.

> So my conclusion is that the Subject of your bug report is not
> accurate: the auto-revert feature does work with indirect buffers as
> expected.  Which is why I think this might be an Org specific issue,
> since org-tree-to-indirect-buffer does more than just create an
> indirect buffer.

Good point.  I didn't know about M-x clone-indirect-buffer ("If I had more time, I would have written a shorter letter", etc.).

Thanks for your quick reply.