GNU bug report logs - #15732
24.3.50; display-buffer-pop-up-frame working poorly

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Sun, 27 Oct 2013 15:32:02 UTC

Severity: minor

Found in version 24.3.50

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15732 in the body.
You can then email your comments to 15732 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15732; Package emacs. (Sun, 27 Oct 2013 15:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to michael_heerdegen <at> web.de:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 27 Oct 2013 15:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15732; Package emacs. (Sun, 27 Oct 2013 16:47:01 GMT) Full text and rfc822 format available.

Message #8 received at 15732 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: michael_heerdegen <at> web.de
Cc: 15732 <at> debbugs.gnu.org
Subject: Re: bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly
Date: Sun, 27 Oct 2013 17:46:35 +0100
> `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

`display-buffer-pop-up-frame' expects a buffer as first argument and not
a buffer name.  And `window--display-buffer' returns nil if the BUFFER
argument is not a live buffer.  So this is the intended behavior.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15732; Package emacs. (Mon, 28 Oct 2013 16:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 15732 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 15732 <at> debbugs.gnu.org
Subject: Re: bug#15732: 24.3.50; display-buffer-pop-up-frame working poorly
Date: Mon, 28 Oct 2013 17:32:31 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> > `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
>
> `display-buffer-pop-up-frame' expects a buffer as first argument and not
> a buffer name.  And `window--display-buffer' returns nil if the BUFFER
> argument is not a live buffer.  So this is the intended behavior.

Oh, I see, that makes sense, thank you.  I'll close this report.


Regards,

Michael.




bug closed, send any further explanations to 15732 <at> debbugs.gnu.org and michael_heerdegen <at> web.de Request was from Michael Heerdegen <michael_heerdegen <at> web.de> to control <at> debbugs.gnu.org. (Mon, 28 Oct 2013 16:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Nov 2013 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.