From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lin Sun 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 02:25:16 +0000 Message-ID: References: <86h675s77g.fsf@gnu.org> <864j2py29u.fsf@gnu.org> <864j2ow93z.fsf@gnu.org> <875xn3jm1x.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="_002_TYCPR01MB10004F2BBF48917C06E73BE29FB082TYCPR01MB10004jp_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14684"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "74881@debbugs.gnu.org" <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 03:26: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 1tRj0a-0003el-Js for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Dec 2024 03:26:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRj0J-0001YT-4D; Sat, 28 Dec 2024 21:26:07 -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 1tRj0H-0001Y0-Em for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 21:26: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 1tRj0F-0005Me-V2 for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 21:26:05 -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:In-Reply-To:References:Date:From:To:Subject; bh=CXMnEp1cJRxwTxNl5RhzfxtIL3oLs/CwFBR2tHA+Euw=; b=fs/v4U+pn/JXZzVcbNvsGjxFlog6NRhCbVIL4NpntpB2K6C9l7oQaZsnFvmF3bH8rJR/tU5dhFhst6RcSkraY9MTAXqYYDYgP9kxHDGW5ql/5J+lCwrWYHL3v+J5VcQTnv//my9IVB7cRLD53EryGYKXcc54rNt/hxbHegjRMzOa9YtZEZCALg549QsfIe4g3rh/sPxawFrXXq/coE7cjIoHHwSQyOpx3sK4W20z1xYKuXc34h8Fu26SCTw4D9RpSbNcV0blXCXToBKhaLHyl6LwQl8uEctMdRpJVqrQpvYdTHCWV8LZtf9Bnd+CITK0mc7Qh/bGaPigrFM8UL75oA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRj0D-0000k3-Pq for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 21:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2024 02:26: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.17354391452818 (code B ref 74881); Sun, 29 Dec 2024 02:26:01 +0000 Original-Received: (at 74881) by debbugs.gnu.org; 29 Dec 2024 02:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:53217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRizw-0000jN-IW for submit@debbugs.gnu.org; Sat, 28 Dec 2024 21:25:44 -0500 Original-Received: from mail-japaneastazolkn19011029.outbound.protection.outlook.com ([52.103.43.29]:64324 helo=TYVP286CU001.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRizu-0000j4-E6 for 74881@debbugs.gnu.org; Sat, 28 Dec 2024 21:25:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O3Zqpo6/vXwMIW4qX2wG2wceKdYPY2827D2rRJx/FglNu1ykzWtW3CoqAql8GYrf4l+qmhPoJlW1fA/gY4CpOtXP5WBbqpWrNEJuLVIEHzlhnPcCOjU+MuDVYxiFGq2rZNh60BDyXEEPZXXQo1kNooAZIv5erPaWpuP34+MYzbXPYM5extVmktubCUm57ZD631zXTMRIyx1ookgeG5sLVeBNRK8OJX1K0VyjxZ2SDxhG1jJnCDEtEO+mbOsJ9bJuiVzqVlMWa7HGskYU2H0ATT9ua1iszO9O8G3LnPlobY/tT5Djctvz49EW7ZfEs69wFon7CvTt/xTF0Vk/KCXlsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=01vxz1tycj0w2i8p+UkmeD5ZjwLCuyWtIbtgqE21po0=; b=GD7brO5HfklgYaUdOf/vW/ClQgBGWzwXHnM8+wVl18zyPXycAmmaLqFOvDjxo9OxOxNeWEGvYwa27PRpqWUpJfNk5shQcMgQqW/940vyoZ4WVbTGVm4blqI4H53RHEEXJW2tWVqIIsPWqcAviD32IXLt531aXaa/E3wr1v/7eCwuBxucduIr/RYToVfSLjNDS3pGs24wftWrfMki1VOtSuWosNstECZ993hElgi2hEnO0NiWDPpliUP+o7b9T4E9rEcxVNc76YUQYNMlHusAgI2MjOBOVeWNMUwJsqhYphyhPfHYQFWeW1OZLlcHq7YKjNXLoIKRmgnrX63BQ0kK5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=01vxz1tycj0w2i8p+UkmeD5ZjwLCuyWtIbtgqE21po0=; b=K1H01WjS40yWHtqlNSVcmIZqBLc2YlgxM/n4nbZezPXequiH8nr7RQzFYJro+SqSDJahOwp2UJGMKzdwBHsAmwEolUa2nW4JV/s75XZu7E/0MKZ9+Y/rFhR21F8LoeiMrTwOwcU9+nsm0hR3ueJg2Yy8MIhkl1p3X+NISSHYzm1+JkcgWVxIFxMymJJtai6iMsIQf9RR3VvnO+8BcWIv5G/fBOsd+gCXZ5KiXmDmXmRmMOaYtaKn+dnS/0CEDXcrL7SCuWaa1aa4M1MquHFoGeT3aOXqwCDlIWI6QY0Uh6Mdihi2AqvsmtVgkyHHixHKV84Ni+ZUxGWk//Kd+BxBIw== Original-Received: from TYCPR01MB10004.jpnprd01.prod.outlook.com (2603:1096:400:1e8::14) by OSCPR01MB13123.jpnprd01.prod.outlook.com (2603:1096:604:333::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8293.17; Sun, 29 Dec 2024 02:25:16 +0000 Original-Received: from TYCPR01MB10004.jpnprd01.prod.outlook.com ([fe80::8ecd:43a5:333:1c8]) by TYCPR01MB10004.jpnprd01.prod.outlook.com ([fe80::8ecd:43a5:333:1c8%7]) with mapi id 15.20.8293.000; Sun, 29 Dec 2024 02:25:16 +0000 Thread-Topic: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs Thread-Index: AQHbTrQ6C9gBTPBRPkO0xoraS9YsXLLm8oALgACRi4WAEiBNpoAAK+jtgACcYWyAAOzfEIAABgUagAEqgPuAAAjhSQ== In-Reply-To: <875xn3jm1x.fsf@web.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYCPR01MB10004:EE_|OSCPR01MB13123:EE_ x-ms-office365-filtering-correlation-id: d0efd68d-5b31-4f4c-559d-08dd27b00877 x-microsoft-antispam: BCL:0; ARA:14566002|15080799006|6092099012|7092599003|8062599003|461199028|8060799006|15030799003|19110799003|13095399003|440099028|3412199025|102099032; x-microsoft-antispam-message-info: LgRrw223P8iww8xCRK0xRzw7w55RY+gOqowPixB5g4VUcEwB8nB5LPWSPEdy8/pCcH2cOpDBBo2yROVc7/Bimt6U5hkYRBeINFhR7Vov2OK8QIZcXLsqcqM3LVK2Y0pzqHlTNo15yCWxq+DgRL6rMkzGYq0B/HJJjAyAxWcJERHbWtSR9DwieQsg41k93QLuFUODayyxsMF9GsV/T1IHwPRXTfQsWVzrDsZaAL+xqEIZkwQmV3OpehU+ArFzZKM+MvPz4RqtsBi9B6fbIr97G27GIUyPg9tPZD46OhtROxjLs2ZIyvt8ykxSXnIsz2OxVv0YKLURP187GrPas+7Zsr1yVTq8r0CYvPPXSth8b/Y+M9NOJLoMB5w/N41JfCL39Yy0H3Y9hNOegSrDH6ckHzlZhWOhZfizgEVKqOxgogjnDm1YqGT+8tNBBnW840BWWuIquY1A6QaRWJ2eTp+wppfMBcgvmBok2+Zm1b1WDr2fhqOZWYiuCxdT0C1ACNe0VFRPaBaAAPwjJj484/GWXy0cy2CfdqqUGFXeWwldbFi3WGcn3/oBsvYu1lo79oIocDNHq2ShW+O5RzTbiOhMQJYZpBZ4tbbzEDIh2R8VrA90CFsl3pnvQpMb3H2qkicKknsk+M+zApdppgrhD+9+9WqVBcUW0zu51oC6w6sXUgAm5mFrrekrXrp4Pw1bQYp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: sct-15-20-7719-20-msonline-outlook-15995.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10004.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: d0efd68d-5b31-4f4c-559d-08dd27b00877 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Dec 2024 02:25:16.6229 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSCPR01MB13123 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:297926 Archived-At: --_002_TYCPR01MB10004F2BBF48917C06E73BE29FB082TYCPR01MB10004jp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > From:=A0Michael Heerdegen =0A= > Sent:=A0Saturday, December 28, 2024 05:49 PM=0A= > > +(defun ediff--delete-temp-files-on-kill-emacs ()=0A= > > +=A0 "Delete the temp-files associated with the ediff buffers."=0A= > > +=A0 (ignore-errors=0A= >=A0> +=A0=A0=A0 (let ((inhibit-interaction t))=0A= >=A0> +=A0=A0=A0=A0=A0 (dolist (b (buffer-list))=0A= >=A0> +=A0=A0=A0=A0=A0=A0=A0 (with-current-buffer b=0A= >=A0> +=A0=A0=A0=A0=A0=A0=A0=A0=A0 (when (eq major-mode 'ediff-mode)=0A= >=A0> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (ediff-delete-temp-files)))))))=0A= >=A0I think this is the same as mapping over `ediff-session-registry' which= =0A= > =A0should hold exactly the list of buffers we want.=0A= > =A0Second: Can we move the `ignore-errors' inwards so that an error in on= e=0A= >=A0case doesn't abort the complete loop?=0A= =0A= Sure, I had attached the modified one towards your comments.=0A= =0A= >=A0>=A0 ;;; Setup functions=0A= >=A0>=0A= >=A0> @@ -488,6 +496,7 @@ ediff-setup=0A= >=A0>=A0=A0=A0=A0=A0=A0=A0 (if (ediff-buffer-live-p ediff-meta-buffer)=0A= >=A0>=A0=A0=A0=A0=A0=A0=A0=A0=A0 (ediff-update-meta-buffer=0A= >=A0>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ediff-meta-buffer nil ediff-meta-sessio= n-number))=0A= >=A0> +=A0=A0=A0=A0=A0 (add-hook 'kill-emacs-hook #'ediff--delete-temp-file= s-on-kill-emacs)=0A= >=A0Would it be ok to avoid the above loop completely by using the buffer= =0A= > =A0local version of `kill-emacs-hook' instead?=0A= =0A= I didn't found a local version of `kill-emacs-hook`=A0example in emacs git = repo. =0A= Current version also work for the killing from command line, for example ex= ecuting a "pkill emacs" during ediff session.= --_002_TYCPR01MB10004F2BBF48917C06E73BE29FB082TYCPR01MB10004jp_ Content-Type: text/x-patch; name="0001-lisp-vc-ediff-util.el-Loop-the-ediff-session-registr.patch" Content-Description: 0001-lisp-vc-ediff-util.el-Loop-the-ediff-session-registr.patch Content-Disposition: attachment; filename="0001-lisp-vc-ediff-util.el-Loop-the-ediff-session-registr.patch"; size=1121; creation-date="Sun, 29 Dec 2024 02:25:14 GMT"; modification-date="Sun, 29 Dec 2024 02:25:14 GMT" Content-Transfer-Encoding: base64 RnJvbSA1ZDIxYjY1ZWFhNDVjOTk2MTgyY2UzMTgxYjEyODllZDAz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