From unknown Sun Jun 15 01:09:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49692: 26.3; desktop-clear fails becasue of killed buffer Resent-From: Sergey Organov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 10:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49692 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 49692@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162694846014051 (code B ref -1); Thu, 22 Jul 2021 10:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jul 2021 10:07:40 +0000 Received: from localhost ([127.0.0.1]:39437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6VcC-0003eZ-37 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 06:07:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:53388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Vc9-0003eR-PW for submit@debbugs.gnu.org; Thu, 22 Jul 2021 06:07:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6Vc9-0000Ml-K7 for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 06:07:37 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:41661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6Vc4-00010O-Ss for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 06:07:37 -0400 Received: by mail-lf1-x131.google.com with SMTP id g8so7621262lfh.8 for ; Thu, 22 Jul 2021 03:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=h5JIeqsOm9HWEwQBwUGVrTMSf6186ege5YWzMw2kPww=; b=PTBDxjyi0uKm35tZaBjgBfV0RDiWMqWLyfrKtNBbo2tM6UJAtfMVS58WU3cHm8ZbiD NUalLaMNEukCuWhLM5YGvO0RD/q+fyquEHpdM2bniZmypYFtR+E2z0OzVRDvGH55cEYG 0EyLAy5e/SQNyNf0wp0Ey56QXMjurWIxIwIS7eyhWD60CDIUaUeROpcx4eYTCJdQmQT0 ziNXlWNrp1gON6KhMtxnRiFWWxgRjv+61D5r3fgkFfU2VhxfAjh5zNXg/SVSea0dEzzi g/tqHh5q7BOPhu5QBgH7DesE0zhikN73D5AmV7sGYot042+rsJMR7qau+4yIdI2i5k7X k6Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=h5JIeqsOm9HWEwQBwUGVrTMSf6186ege5YWzMw2kPww=; b=EVS0+aAN43a0iPRIUIWUvE3uDU1MQRJ08NLkoLD0vWLUSGjM10W6ZrXDY0CwyXwKGY NFvGyefmzNYh2GOzoXJMf3qHU52XXY3EV9Ue+GhjGQ1gHZlp/i/vQaYy4+hqzkPYmbUe OYb0xn/EfOaMv5cZGix8G1MKI/lg5taeAvfswvEYzNvmdshhUDL9sEDUXkOxZb32BH4E c5GiIl+QI+/qTkIXJyNjpNQVubHN1SYbAwGjfWs4Svm5m1euVkxZthbaVKsevWy6l3D7 KJLxb7b5tELC4Og22O1WTgQBRmODAivCFy/Xobzr1qWFWuxJ46whzuLUCXBU+O0+JHNt tIeg== X-Gm-Message-State: AOAM533SO5RqAzvEtusLpiXG5LaZNJph+Sp8aXcSJl2FzHsIiiRMRJJn nm/GVtuM0nI/xvYFwSCnMkfED9QN3xI= X-Google-Smtp-Source: ABdhPJyYzNlOri3gpemS8vt18qVeQAjaZ+fnT03P8gN6wCs7Gmyj/5YtVtvdmwiRPvk+WYNDbgIfRg== X-Received: by 2002:ac2:44c2:: with SMTP id d2mr1369199lfm.50.1626948450153; Thu, 22 Jul 2021 03:07:30 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id q188sm1525515ljq.132.2021.07.22.03.07.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 03:07:29 -0700 (PDT) From: Sergey Organov Date: Thu, 22 Jul 2021 13:07:28 +0300 Message-ID: <87czrairvj.fsf@osv.gnss.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=sorganov@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.3 (--) Starting from 'emacs -Q': C-h i m libc M-x desktop-clear errors out with: Wrong type argument: arrayp, nil Here is a patch that fixes it: --8<---------------cut here---------------start------------->8--- Subject: [PATCH] Avoid failing in desktop-clear due to killed buffers * lisp/desktop.el (desktop-clear): check that buffer is not already killed before attempting to kill it. A buffer might become killed as part of regular operation as a side-effect of killing another buffer, and then attempt to kill it again causes error. --- lisp/desktop.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/desktop.el b/lisp/desktop.el index b9467c87527a..24bb2817aaea 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -706,7 +706,8 @@ if different)." "\\)\\'"))) (dolist (buffer (buffer-list)) (let ((bufname (buffer-name buffer))) - (unless (or (eq (aref bufname 0) ?\s) ;; Don't kill internal buffers + (unless (or (null bufname) + (eq (aref bufname 0) ?\s) ;; Don't kill internal buffers (string-match-p preserve-regexp bufname)) (kill-buffer buffer))))) (delete-other-windows) --8<---------------cut here---------------end--------------->8--- In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian built on lcy01-amd64-020 System Description: Ubuntu 20.04.2 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Defining kbd macro... No keyboard macro defined. Quit Setting up indent for shell type bash Indentation variables are now local. Indentation setup for shell type bash Composing main Info directory...done funcall-interactively: Wrong type argument: arrayp, nil Making completion list... Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs-mEZBk7/emacs-26.3+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_MONETARY: en_GB.UTF-8 value of $LC_NUMERIC: en_GB.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: C.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils desktop frameset cl-loaddefs cl-lib jka-compr info easymenu sh-script smie executable kmacro term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 116511 7052) (symbols 48 21504 1) (miscs 40 40 115) (strings 32 36315 1226) (string-bytes 1 920524) (vectors 16 13524) (vector-slots 8 476806 9900) (floats 8 59 815) (intervals 56 278 3) (buffers 992 12)) From unknown Sun Jun 15 01:09:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49692: 26.3; desktop-clear fails becasue of killed buffer Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 12:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49692 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sergey Organov Cc: 49692@debbugs.gnu.org Received: via spool by 49692-submit@debbugs.gnu.org id=B49692.16269565693496 (code B ref 49692); Thu, 22 Jul 2021 12:23:02 +0000 Received: (at 49692) by debbugs.gnu.org; 22 Jul 2021 12:22:49 +0000 Received: from localhost ([127.0.0.1]:39575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Xiz-0000uK-DV for submit@debbugs.gnu.org; Thu, 22 Jul 2021 08:22:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Xix-0000u3-TP for 49692@debbugs.gnu.org; Thu, 22 Jul 2021 08:22:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YPPaA7dfhANFHcAYLWA8FvSREIf7JMI7brikvLzPBWQ=; b=cBE2vruozMEPETLppGfrI3vlY3 DRjXOKnsJbNXRV+bksl1WXbmIbjAtZSRxB88zOEZQE1sMUkSX87FnMggXUF+/p7ELTIVZdEv8SCTU 5eWTqQSisPTgWD8b5A+l0ntPpoZZjs8WFAJ85hg2uFouTQuSM0PNq/gbdxZRlyISym9M=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6Xip-00028v-Fm; Thu, 22 Jul 2021 14:22:41 +0200 From: Lars Ingebrigtsen References: <87czrairvj.fsf@osv.gnss.ru> X-Now-Playing: Hilary Woods's _Birthmarks_: "Mud and Stones" Date: Thu, 22 Jul 2021 14:22:39 +0200 In-Reply-To: <87czrairvj.fsf@osv.gnss.ru> (Sergey Organov's message of "Thu, 22 Jul 2021 13:07:28 +0300") Message-ID: <871r7qmtbk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Sergey Organov writes: > Here is a patch that fixes it: > > Subject: [PATCH] Avoid failing in desktop-clear due to killed buffers Thanks; applied to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) Sergey Organov writes: > Here is a patch that fixes it: > > Subject: [PATCH] Avoid failing in desktop-clear due to killed buffers Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 22 08:22:55 2021 Received: (at control) by debbugs.gnu.org; 22 Jul 2021 12:22:55 +0000 Received: from localhost ([127.0.0.1]:39581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Xj4-0000uk-Tb for submit@debbugs.gnu.org; Thu, 22 Jul 2021 08:22:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Xj3-0000uC-3w for control@debbugs.gnu.org; Thu, 22 Jul 2021 08:22:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3p20ju270jan61iuCRmuiUYwfFL2+oolV0heaJchgyM=; b=io9KuDt8SPpir07IULdnY8xRX1 C8wHlxzmECZ1Rq7kul9wdFXGfStm6WsqXWDDhsMycnsB8KSYHhFLIvBZ5IBgVI2NkmzuEU3PdZtc4 SZWwYsAEKeWsQsp+8y0GTJSwobfC2biSB29Xi0n8MPKoR86m0BKmUD8uLona4Zrd/SkQ=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6Xiv-000296-JT for control@debbugs.gnu.org; Thu, 22 Jul 2021 14:22:47 +0200 Date: Thu, 22 Jul 2021 14:22:45 +0200 Message-Id: <87zgueleqy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49692 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49692 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) close 49692 28.1 quit