Closed tsdh closed 4 years ago
Thu Apr 23 13:39:50 BST 2020
Further to the above, this error continuously shows up in the minibuffer
- making it effectively useless.
Just wondering why turning off aggressive-indent-mode
has no effect on the generation of the error?
(With AIM off, both aggressive-indent-mode
and aggressive-indent--changed-list
are nil
.)
@rprimus The error stays because the code trying to select a deleted buffer (which causes the error) is run from a timer and fails to cancel the timer for exactly that reason.
Odd that I didn't get that at all. Anyway, I agree with the fix and pushed a change. Sorry for the trouble, Tassilo.
@Malabarba This error appears to me when I close buffers within *Ibuffer* window, for example.
I hate to be the bearer of bad news... but this is still broken as of current master (12a64b4e5c1a1e124baa74336738b6ae1972607f
)
Here's a backtrace. I omitted some of it due to being extremely long plus containing some personal info, e.g. buffer names, but it should be useful still:
Debugger entered--Lisp error: (wrong-type-argument timerp nil)
signal(wrong-type-argument (timerp nil))
cancel-timer(nil)
aggressive-indent--indent-if-changed(#<killed buffer>)
apply(aggressive-indent--indent-if-changed #<killed buffer>)
timer-event-handler([t 0 0 50000 t aggressive-indent--indent-if-changed (#<killed buffer>) idle 0])
read-from-minibuffer(...<omitted>...)
<...omitted...>
@chasecaleb @Malabarba That's why I've had
(and aggressive-indent--idle-timer
(cancel-timer aggressive-indent--idle-timer)
in my fix. :-)
Since the update to the latest MELPA version 20200421.1149, I frequently get the error in the subject. I think the problem is that you use
with-current-buffer
and inside that, you then check if the buffer is live. I guess you need to do it the other way round. The following version works for me: