unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Bug in display-buffer
@ 2010-11-12 23:02 Андрей Парамонов
  2010-11-13  0:50 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Андрей Парамонов @ 2010-11-12 23:02 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-17  2:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 23:02 Bug in display-buffer Андрей Парамонов
2010-11-13  0:50 ` Drew Adams
2010-11-13 13:47   ` .emacs and other config file questions Tommy Kelly
2010-11-15 15:04     ` Deniz Dogan
2010-11-16  8:16       ` Tassilo Horn
     [not found]   ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
2010-11-15  4:25     ` Tim X
2010-11-17  2:13     ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).