> - 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.