emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should (buffer-list) ever return killed buffers?


From: martin rudalics
Subject: Re: Should (buffer-list) ever return killed buffers?
Date: Mon, 24 May 2021 16:15:29 +0200

>> I strongly suspect that the problem goes as follows:
>> - buffer-list returns a list of buffers that are all live (i.e. no bug
>>    there).

I strongly doubt that.  For me the reason is that `buffer-list' runs
FOR_EACH_TAIL_INTERNAL with third argument true which may quit.  The
earlier mentioned "And how running from a timer could be involved?"
should explain what happens then.

>> - while processing that list, some of its buffers die.
>> So I think the bug is in `desktop-clear` which should skip buffers that
>> have died between the call to `buffer-list` and the moment we get to
>> process them.

We should fix `buffer-list' appropriately.  IIUC it's broken anyway with
a non-nil FRAME argument - it nowhere checks whether the buffers on
FRAME's buffer list and buried buffer list are live.

> +  (unless (or (nill bufname)
                     ^^^^

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]