GNU bug report logs - #77323
[PATCH] Allow temp buffer cleanup in ediff-current-file

Previous Next

Package: emacs;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Thu, 27 Mar 2025 21:55:02 UTC

Severity: normal

Tags: patch

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 77323 <at> debbugs.gnu.org (full text, mbox):

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 77323 <at> debbugs.gnu.org
Subject: Re: bug#77323: [PATCH] Allow temp buffer cleanup in ediff-current-file
Date: Sat, 29 Mar 2025 09:29:33 +0100
[Message part 1 (text/plain, inline)]
> - Have you thought about checking
> `ediff-current-file-cleanup-temporary-buffer' when quitting Ediff,
> instead of when entering Ediff (with other words: in the lambda you add
> to `ediff-quit-hook')?  I think this would fit better with the expected
> behavior.  A user might toggle the new option when the Ediff session is
> already running.

My reasons for "checking before" (basically to allow let-binding of the
variable) were less compelling and specific than what you describe, so I
agree that "checking after" is more natural and have updated the patch
accordingly.

>
> - Is this the only Ediff command that leaves such temporary buffers
> behind?

The other Ediff commands that create buffers are:

- ediff-regions-* and ediff-windows-*.  These create indirect buffers
  that are cleaned up when Ediff quits (via ediff-temp-indirect-buffer).

- ediff-patch-buffer.  This creates a buffer *_patched with the result
  of applying a patch to buffer *.  The persistence of this buffer is
  intentional - it allows the user to inspect or save the result.

- ediff-patch-file.  This applies a patch to a file, creating a backup
  (e.g., ediff.el.orig), and leaves buffers visiting both files.

- vc-ediff and vc-version-ediff.  These create buffers like
  ediff.el.~c0a6429b5672f43114d7d67e268f31998723071d~, which can be
  created by other VC commands (like log-view-find-revision) and are
  reused across calls.

In each case, the buffers either visit files, are cleaned up, or are
explicitly intended for further use by the client or other commands.

There is also the option ediff-keep-variants, for which nil means to
ask to remove any unmodified A/B/C buffers when quitting Ediff.

[0001-Allow-temp-buffer-cleanup-in-ediff-current-file.patch (text/x-patch, attachment)]

This bug report was last modified 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.