unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 15732@debbugs.gnu.org
Subject: bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly
Date: Sun, 27 Oct 2013 16:31:03 +0100	[thread overview]
Message-ID: <8738nm7mtk.fsf@web.de> (raw)


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	other threads:[~2013-10-27 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-27 15:31 Michael Heerdegen [this message]
2013-10-27 16:46 ` bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly martin rudalics
2013-10-28 16:32   ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738nm7mtk.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=15732@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).