From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#43412: [FEATURE] autorevert-only-if-visible [PATCH] Date: Thu, 17 Sep 2020 16:10:49 -0400 Message-ID: <20200917201049.jihclkumemv4mbhz@E15-2016.optimum.net> References: <20200915040728.77ufv7g6bekvrzqa@E15-2016.optimum.net> <83y2lb8648.fsf@gnu.org> <20200915153958.e2nry7dxl3pmu3k6@E15-2016.optimum.net> <83imcf82fy.fsf@gnu.org> <20200915161239.f3fb74daihpon64w@E15-2016.optimum.net> <83een37y21.fsf@gnu.org> <20200916201104.ktl6aukmpe5hk6g2@E15-2016.optimum.net> <83a6xo7dgv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37453"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 Cc: 43412@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 22:13:58 2020 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 1kJ0Hz-0009c8-Kr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 22:13:55 +0200 Original-Received: from localhost ([::1]:49382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJ0Hy-0002x8-G7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 16:13:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJ0FF-0000wk-4o for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 16:11:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJ0FC-0007uO-Ni for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 16:11:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJ0FC-0007Vc-HX for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 16:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43412-submit@debbugs.gnu.org id=B43412.160037346128856 (code B ref 43412); Thu, 17 Sep 2020 20:11:02 +0000 Original-Received: (at 43412) by debbugs.gnu.org; 17 Sep 2020 20:11:01 +0000 Original-Received: from localhost ([127.0.0.1]:39199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ0FA-0007VM-Sd for submit@debbugs.gnu.org; Thu, 17 Sep 2020 16:11:01 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:47983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ0F8-0007V9-V5 for 43412@debbugs.gnu.org; Thu, 17 Sep 2020 16:10:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600373452; bh=rsAa29aJEdmeE7jovVVgLheG9GvhY6fJwMv1+rSKq1c=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=XYQ6x5kzVe6fyGlOpgjQkkg2DjUrQnZCK3pvMX7RbU8EsHC3YWlBn2Jeb30/7PMce CFLd4WUteG5RkPYy3xpcNhYB75oh2Hf+feucEkIv8yVW579wc1fzPQNEc30AtNK54g QzZ1H36Lbw6/Y6dPSOR9X7NICHv93jqWcMZ9qeZs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MNKm0-1k7PNO0opu-00OsRu; Thu, 17 Sep 2020 22:10:52 +0200 Content-Disposition: inline In-Reply-To: <83a6xo7dgv.fsf@gnu.org> X-Provags-ID: V03:K1:fLfRwY9lRGqxOpWzjsOaesJxhMgdloQHxixZO/DHduryw00tslO faxFIlxbqdzX9BChLwkAMFy7TOUcteTvzIPFiUxSR1LQZmKMg7RO0aiOgiKAwMEXHzVrop7 erYVyONYocSFkTPjXGsc3XjfHbm9QoH5oeeQl8zlyQPsz2ZFDGre1jffAuPVMNgm8nEYQDI RHwHLgRgjlFqqMSMGdANA== X-UI-Out-Filterresults: notjunk:1;V03:K0:aMdidbtu/yo=:LxMMCmFDeFZQDRjb4it/ml f/gTY5j2z9raZPyyAIsSEtMFANpd90pmKnthbIko75UjDfCYOPoJlKK+bE3EKw7CtaRD9+fUn T9t34FacPMQbKXPQR/0ysxLzdd9DyFk24v58uXtAnbcsTfNdM4fRph9FkQD6XYvMPEB+JR9xO fZJFGoGr4SVmhhulrykZTDFt416p1CBPPgfhUDDPVKVvBQ0LDynKGaoOtY1g2LTC73YObCFIj OUmmLBms5PConYxop2chFRWDNb+adhpYk9BkVZxhgXQHp3S+sFaH7hTyUhRTST3YnAYJP4aRI 8GEaN7I3DzM/KBMezUB5SLeM95OI2GUFiwORiY0iJcHOskKLakaoL+lDDtoXE2jSAvMc+5ZMz yQ38/MbNjgH1PffE862r4O9vlQMrkqR00D9S1eihhBHoXbCDfe5M3jeK/rHKx+s4Id7UuCy/0 R/Z8sIOmovxpdNh3q/HoGPEbOK2Eq7OBVvirDOUJsV3Re7tNKT/t6t2Fdcm0c5yBO90IVYt5p 6ZEIVOgQ/2LUecYdCt1DElakQXqxMj+sL3fh0Tim2xI0u8rCdOAyPGDbVUEihpvUOLnvQ7fLO cDE/xq0PMApwjuzhPSLkizn6tLgm+yWiXalQlkDFdoJA33xB3T19dOL5eGMOigwEx9Hq+RR+W NW9uuW89U0dhU2LuJZdziBLydhXRsDbZGg2b+Wt3GjQg8MiUVb+z1d8Tak1C/jA6UJbsf3oTZ IrS2s/wJs37HhL1hPOxV9sL5iuqtVKNe4rpjHdlVUhoCP/4rH9/8mwfQQsp2TMyxT9be1rel 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" Xref: news.gmane.io gmane.emacs.bugs:188251 Archived-At: On 2020-09-17 16:13, Eli Zaretskii wrote: > > Date: Wed, 16 Sep 2020 16:11:04 -0400 > > From: Boruch Baum > > Cc: 43412@debbugs.gnu.org > > > > 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 doe= s > > 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 operat= e > > _at__all_ on many types of file changes), and this limitation only > > introduces a delay, so by comparison its a pretty mild limitation. > > If we have no better way, we could document this as a limitation, > yes. But let's make one more attempt to solve this. > > > 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? > > 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: 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. > > 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'. > > Yes, I'd prefer to avoid such solutions. 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. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0