Closed bmag closed 3 years ago
This unfortunately doesn't work for my use case as we are back to pop-to-buffer not being able to pick a window wide enough again. Judging from the different heights of the windows in every invocation of debug
, I don't think this advice has any effect whatsoever. With that said, I think it's best to revert #182 for now. I've since discovered that although it can hand control to purpose to pick a window, it doesn't pick a frame, so if toggle-debug-on-error
is turned on and an error is thrown inside a small child frame like those made by company-box, the backtrace buffer is still popped up inside that tiny child frame. Picking a right window from the right frame needs a re-think.
As reported in https://github.com/bmag/emacs-purpose/pull/182#issuecomment-812232912, there seemed to be some recursion caused by using
cl-letf
. Should be fixed by usingcl-flet
.After invoking the debugger (i.e.,
M-x toggle-debug-on-entry RET beginning-of-buffer RET
followed byM-x beginning-of-buffer RET
), repeatedly stepping through (by pressingd
) would recurse into our advice every time. I wasn't able to recreate the same recursion (with other test functions) outside of the debugger environment, so there is probably be another mysterious factor in the debugger that triggers the recursion.