From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs Date: Mon, 30 Dec 2024 02:37:33 +0100 Message-ID: <87cyhavtlu.fsf@web.de> References: <86h675s77g.fsf@gnu.org> <864j2py29u.fsf@gnu.org> <864j2ow93z.fsf@gnu.org> <875xn3jm1x.fsf@web.de> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16459"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , "74881@debbugs.gnu.org" <74881@debbugs.gnu.org> To: Lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 30 02:37:43 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tS4j0-00049m-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Dec 2024 02:37:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tS4id-0007OQ-Dn; Sun, 29 Dec 2024 20:37:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tS4iN-0007EP-Mn for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 20:37:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tS4iN-0003wj-Em for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 20:37:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Fm4x3ZDk75mNKL5kPLOx3BFj9/0swSYdHNgUz91FiXw=; b=kUs+pM6iKpbKL0AlxCeIEz9foZL0QcKv18JDvUncTHYfg79tpPS0WuR1AylEpUsB/4iNot7kO0bS/1XjioceS8KCA00ogEnJdGonG7nuA1EhpDFdgTWaW9J1JofN1INDQAh6ijrNE4+T6uCzghu+mLdcnvJbjceRiqQwiasDw+9GGavtYYfNYEQEe8ngJFDwKJtaztNlYxYEXEexLU1VbxZfs1IlWgDcGw0k5MtX7V4adbXLH5p90NiTaFYDxoQwWDKEevncbGQdn4QEhVUAzLJdcOkg4/RGd/U6uqhzGGeZFAFs1Lx1cjO10QNCPXFvN9TnuFNJ3lmpBh2rWTKyCA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tS4iM-0000gC-92 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 20:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2024 01:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74881 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74881-submit@debbugs.gnu.org id=B74881.17355226012583 (code B ref 74881); Mon, 30 Dec 2024 01:37:02 +0000 Original-Received: (at 74881) by debbugs.gnu.org; 30 Dec 2024 01:36:41 +0000 Original-Received: from localhost ([127.0.0.1]:56703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tS4i1-0000fb-4w for submit@debbugs.gnu.org; Sun, 29 Dec 2024 20:36:41 -0500 Original-Received: from mout.web.de ([212.227.17.11]:40735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tS4hz-0000fN-C9 for 74881@debbugs.gnu.org; Sun, 29 Dec 2024 20:36:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1735522585; x=1736127385; i=michael_heerdegen@web.de; bh=Fm4x3ZDk75mNKL5kPLOx3BFj9/0swSYdHNgUz91FiXw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=od1Q8N7X1WEw8jyG9S8o957uilDEqnUSOOogZ3mbd4Zlq1QC/6ceoa+sm/oEHPDR fNeBHSr3qw8+5mgWGm3REpxCbN43bV5tq+EmtOJaTIpOrWhakpAVfjGbsLe4HZnsQ t7Jk1CspkVpARm5kYekLYTbulHERvUhw9p86ZUgRCUr/xvBm8YvbvnoKz8C+7EN3v RpDNqeKbtIRLeb9caGedZQW+KDiiCWEugDruAJ8yHm3SPapYYw/6oVeSbaq/WtPt3 kJhY3t0dCFI6x/WaJ3S9syNf6cWfVPDGPDht8YICsWxDXtV7l2eQpzzms+fupqDDp OL1Ok/RzR71tQGrWjQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MW9vU-1sztsQ45tq-00QvQE; Mon, 30 Dec 2024 02:36:25 +0100 In-Reply-To: (Lin Sun's message of "Sun, 29 Dec 2024 02:25:16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ryV9OIwygMdm/sx8A X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297979 Archived-At: Lin Sun writes: > I didn't found a local version of `kill-emacs-hook`=C2=A0example in emacs > git repo. I would expect it to work. I found one in Gnu Elpa, in "subed.el". > Current version also work for the killing from command line, for > example executing a "pkill emacs" during ediff session. I think this feature would not go. > diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el > index 33666535843..d448973b345 100644 > --- a/lisp/vc/ediff-util.el > +++ b/lisp/vc/ediff-util.el > @@ -219,12 +219,11 @@ ediff--delete-temp-files-on-kill-emacs > ;; where this hook could prevent kill-emacs from shutting down Emacs, > ;; because user interaction is not possible (e.g., in a daemon), or > ;; if deleting these files signals an error. > - (ignore-errors > - (let ((inhibit-interaction t)) > - (dolist (b (buffer-list)) > + (let ((inhibit-interaction t)) > + (dolist (b ediff-session-registry) > + (ignore-errors > (with-current-buffer b > - (when (eq major-mode 'ediff-mode) > - (ediff-delete-temp-files))))))) > + (ediff-delete-temp-files)))))) >=20=20 > ;;; Setup functions Yes, this is what I had in mind when the local hook can't be used. Thank you, Michael.