unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lin Sun <sunlin7@hotmail.com>
Cc: 74881@debbugs.gnu.org
Subject: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs
Date: Sun, 15 Dec 2024 10:04:19 +0200	[thread overview]
Message-ID: <86h675s77g.fsf@gnu.org> (raw)
In-Reply-To: <TYCPR01MB10004D03F975826578C1C923AFB3A2@TYCPR01MB10004.jpnprd01.prod.outlook.com> (message from Lin Sun on Sun, 15 Dec 2024 05:59:40 +0000)

> From: Lin Sun <sunlin7@hotmail.com>
> Date: Sun, 15 Dec 2024 05:59:40 +0000
> 
> @@ -488,6 +494,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)
>        (run-hooks 'ediff-startup-hook)
>        ) ; eval in control-buffer
>      control-buffer))

This should be carefully programmed to avoid preventing Emacs from
exiting due to some problem.  If ediff-delete-temp-files or one of the
functions it calls can signal an error, it should be wrapped by
condition-case, and if it or one of its callees can try interacting
with the user, we should use kill-emacs-query-functions instead.

Alternatively, we could end the Ediff session when Emacs is killed.

Bottom line: this is a minor cleanup feature, so we should be very
careful not to cause any regressions and problems just because we want
to exit more cleanly.  (On most systems, files in /tmp are routinely
deleted by system's cleanup processes anyway.)

Thanks.





      reply	other threads:[~2024-12-15  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15  5:59 bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs Lin Sun
2024-12-15  8:04 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h675s77g.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=74881@debbugs.gnu.org \
    --cc=sunlin7@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).