all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: sunlin7@hotmail.com, 74881@debbugs.gnu.org
Subject: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs
Date: Mon, 30 Dec 2024 15:02:31 +0200	[thread overview]
Message-ID: <86ed1ppbmg.fsf@gnu.org> (raw)
In-Reply-To: <87zfkevzb5.fsf@web.de> (message from Michael Heerdegen on Mon, 30 Dec 2024 00:34:22 +0100)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: sunlin7@hotmail.com,  74881@debbugs.gnu.org
> Date: Mon, 30 Dec 2024 00:34:22 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > > @@ -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?
> 
> I think you misunderstood: my idea was to put `ediff-delete-temp-files'
> to the local hook binding of the ediff control buffers (which we
> currently consult anyway).  This would result in the same calls as now -
> at least when local `kill-emacs-hook' bindings worked.

I don't understand how a buffer-local kill-emacs-hook could work.
Emacs calls the value of this hook only once, when it is going to
exit.  So if the value is buffer-local, whether or not the hook is
called will depend on which buffer is the current buffer when Emacs is
killed.  Or did I miss something?





  reply	other threads:[~2024-12-30 13:02 UTC|newest]

Thread overview: 19+ 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
2024-12-15 17:25   ` Lin Sun
2024-12-27  5:38     ` Lin Sun
2024-12-27  8:10       ` Eli Zaretskii
2024-12-27 17:34         ` Lin Sun
2024-12-28  7:38           ` Eli Zaretskii
2024-12-28  8:04             ` Lin Sun
2024-12-28 12:41               ` Eli Zaretskii
2024-12-28 17:40                 ` Lin Sun
2024-12-29  1:49               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-29  2:25                 ` Lin Sun
2024-12-30  1:37                   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-30  2:07                     ` Lin Sun
2024-12-30 22:37                       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-29  7:04                 ` Eli Zaretskii
2024-12-29 23:34                   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-30 13:02                     ` Eli Zaretskii [this message]
2024-12-30 22:34                       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=86ed1ppbmg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=74881@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.