From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sergey Organov Newsgroups: gmane.emacs.devel Subject: Re: Should (buffer-list) ever return killed buffers? Date: Mon, 24 May 2021 17:23:45 +0300 Message-ID: <874kes1a8e.fsf@osv.gnss.ru> References: <87wnrpujo0.fsf@osv.gnss.ru> <87bl91uhn0.fsf@osv.gnss.ru> <9b005615-9b52-cc9c-e620-bc87334f08e0@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33053"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 24 16:37:18 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llBhm-0008Pd-5o for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 16:37:18 +0200 Original-Received: from localhost ([::1]:58842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llBhl-0001jL-72 for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 10:37:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llBUk-0005Vh-7K for emacs-devel@gnu.org; Mon, 24 May 2021 10:23:51 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:42707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llBUi-00009D-Gy for emacs-devel@gnu.org; Mon, 24 May 2021 10:23:49 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id t17so17111162ljd.9 for ; Mon, 24 May 2021 07:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Bigw6EzAOkWIUnurPgORWDPU1o0bXR+QiqpGhpXm2AQ=; b=gh9YhmpwAnOnbwVoNEEKlZ33IYNZyGnTR7T5nB6q1Ge80Zodf+GI17KWwC+ih4uPJT gi56F/t228oX6NcN+ZUFoTDoWJk0mG28T3FSh0YvmX0b9UZ+u7ma8RYpeQofBvRrcWAm BHl14CrQbR/MN4jvvt6sCEpWD91WPJ6gkJgoaFX60bRLIL8Fvkqaq+gWZDT1Yysj6J2f w/2NYoC/igd+v8yNdDlup1ynz41+cftBCYTBY84x5jtkZyuh4yIrfZS8zG1xOCz3Targ E4taEUmO7nw9KyQ0q0vzLkqF5FOl85dtigH1AxZ/zpICPFKEcU0BQfvlLzQfab5cMyB5 EcnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Bigw6EzAOkWIUnurPgORWDPU1o0bXR+QiqpGhpXm2AQ=; b=lU0oy8Q0wA88Aajff/HpREUl/f2fgFAQvG00DyaWJDwvV4fJn0lWdH2LyZ6GaUzigF OuUFQWhmSvMm4PATHqJ+aLLcHSSpJ8WzhUoOZNbo3qcClbS8RCd5y7YIBQemz+yh/0kP 8t5++FIYXqEQsTjOGc0WtEMhrrrPZtep6Q1m2+3zsoRioD+M83yJENdFTXMkh4buxOcX JfEuAsQE31vOo4m3iThoAkASp+w6CuyXSDi9WnhWgO2snHNdGhkmt96FKiYs4+DZlqWu n8idXOKvdLBrDzInUUQYZHclYmB+qGDA1veW1JawKjR1hEE+HVm5DXY6RtrFUicQjhUu epGQ== X-Gm-Message-State: AOAM532/ti4D00qGh2Jlq04eHu8bj/irUqFEzU/G7pTiBi71lvi0+nad P950yGSxz7R1AqZhhRTOj3gyIz3aE7s= X-Google-Smtp-Source: ABdhPJxN/e0cQWYznxbstr4fGXLhTIzm0vuhcLYJssuhwkxr+iRAHxUi3msR/CwX1u9qUDCgyfHsvw== X-Received: by 2002:a2e:1516:: with SMTP id s22mr17640026ljd.109.1621866226467; Mon, 24 May 2021 07:23:46 -0700 (PDT) Original-Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id r9sm1182057lfm.205.2021.05.24.07.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 07:23:45 -0700 (PDT) In-Reply-To: <9b005615-9b52-cc9c-e620-bc87334f08e0@gmx.at> (martin rudalics's message of "Mon, 24 May 2021 16:15:29 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=sorganov@gmail.com; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269760 Archived-At: martin rudalics writes: >>> 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) > ^^^^ Yep, that's needs to be (null bufname), obviously. Messed it when re-typed code from another PC where I've tested it, sorry! -- Sergey