GNU bug report logs -
#34765
26.1; with-temp-buffer should not run buffer-list-update-hook
Previous Next
Reported by: Alexander Miller <alexanderm <at> web.de>
Date: Tue, 5 Mar 2019 22:58:02 UTC
Severity: normal
Tags: fixed
Found in version 26.1
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 34765 <at> debbugs.gnu.org (full text, mbox):
> As I understand it: advising select-window served the purpose of
> remembering the
> current window so the modeline can be highlighted in tune with the
> selection. The
> advising code would also call force-mode-line-update, that in turn lead
> to a re-calculation
> of the frame title, in spacemacs this could in turn call format-spec,
> that would use a
> temp-buffer, that triggers buffer-list-update-hook, that triggers
> treemacs' follow-mode
> callback, that calls with-selected-window, that leads back to the
> modeline's select-window
> advice. That's more or less what the feedback loop looked like.
Thanks. IIUC this means that we'll have to put an extra warning in
the doc-string of 'buffer-list-update-hook' to not kill, rename or
create buffers or select another window with NORECORD nil in its
functions. I listed all functions calling that hook in the hope that
people would then avoid that but your example shows that such endless
recursions can be quite tricky to detect.
One major design goal of the new window change functions was to simply
not invoke them recursively so such scenarios should not happen there
(and was immediately proven wrong by the redisplay mechanism itself).
> > Can you pass me a corresponding URL?
>
> Did that already, Here it is again:
> https://github.com/magit/magit/issues/3738#issuecomment-464520582
I thought you had another one (with more insight into how that problem
triggered). But the scenario above is sufficient to imagine what can
happen ...
martin
This bug report was last modified 4 years and 153 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.