unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: martin rudalics <rudalics@gmx.at>
Cc: Sergey Organov <sorganov@gmail.com>,  emacs-devel@gnu.org
Subject: Re: Should (buffer-list) ever return killed buffers?
Date: Mon, 24 May 2021 12:31:23 -0400	[thread overview]
Message-ID: <jwvfsycxfj7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9b005615-9b52-cc9c-e620-bc87334f08e0@gmx.at> (martin rudalics's message of "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.

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




  parent reply	other threads:[~2021-05-24 16:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 23:14 Should (buffer-list) ever return killed buffers? Sergey Organov
2021-05-23 23:41 ` Stefan Monnier
2021-05-23 23:58   ` Sergey Organov
2021-05-24  3:32     ` Stefan Monnier
2021-05-24 14:15     ` martin rudalics
2021-05-24 14:23       ` Sergey Organov
2021-05-24 16:31       ` Stefan Monnier [this message]
2021-05-24 17:05         ` martin rudalics
2021-05-24 19:55           ` Stefan Monnier
2021-05-24 20:27       ` Sergey Organov
2021-05-25  6:49         ` martin rudalics
2021-05-24 13:41   ` [PATCH] " Sergey Organov
2021-05-24 14:04     ` Tassilo Horn
2021-05-24 14:25       ` Sergey Organov
2021-05-24 14:27     ` Eli Zaretskii
2021-05-24 14:50       ` martin rudalics
2021-05-24 15:05         ` Eli Zaretskii
2021-05-24 15:32           ` Sergey Organov
2021-05-24 16:07             ` [PATCH] " Philipp
2021-05-24 18:11               ` Sergey Organov
2021-05-24 18:31               ` Sergey Organov
2021-05-24 16:25             ` [PATCH] " Eli Zaretskii
2021-05-24 18:09               ` Sergey Organov
2021-05-24 16:04           ` martin rudalics
2021-05-24 16:30             ` Eli Zaretskii
2021-05-24 19:01               ` Stefan Monnier
2021-05-24 15:14         ` Sergey Organov
2021-07-22 11:27   ` Sergey Organov
2021-05-23 23:42 ` Clément Pit-Claudel
2021-05-23 23:55   ` Sergey Organov
2021-05-23 23:56     ` Clément Pit-Claudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfsycxfj7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=sorganov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).