bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly


From: Michael Heerdegen
Subject: bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly
Date: Sun, 27 Oct 2013 16:31:03 +0100

Hello,

`display-buffer-pop-up-frame' always returns nil, although the doc says
it would return the window of the newly created frame.  E.g. just
evaluate from emacs -Q

  (display-buffer-pop-up-frame "*Messages*" ())

  => nil

This is the defun:

(defun display-buffer-pop-up-frame (buffer alist)
  (let* ((params (cdr (assq 'pop-up-frame-parameters alist)))
         (pop-up-frame-alist (append params pop-up-frame-alist))
         (fun pop-up-frame-function)
         frame window)
    (when (and fun
               ;; Make BUFFER current so `make-frame' will use it as the
               ;; new frame's buffer (Bug#15133).
               (with-current-buffer buffer
                 (setq frame (funcall fun)))
               (setq window (frame-selected-window frame)))
      (prog1 (window--display-buffer
              buffer window 'frame alist display-buffer-mark-dedicated)
        (unless (cdr (assq 'inhibit-switch-frame alist))
          (window--maybe-raise-frame frame))))))

The problem seems to be that `window--display-buffer' here always does
nothing and returns nil - because the new frame is not yet displayed,
and the WINDOW is (not yet) living.  I guess this was also the cause of
the cited bug Bug#15133.

Note that also all arguments given to `window--display-buffer' are thus
ignored, especially ALIST and `DISPLAY-BUFFER-MARK-DEDICATED'.


Regards,

Michael.



In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.4)
 of 2013-10-19 on drachen
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description:     Debian GNU/Linux testing (jessie)

Configured using:
 `configure --prefix=/usr/local/built/'

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp






reply via email to

[Prev in Thread] Current Thread [Next in Thread]