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: Tue, 29 Sep 2020 09:05:20 -0400 Message-ID: <20200929130520.fub7arg7ifmgzmec@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=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14891"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 Cc: 43412@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 29 15:08:51 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 1kNFND-0003ms-8P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 15:08:51 +0200 Original-Received: from localhost ([::1]:49382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNFNC-0003ld-4a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 09:08:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNFKV-0000wB-5D for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 09:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNFKU-0004dh-QD for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNFKU-00077P-Ih for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 09:06: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: Tue, 29 Sep 2020 13:06: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.160138473227322 (code B ref 43412); Tue, 29 Sep 2020 13:06:02 +0000 Original-Received: (at 43412) by debbugs.gnu.org; 29 Sep 2020 13:05:32 +0000 Original-Received: from localhost ([127.0.0.1]:55183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNFK0-00076c-H9 for submit@debbugs.gnu.org; Tue, 29 Sep 2020 09:05:32 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:49619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNFJy-00076N-NE for 43412@debbugs.gnu.org; Tue, 29 Sep 2020 09:05:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601384724; bh=fxgwf0JBCDwa7dL6f4bGD9ntAg6QqFy3uEUDIV/F4mw=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=ahppvkXYyCUUFAZBUKbeCwWqV+apwEFOQvICY5mAEmVNjUK7SUFsmdTy2xwK5i/uB Tw3czVv/ReXpsTYfGdh4OgmqoKt5OaGdJwFKtGFrFFT043Fngf2/Fk4WgHFg/Z3M/Z AqlnEiiKaq9YcLuOsI8mOZM+1FatHU+Svcq1fMWY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MEV3C-1kBejx3opm-00G0Bq; Tue, 29 Sep 2020 15:05:24 +0200 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:oK9k43YrWfQ8nTrinJVtNVYmiiFlwG7sF34Dwmkpph+jn4cjf5l fF+FcCMVLtWwj6Ha0M4UZFknLIuvyJDSXJqLOb5tBg4GF7LhzfJZc95nKWcrDGiLUj4IWWT d4OPTn3LhosCZKUoSfWtyWK0IJDMnwFhaSHPptrvekzUr3+5wyH05wc0H5w0oWEqw9dwMpY l92rVbdFKC3Fj7jG4obiQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:DE6pRYYVE1U=:hBGOH72RrKGGQauF3MXoCd Zwb627QAzB+H4m1dLNYNwayTuJtU2DRSCjtQ2crxkK3i21gGh3FjASqFGNtSSqGUUt9WFAlz/ gURdDHk8WGeqGC9++qrqMXPTyvcL/PL1Gc0NJp2RnjDpuXPlvBZPCnMfY7zSAtq8IXcIYfPsK /tjyuqLW7n3yW5iJkcVO0sAzGfdKZv1c5r20LhdiSiPiVued4fxr4biGS+8Skh5aFaPt12Lol Ea9erYQ9qULyqtrj9J63M6a+iUz9tLaUFQq6QtPcOcz6SC/kYOpVF//DkYalpJAM6DX6a2+IN acoR0M5GyGjxR1f0dtvgWfS25L8Uxo4WnGCaXhpr5FwV9uNENy0CjJJgwLf9iH+ZVDESCE+N0 CdcsenDD8xaZD8Pl6OzFCURRVYSqSSYOtx5bTmjaZLhUSFSYk2QouCD+or8k87KR5RfEVX+93 RBb8dbZ9mSaqlEiTnM9BwwGYM9AmIteJFYtG952j+dZMXNwLO5JjB32Cae26zGg8B68IfL1E5 pGLaw8exTvQPcNjvetcohTW8yWa6egd8WPEFCANBDKNft8I0QbwApxtJQk5bbvEK2xrxZIuKS MR7c9GrAw3wsaIYgdabI9KY8Wb+oogu6fzD6WWqLdNE1pK8nqCfkziK+kcTd+q8ot+Ad1sGju W8FSxRvymcloLOgTzr35R4xhJDpBS48ZJe8x+EbWFMFKwudeqpdZ0CzQmUpZe1arnJxTufSyU 3viAyBv9w7Gb1gIYJeVErnK0fjlUhADgp49tSMlu2teEhXQkrs8055a5FK1hLAZiiQs+luKB 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:189246 Archived-At: On 2020-09-18 09:49, martin rudalics wrote: > If you have any further questions, please ask. Thanks for the informative response. None of the symbols you mentioned are available in the emacs version I normally use, so they were all new to me. I do have two follow-up questions that could save me some time: 1) For function `window-buffer-change-functions' when set globally: the docstring says that it takes an arg FRAME. During execution of those functions, will that arg necessarily be `(selected-frame)'? 2) For function `window-buffer-change-functions' when set buffer-local: Is there a straightforward way to ensure that the value will be set for all buffers, current and future? This would be subtly different from the description of what occurs when setting the value globally, because no window-walk would be required, and it wouldn't be triggered by window deletion events. All I see is `buffer-list-update-hook' which is run by `get-buffer-create' (OK), but it's also run by =E2=80=98make-indirect-buff= er=E2=80=99, =E2=80=98rename-buffer=E2=80=99, =E2=80=98kill-buffer=E2=80=99, =E2=80=98b= ury-buffer-internal=E2=80=99 and =E2=80=98select-window=E2=80=99 (all unnecessary for setting a buffer-loca= l value in `window-buffer-change-functions'). > When these added functions (probably it's one and the same function) are > run, one can use 'window-old-buffer', 'frame-old-selected-window', > 'old-selected-window' and 'old-selected-frame' to individually check > what has changed since the last time. For example, to find out whether > a window on the frame reported by 'window-buffer-change-functions' has > changed its buffer, 'walk-window-tree' for that frame with a function > that checks whether 'window-buffer' for any such window differs from > 'window-old-buffer'. If it does differ, you probably want to check > whether that buffer should be reverted. > For 'window-selection-change-functions' you probably want to just check > whether the buffer of the selected window of the reported frame should > be reverted. I would avoid using 'window-configuration-change-hook' > because that hook also triggers when a window changed its size. All > hooks are described in detail in section "28.28 Hooks for Window > Scrolling and Changes" of the Elisp manual. Slightly off-topic: The 'describe-*' output for these symbols all have an ambiguous statement "Probably introduced at or before Emacs version 27.1". What's that 'probably' all about? Shouldn't the statement be unequivocal, at least for recently added symbols? =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0