Subject: Re: bug#43412: [FEATURE] autorevert-only-if-visible [PATCH]

From: Eli Zaretskii <[email-masked]>
Date: Fri, 18 Sep 2020 09:35:31 +0300

> Date: Thu, 17 Sep 2020 16:10:49 -0400
> From: Boruch Baum <[email-masked]>
> Cc: martin rudalics <[email-masked]>, [email-masked]
> 
> > Can you describe the problematic case in more detail?  With that in
> > hand, perhaps Martin (CC'ed) could suggest a method.
> 
> I'm needing now to focus on Rosh HaShanna preparations, and can let
> emacs distract me for the next few days, but from memory, on tty emacs:

So the problems you had were only with TTY frames?

> 1) touch ~/foo
> 
> 2) find it in emacs
> 
> 3) bury the frame so it's not human-visible
> 
>    3.1) OT: I find it useful to globally bind C-x 5 b to function
>         select-frame-by-name, because I do this routinely as part of my
>         workflow. Another option might be C-x 5 2.
> 
> 4) M-! echo "bar" >> ~/foo
> 
> 5) switch to the buried frame
> 
> 6) Depending upon your timing, you'll need to wait up to
>    auto-revert-interval seconds for the buffer to be updated.

Thanks.  Hopefully, Martin will be able to help us out here.

> It maybe could all be solved if there were a hook for frame change of
> state (eg. getting/losing focus, being raised/buried). It's surprising
> to me that such events were never thought significant enough in emacs to
> merit a hook.

We do have focus-in-hook and focus-out-hook, for starters.