[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in display-buffer
From: |
Андрей Парамонов |
Subject: |
Bug in display-buffer |
Date: |
Sat, 13 Nov 2010 02:02:54 +0300 |
Hello Emacs hackers!
I've found a bug but do not know how to workaround/fix it.
Bug happens when I do the following:
1) Display a single window in a single frame,
2) Activate completions,
3) Call display-buffer with not-in-this-window=t
C-h v pop-up-frames RET says:
pop-up-frames's value is nil
Documentation:
Whether `display-buffer' should make a separate frame.
If nil, never make a separate frame.
display-buffer is called this way:
display-buffer: buffer-or-name=#<buffer *Python*> not-this-window=t frame=nil
I expect the new buffer to appear in place of completion window,
however a new frame pops up. This happens in spite of pop-up-frames
being off.
I've done quick investigation and it shows that the problem lies in
the code following the comment inside display-buffer:
;; When NOT-THIS-WINDOW is non-nil, temporarily dedicate
;; the selected window to its buffer, to avoid that some of
;; the `get-' routines below choose it. (Bug#1415)
As the completions window is dedicated and selected window becomes
dedicated too, we cannot choose window-to-undedicate and end up
calling
(frame-selected-window (funcall pop-up-frame-function))
In principle, in this very awkward situation display-buffer has 3 options:
1) To display buffer in selected window -- but not-in-this-window=t.
2) To display buffer in a new frame -- but pop-up-frames says we
*never* make a separate frame.
3) To display buffer in place of completions window -- but that window
is "dedicated".
To me option 3 seems the least unexpected. Is it a way to achieve such
behavior, by customizing or by changing display-buffer?
Best wishes,
Andrey Paramonov
- Bug in display-buffer,
Андрей Парамонов <=