Closed loyalpartner closed 4 years ago
我估计是doom-modeline的锅,awesome-tab不会刷新modeline
移除了 doom-modeline , modeline 也会闪 (setq flycheck-check-syntax-automatically '(save mode-enabled idle-buffer-switch)) 这个设置让flycheck 在切换buffer的时候之后执行检查,似乎flycheck 又会生成一个 flycheck_xxx.el 的文件并被emacs打开了
测试 emacs -Q 并只用awesome-tab,对比测试下,如果emacs -Q没问题就不是awesome-tab的锅
flycheck 里面如果设置了
(setq flycheck-check-syntax-automatically '(save mode-enabled idle-buffer-switch)),
会添加 buffer-list-update-hook,
https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-List.html#Buffer-List
里面提到
Functions run by this hook should avoid calling select-window with a nil norecord argument or with-temp-buffer since either may lead to infinite recursion.
解决办法就是: 在 (with-temp-buffer ...) 外面套上 (let (buffer-list-update-hook) (with-temp-buffer ...) )
配置:
复现方法: 开两个窗口,分别打开来个不同的 elisp 文件, 然后多按几次保存