[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37840: Missing in the Emacs manuals:
From: |
martin rudalics |
Subject: |
bug#37840: Missing in the Emacs manuals: |
Date: |
Mon, 2 Dec 2019 10:41:20 +0100 |
> Suppose I have two buffers open, say fooA.tex and fooB.tex, each in
> its own frame. Then I invoke Ediff to compare both buffers. Now
> suppose I kill the buffers fooA.tex and fooB.tex _before_
... but here already something must happen in any windows resp. frames
showing these buffers ...
> I quit the
> Ediff control panel. If I then quit the Ediff control buffer, it
> happens that some of the auxiliary Ediff buffers pops up, but _not_
> in the geometry customized with display-buffer-alist for *something*
> type buffers, but with a geometry according to default-frame-list
> modulo that the position is that of one of the former frames for
> fooA.tex or fooB.tex, depending on which was buffer A in Ediff's
> terminology. Thus, I can get a total frame layout which should not
> exist according to the customizations according to
> default-frame-alist and display-buffer-alist.
Note again that ediff doesn't care neither about ‘default-frame-alist’
nor 'display-buffer-alist'. It uses its own customary settings and
sometimes relies on 'switch-to-buffer' to DTRT. In addition, ediff
doesn't like it much when you kill one of its buffers too early, that
is before calling 'ediff-quit'.
You have two ways to interfere here: 'ediff-cleanup-hook' to clean up
the state _before_ 'ediff-quit' starts its own cleanup routine (so you
can, for example, delete frames showing buffers used by ediff) or
‘ediff-quit-hook’ which by default runs ediff's own cleanup function
'ediff-cleanup-mess' (where you will see a plethora of 'delete-window'
and 'switch-to-buffer' calls that probably cause the behavior you see
and dislike above). If you want to change or add to the latter, it's
probably best to run 'ediff-cleanup-mess' through the debugger first
in order to understand how it works and how it messes up your
buffer/frame relationships.
> How can I sole this? Or, even better, how can I manage that in the
> above scenario no buffer pops up if I close the Ediff control panel?
> Has the problem maybe something to do with the fact that the frame
> of the Ediff control panel has no minibuffer?
You cannot give a minibuffer window to a frame that has none. So by
all means, 'ediff-quit' should avoid reusing the control panel frame
for showing another buffer. Does it do that in your case?
martin