[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
From: |
Alexander Miller |
Subject: |
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook |
Date: |
Wed, 6 Mar 2019 12:29:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
> When you show a temporary buffer and temporarily show another
> buffer in the same window, there must be a way to show the temporary
> buffer again.
I do no understand the use-case you have in mind here. with-temp-buffer
serves to create a short-lived temporary buffer that is quickly disposed
of again. When would such a buffer be shown anywhere?
> I'm afraid you have to dig further to find out how
> 'buffer-list-update-hook' precisely gets called here.
Did that, turns out it's down to mode-line packages, both powerline and
doom-modeline are advising select-window. I'll create PRs for both.
> What was the issue there?
Same feedback loop as described above, except it would only happen
when a region was active in magit's status buffer. I had tracked
the cause to a temp buffer deep inside magit's internals. Here's the
github link:
https://github.com/magit/magit/issues/3738#issuecomment-464520582
> Emacs 27 now has 'window-selection-change-functions', strongly
> tied to redisplay and triggering only when the window selection has
> changed since last redisplay. Maybe you could try that.
This problem occurs in my treemacs package, so I cannot use a solution
provided by a bleeding edge release, my modus operandi is to support the
last 2 versions of emacs, so 25 and 26 (since stable distros like debian
still use emacs 25). At any rate I have found the culprit in those modeline
packages, so that point is solved.