From unknown Thu Sep 11 18:07:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18373 <18373@debbugs.gnu.org> To: bug#18373 <18373@debbugs.gnu.org> Subject: Status: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) Reply-To: bug#18373 <18373@debbugs.gnu.org> Date: Fri, 12 Sep 2025 01:07:27 +0000 retitle 18373 desktop-create-buffer: may call bury-buffer on a just killed = buffer (?)=20 reassign 18373 emacs submitter 18373 Ivan Shmakov severity 18373 minor tag 18373 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 31 17:31:53 2014 Received: (at submit) by debbugs.gnu.org; 31 Aug 2014 21:31:53 +0000 Received: from localhost ([127.0.0.1]:55171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOCj3-0000PW-93 for submit@debbugs.gnu.org; Sun, 31 Aug 2014 17:31:53 -0400 Received: from fely.am-1.org ([78.47.74.50]:52797) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOCj0-0000PM-G5 for submit@debbugs.gnu.org; Sun, 31 Aug 2014 17:31:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=l1lMXQb59bhIdo9wcI2rcalnl4qA4TpIImXrfUGViXs=; b=ciar0XJiuEOSOnz+vyM6sB7/cDVsSsEJCPtXcUD6M+6igHPjV9UhAr+xoCuvmFJRHyzUcHlG4oXB5NVaJjcALmjBasRHsEEUPUP0hiuVut4SxxR1CjRk1gz1tjMeZn9McEbE/s0n/Dvku/IRCBFlY8+oI3za2HZpukIYSF3NLRM=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XOCiy-0003ra-QV for submit@debbugs.gnu.org; Sun, 31 Aug 2014 21:31:49 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XOCir-0001MZ-R6 for submit@debbugs.gnu.org; Mon, 01 Sep 2014 04:31:41 +0700 From: Ivan Shmakov To: submit@debbugs.gnu.org Subject: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) Date: Sun, 31 Aug 2014 21:31:41 +0000 Message-ID: <87ppfgtkg2.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: emacs Severity: minor Tags: patch Currently, desktop-create-buffer calls bury-buffer on every buffer listed in a saved version of (buffer-list) so to restore the order of buffers: 1375 ;; Restore buffer list order with new buffer at end. Don't change 1376 ;; the order for old desktop files (old desktop module behavior). 1377 (unless (< desktop-file-version 206) 1378 (mapc 'bury-buffer buffer-list) 1379 (when result (bury-buffer result))) This, however, fails =E2=80=93 should one or more of these buffers be killed after the list is saved but before it=E2=80=99s processed, =E2=80= =93 as happens with some (presumably temporary) buffers used by url-retrieve, which is in turn used while restoring EWW buffers per [1]. (Please note that the patch there is broken, though.) The patch MIMEd seems to fix the issue for me, although I=E2=80=99m not as of yet certain that no buffer can be killed in between the buffer-live-p check and the bury-buffer call. [1] http://debbugs.gnu.org/18010 --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1375,7 +1375,10 @@ after that many seconds of idle time." ;; Restore buffer list order with new buffer at end. Don't change ;; the order for old desktop files (old desktop module behavior). (unless (< desktop-file-version 206) - (mapc 'bury-buffer buffer-list) + (mapc (lambda (buf) + (and (buffer-live-p buf) + (bury-buffer buf))) + buffer-list) (when result (bury-buffer result))) (when result (unless (or desktop-first-buffer (< desktop-file-version 206)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 20:48:54 2014 Received: (at 18373-done) by debbugs.gnu.org; 10 Sep 2014 00:48:54 +0000 Received: from localhost ([127.0.0.1]:35804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRW5e-0005le-9X for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:48:54 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37184) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRW5c-0005lT-4s for 18373-done@debbugs.gnu.org; Tue, 09 Sep 2014 20:48:52 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s8A0mkjG002615; Tue, 9 Sep 2014 20:48:47 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 5758A660D3; Tue, 9 Sep 2014 20:48:36 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18373: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) Message-ID: References: <87ppfgtkg2.fsf@violet.siamics.net> Date: Tue, 09 Sep 2014 20:48:36 -0400 In-Reply-To: <87ppfgtkg2.fsf@violet.siamics.net> (Ivan Shmakov's message of "Sun, 31 Aug 2014 21:31:41 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5059=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5059> : inlines <1273> : streams <1285889> : uri <1812211> X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 18373-done Cc: 18373-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) Version:24.4 > This, however, fails =E2=80=93 should one or more of these buffers be > killed after the list is saved but before it=E2=80=99s processed, =E2=80= =93 as > happens with some (presumably temporary) buffers used by > url-retrieve, which is in turn used while restoring EWW buffers > per [1]. (Please note that the patch there is broken, though.) > The patch MIMEd seems to fix the issue for me, although I=E2=80=99m not > as of yet certain that no buffer can be killed in between the > buffer-live-p check and the bury-buffer call. Thanks, the patch looks good and safe, so I installed it into `emacs-24'. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 20:53:25 2014 Received: (at 18373) by debbugs.gnu.org; 10 Sep 2014 00:53:25 +0000 Received: from localhost ([127.0.0.1]:35812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRWA0-0005tS-1S for submit@debbugs.gnu.org; Tue, 09 Sep 2014 20:53:24 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58087) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRW9x-0005tJ-LN for 18373@debbugs.gnu.org; Tue, 09 Sep 2014 20:53:22 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s8A0rJJn003352; Tue, 9 Sep 2014 20:53:19 -0400 Received: by ceviche.home (Postfix, from userid 20848) id E0D9F660D3; Tue, 9 Sep 2014 20:53:18 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18373: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) Message-ID: References: <87ppfgtkg2.fsf@violet.siamics.net> Date: Tue, 09 Sep 2014 20:53:18 -0400 In-Reply-To: <87ppfgtkg2.fsf@violet.siamics.net> (Ivan Shmakov's message of "Sun, 31 Aug 2014 21:31:41 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.5 X-NAI-Spam-Rules: 2 Rules triggered AFF_LOTTO_1=0.5, RV5059=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5059> : inlines <1273> : streams <1285891> : uri <1812212> X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 18373 Cc: 18373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) While this patch was sufficiently small that we could accept it as is, if you intend to send us further patches (which I hope you do), you may soon bump into the limit of what we can accept without paperwork. So I think it might be worthwhile to sign the paperwork now, so that it's out of the way. If you agree, then please fill the form below and send it to the FSF as instructed so they can send you the relevant paperwork to sign. And if I already asked you this, then please accept my apologies for repeating myself. I'm having a hard time keeping track of these, for some reason (I guess I should write it down somewhere). Stefan Please email the following information to assign@gnu.org, and we will send you the assignment form for your past and future changes. Please use your full legal name (in ASCII characters) as the subject line of the message. ---------------------------------------------------------------------- REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES [What is the name of the program or package you're contributing to?] Emacs [Did you copy any files or text written by someone else in these changes? Even if that material is free software, we need to know about it.] [Do you have an employer who might have a basis to claim to own your changes? Do you attend a school which might make such a claim?] [For the copyright registration, what country are you a citizen of?] [What year were you born?] [Please write your email address here.] [Please write your postal address here.] [Which files have you changed so far, and which new files have you written so far?] From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 16 09:59:44 2014 Received: (at 18373) by debbugs.gnu.org; 16 Sep 2014 13:59:44 +0000 Received: from localhost ([127.0.0.1]:42526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XTtIG-0000yY-J7 for submit@debbugs.gnu.org; Tue, 16 Sep 2014 09:59:44 -0400 Received: from fely.am-1.org ([78.47.74.50]:33305) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XTtID-0000yO-Gx for 18373@debbugs.gnu.org; Tue, 16 Sep 2014 09:59:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=IzKvrBxUmSb6qDRobEZf/jd7O9gisiZ0kiSeo7EPi7o=; b=k/SYpC5qqPG/koHC7QsOZlPpJSuYHECjd9pOil4iW5NjYoUbRpiS3q48JjJC0gItdAt1mqrvSj60KwAAQEnQQnWoQKRkorv9gIDOQN/SNmlDAo8pRmT6HUHow4pljQA1dxEKZoXHO73TclWCqpFDVus7CLfV/5RVtuBbE5vmlMw=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XTtIB-0002ub-TA for 18373@debbugs.gnu.org; Tue, 16 Sep 2014 13:59:40 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XTtI4-0003xP-5M for 18373@debbugs.gnu.org; Tue, 16 Sep 2014 20:59:32 +0700 From: Ivan Shmakov To: 18373@debbugs.gnu.org Subject: Re: bug#18373: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) References: <87ppfgtkg2.fsf@violet.siamics.net> Date: Tue, 16 Sep 2014 13:59:30 +0000 In-Reply-To: (Stefan Monnier's message of "Tue, 09 Sep 2014 20:53:18 -0400") Message-ID: <87d2avu0n1.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18373 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Stefan Monnier writes: [=E2=80=A6] > So I think it might be worthwhile to sign the paperwork now, so that > it's out of the way. If you agree, then please fill the form below > and send it to the FSF as instructed so they can send you the > relevant paperwork to sign. I=E2=80=99ve just got confirmation that my assignment papers are processed (at last!) FTR, the rt.gnu.org ticket is #874240. [=E2=80=A6] --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 14:55:13 2014 Received: (at 18373) by debbugs.gnu.org; 24 Sep 2014 18:55:14 +0000 Received: from localhost ([127.0.0.1]:51032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWrib-0007lT-HW for submit@debbugs.gnu.org; Wed, 24 Sep 2014 14:55:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51073) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWriX-0007lI-FI for 18373@debbugs.gnu.org; Wed, 24 Sep 2014 14:55:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgGAIDvNVOnWBcZ/2dsb2JhbABZgwY7gw9Sv2uBFxd0giUBAQEBAgEjMyMFCwsaAhgOAgIUGA0kiAQIrxuifheBKY0MRQeCb4FJAQOrA4FxgVsh X-IPAS-Result: ArgGAIDvNVOnWBcZ/2dsb2JhbABZgwY7gw9Sv2uBFxd0giUBAQEBAgEjMyMFCwsaAhgOAgIUGA0kiAQIrxuifheBKY0MRQeCb4FJAQOrA4FxgVsh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90782192" Received: from 167-88-23-25.cpe.teksavvy.com (HELO ceviche.home) ([167.88.23.25]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2014 14:55:08 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 7555366094; Wed, 24 Sep 2014 14:55:08 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18373: desktop-create-buffer: may call bury-buffer on a just killed buffer (?) Message-ID: References: <87ppfgtkg2.fsf@violet.siamics.net> <87d2avu0n1.fsf@violet.siamics.net> Date: Wed, 24 Sep 2014 14:55:08 -0400 In-Reply-To: <87d2avu0n1.fsf@violet.siamics.net> (Ivan Shmakov's message of "Tue, 16 Sep 2014 13:59:30 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18373 Cc: 18373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I=E2=80=99ve just got confirmation that my assignment papers are > processed (at last!) FTR, the rt.gnu.org ticket is #874240. OK, I see them now. Great, thank you. Waiting for your patches now ;-) Stefan From unknown Thu Sep 11 18:07:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Oct 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator