unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43412@debbugs.gnu.org
Subject: bug#43412: [FEATURE] autorevert-only-if-visible [PATCH]
Date: Wed, 16 Sep 2020 16:11:04 -0400	[thread overview]
Message-ID: <20200916201104.ktl6aukmpe5hk6g2@E15-2016.optimum.net> (raw)
In-Reply-To: <83een37y21.fsf@gnu.org>

On 2020-09-15 20:24, Eli Zaretskii wrote:
> > Date: Tue, 15 Sep 2020 12:12:39 -0400
> > From: Boruch Baum <boruch_baum@gmx.com>
> > Cc: 43412@debbugs.gnu.org
> >
> > > Maybe we should arrange it to actually auto-revert before being
> > > displayed.  I envision bug reports if we don't.
> >
> > Do you have a strategy or implementation in mind? Would adding a
> > function to `window-configuration-change-hook' do the trick (ie. catch
> > all relevant events)?
>
> Yes, I think so.

It looks to me like that's not the case: my testing seems to show that
it does catch cases of changing a buffer displayed in a window but does
not catch changes of frames due to functions like `other-frame' or
`select-frame'.

So, the good news is that I've written the code that makes the
improvement for the caught cases, and I can submit that.

As for the cases of changing frames, a less-desirable option would be to
preempt bug-reports by documenting the limitation. Auto-revert already
has other curious limitations (eg. for dired buffers it doesn't operate
_at__all_ on many types of file changes), and this limitation only
introduces a delay, so by comparison its a pretty mild limitation.

A better option would be able to catch frame-change events. I haven't
found a straightforward way to trap that. Does such a method exist?

An inelegant solution that would cover most of the remaining events
would be to advise :after ~4 frame functions, and to add an element to
variable `move-frame-functions'.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





  reply	other threads:[~2020-09-16 20:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  4:07 bug#43412: [FEATURE] autorevert-only-if-visible [PATCH] Boruch Baum
2020-09-15 14:30 ` Eli Zaretskii
2020-09-15 15:39   ` Boruch Baum
2020-09-15 15:49     ` Eli Zaretskii
2020-09-15 16:12       ` Boruch Baum
2020-09-15 17:24         ` Eli Zaretskii
2020-09-16 20:11           ` Boruch Baum [this message]
2020-09-17 13:13             ` Eli Zaretskii
2020-09-17 20:10               ` Boruch Baum
2020-09-18  6:35                 ` Eli Zaretskii
2020-09-18  7:49               ` martin rudalics
2020-09-29 13:05                 ` Boruch Baum
2020-09-29 14:34                   ` martin rudalics
2020-09-29 14:45                   ` Eli Zaretskii
2020-09-15 18:47 ` Michael Albinus
2020-09-15 19:31   ` Boruch Baum
2020-09-17 11:07     ` Michael Albinus
2020-09-17 20:03       ` Boruch Baum

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=20200916201104.ktl6aukmpe5hk6g2@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=43412@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).