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: Stefan Monnier
Subject: Re: Should (buffer-list) ever return killed buffers?
Date: Mon, 24 May 2021 12:31:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> 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.

I don't see how it explain anything.  The fact that it may quit doesn't
imply it can run timers or run arbitrary code which could lead to the
return value containing dead buffers.

> 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.

I never use the FRAME arg to it, so I can't speak for the behavior of
that use-case.  If it currently returns dead buffers, we should fix that.


        Stefan




reply via email to

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