unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8865: 24.0.50; `display-buffer' does not respect `pop-up-frames'
@ 2011-06-14 18:14 Drew Adams
  2011-06-14 19:08 ` martin rudalics
  0 siblings, 1 reply; 29+ messages in thread
From: Drew Adams @ 2011-06-14 18:14 UTC (permalink / raw)
  To: 8865

My setup, not emacs -Q.

Summary: A non-interactive call to `display-buffer' with non-nil arg
NOT-THIS-WINDOW does not show the buffer in a separate frame, even though
`pop-up-frames' is non-nil.
 
I have non-nil `pop-up-frames'.  I use the following function via `M-x
find-library-other-window frame.el'.  It should find the library in a
separate frame.  Instead, it finds it in another window of the current
frame - i.e., it splits the current window and puts it in one of those
two windows.
 
(defun find-library-other-window (library)
  "Find the Emacs-Lisp source of LIBRARY in another window."
  (interactive
   (let* ((path (cons (or find-function-source-path load-path)
        (find-library-suffixes)))
   (def (if (eq (function-called-at-point) 'require)
     (save-excursion (backward-up-list)
                                   (forward-char)
                                   (backward-sexp -2)
                                   (thing-at-point 'symbol))
   (thing-at-point 'symbol))))
     (when def (setq def (and (locate-file-completion def path 'test) def)))
     (list (completing-read "Library name: " 'locate-file-completion
                            path nil nil nil def))))
  (let ((buf (find-file-noselect (find-library-name library))))
    (pop-to-buffer buf 'other-window)))
 
Invoking `M-x find-library-other-window frame.el' leads to the following
call chain (from the debugger):
 
(display-buffer #<buffer frame.el> other-window nil)
 
(display-buffer-normalize-specifiers "frame.el" other-window nil)
returns the following sexp, which I'll call FOO below:
 
((reuse-window other same visible)
 (pop-up-window (largest) (lru))
 (pop-up-frame)
 (reuse-window other other visible)
 (reuse-window nil same 0)
 (reuse-window-even-sizes . t)
 (pop-up-frame t)
 (pop-up-frame-function lambda nil (make-frame pop-up-frame-alist))
 (reuse-window nil same visible)
 (pop-up-window (largest) (lru))
 (pop-up-frame)
 (reuse-window nil other visible)
 (reuse-window-even-sizes . t)
 (reuse-window nil same visible)
 (pop-up-window (largest) (lru))
 (pop-up-frame)
 (pop-up-frame-alist (height . 24) (width . 80) (unsplittable . t))
 (reuse-window nil other visible)
 (reuse-window-even-sizes . t))
 
Then, * display-buffer-reuse-window(
#<buffer frame.el> 
(other same visible)
FOO)
 
returns: nil
 
Then, * display-buffer-pop-up-window(
#<buffer frame.el>
((largest) (lru))
FOO)
 
calls * display-buffer-split-window(
#<window 8 on drews-lisp-20> 
nil
FOO)
 
which calls * display-buffer-split-window-1(
#<window 8 on drews-lisp-20> below 4)
 
which calls * split-window(
#<window 8 on drews-lisp-20> nil below)
 
which calls * resize-this-window(
#<window 8 on drews-lisp-20> -29 nil)
 
which calls * split-window-internal(
#<window 8 on drews-lisp-20> 29 below 0.5)
 
which splits the window and then throws, putting the frame.el buffer in
the second window (instead of its own frame).
 
 
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-06-13 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/build/include'
 






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

end of thread, other threads:[~2011-06-19 20:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 18:14 bug#8865: 24.0.50; `display-buffer' does not respect `pop-up-frames' Drew Adams
2011-06-14 19:08 ` martin rudalics
2011-06-14 19:43   ` Drew Adams
2011-06-15  9:24     ` martin rudalics
2011-06-15 16:14       ` Drew Adams
2011-06-15 16:26         ` martin rudalics
2011-06-15 17:11           ` Drew Adams
2011-06-15 17:44             ` martin rudalics
2011-06-15 17:53               ` Drew Adams
2011-06-15 22:15                 ` Drew Adams
2011-06-16 13:01                   ` martin rudalics
2011-06-16 14:01                     ` Drew Adams
2011-06-16 15:08                       ` martin rudalics
2011-06-16 16:03                         ` Drew Adams
2011-06-17 15:46                           ` martin rudalics
2011-06-17 18:31                             ` Drew Adams
2011-06-19 17:43                               ` Drew Adams
2011-06-19 18:50                                 ` martin rudalics
2011-06-19 20:13                                 ` Drew Adams
2011-06-16 13:09                   ` Stefan Monnier
2011-06-16 14:02                     ` Drew Adams
2011-06-17  2:44                       ` Stefan Monnier
2011-06-17 15:08                         ` Drew Adams
2011-06-17 16:21                           ` Stefan Monnier
2011-06-17 18:31                             ` Drew Adams
2011-06-17 21:46                               ` Stefan Monnier
2011-06-17 23:55                                 ` Drew Adams
2011-06-18  1:51                                   ` Stefan Monnier
2011-06-16  8:45               ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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