From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs Date: Sun, 29 Dec 2024 09:04:47 +0200 Message-ID: <86jzbjq8a8.fsf@gnu.org> References: <86h675s77g.fsf@gnu.org> <864j2py29u.fsf@gnu.org> <864j2ow93z.fsf@gnu.org> <875xn3jm1x.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23771"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sunlin7@hotmail.com, 74881@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 29 08:05:25 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 1tRnMb-00062I-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Dec 2024 08:05:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRnMF-0000cv-Na; Sun, 29 Dec 2024 02:05:04 -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 1tRnME-0000cV-Oq for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 02:05:02 -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 1tRnME-0005sv-E6 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 02:05:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=J2r9RlNC9+OKJiPTgEpFR4xYlBORhGWWi8F2XzxkRZw=; b=hg9cm/mTH45vJcyZULDaRN3+9QjT58Cp2vw1jTbVIvmN490Ptxe+LJH5+o0E2rS1nJ9a53KsES6uNkwG7ug8kBaZpOb4LtakkE1VVla9w0h2bDGqRtIKimEB5Uod3QqD4dReuNZSi7qjN7M3Pss6BivdTho77N7JlnUpXF4jC+rRzGTcjZY/VHYA4tnCSP7wnGe5ih+nryBUel8+Syxgp1/gZ/KcwVGmjqOqOYP56Q/tgYz4LB+o37BEMDfGUy+yalLxe3j+KJZNEdlfeMW3AlVTUIVOBdPo32TuwVoIfoLEuUof1hHEOHhDoY/1GKBFeycMxFlfo9W0SEYv/sLevg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRnMD-0006fP-U0 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 02:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2024 07:05:01 +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.173545589825611 (code B ref 74881); Sun, 29 Dec 2024 07:05:01 +0000 Original-Received: (at 74881) by debbugs.gnu.org; 29 Dec 2024 07:04:58 +0000 Original-Received: from localhost ([127.0.0.1]:53575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRnMA-0006f0-1V for submit@debbugs.gnu.org; Sun, 29 Dec 2024 02:04:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRnM7-0006ee-OS for 74881@debbugs.gnu.org; Sun, 29 Dec 2024 02:04:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRnM2-0005rm-1Q; Sun, 29 Dec 2024 02:04:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=J2r9RlNC9+OKJiPTgEpFR4xYlBORhGWWi8F2XzxkRZw=; b=BtAUz5x7YSw+ luBvWsx2shFVkg0vV/2MowCLKxWhBRjMgY2UtDyCSVjiWlE/bpcTGnlL83W/sX0BTW0vcr77b+y/a 60d39n+7mDaKE6EPHIhWx4Iy1c7Q5Y/KXfDKc69DK4fk7EgqmRBNEyVypsfWoXASxpF/tnku+nyDT gwSfYTl1kTa12yqJRQZmEUEC2c0xIBREl10a0k1hSed1tB7Wcnc20LlrXhZli8vEvfCsy9clxRUFg S86AiWeGw1FvDy+xw2Bt3qAn8B+RTzUEwv/feDZSfCrgy+3I4L50XyyNFUsWbDAkgd5aPXDdK42Cu FTO0cifZwIqfU0wi9sH+PA==; In-Reply-To: <875xn3jm1x.fsf@web.de> (message from Michael Heerdegen on Sun, 29 Dec 2024 02:49:14 +0100) 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:297933 Archived-At: > From: Michael Heerdegen > Cc: Eli Zaretskii , "74881@debbugs.gnu.org" > <74881@debbugs.gnu.org> > Date: Sun, 29 Dec 2024 02:49:14 +0100 > > Second: Can we move the `ignore-errors' inwards so that an error in one > case doesn't abort the complete loop? Binding inhibit-interaction non-nil could cause the body signal an error, so this should be taken into account if we move ignore-errors inwards. This code must NOT signal any errors, ever. Which AFAIU means that if we want ignore-errors not to abort the rest of the loop (why not, btw? these are just temporary files, after all), we should redesign this loop such that it catches the errors and continues with the rest of the buffers. > > ;;; Setup functions > > > > @@ -488,6 +496,7 @@ ediff-setup > > (if (ediff-buffer-live-p ediff-meta-buffer) > > (ediff-update-meta-buffer > > ediff-meta-buffer nil ediff-meta-session-number)) > > + (add-hook 'kill-emacs-hook #'ediff--delete-temp-files-on-kill-emacs) > > Would it be ok to avoid the above loop completely by using the buffer > local version of `kill-emacs-hook' instead? You assume that the temporary Ediff files are always visited in some buffer? Is that assumption true?