unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'martin rudalics'" <rudalics@gmx.at>
Cc: 8851@debbugs.gnu.org
Subject: bug#8851: 24.0.50; regression: special-display-frame is no longer dedicated
Date: Tue, 14 Jun 2011 13:36:45 -0700	[thread overview]
Message-ID: <8E7452317D5B4FD183FD24E0FAA14F6F@us.oracle.com> (raw)
In-Reply-To: <4DF726A1.7020804@gmx.at>

> here, Emacs pops up a new frame and the message tells me the 
> window and that that window is strongly dedicated to its buffer.
> If it does so on your system,

It does here too.

> please try to step through `special-display-popup-frame'
> once with your old, working Emacs and once with the latest 
> version.  The
> differences in arguments and behaviors should tell us what went wrong.

Keep in mind that using the debugger can be problematic because buffer
*Backtrace* itself is a special-display buffer.  But I was able to do so to get
some more info.

(BTW, these debugging problems are worse in the latest build - `q' does not even
exit the debugger; and when you get back to the top level buffer *Backtrace*
still contains a backtrace from execute-extended-command up through
special-display-popup-frame; etc.)

The difference is that, unlike in last week's build, in this week's build
`special-display-popup-frame' does not call the special-display function
`1on1-display-*Completions*-frame'.

Here is the call in last week's build:

* 1on1-display-*Completions*-frame(
#<buffer *Completions*> 
((background-color . "LavenderBlush2") 
 (mouse-color . "VioletRed")
 (cursor-color . "VioletRed")
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (width . 100)))

* apply(1on1-display-*Completions*-frame #<buffer *Completions*>
 ((background-color ...)))

* (if (and args (symbolp (car args)))
      (apply (car args) buffer (cdr args))
  (let ((window (get-buffer-window buffer 0)))
   (or (when window (let ((frame (window-frame window)))
                      (make-frame-visible frame)
                      (raise-frame frame)
                      window))
       (when (cdr (assq (quote same-window) args))
         (condition-case nil
           (progn (switch-to-buffer buffer) (selected-window))
          (error nil)))
       (when (or (cdr (assq (quote same-frame) args))
                 (cdr (assq (quote same-window) args)))
         (let* ((pop-up-windows t)
                pop-up-frames special-display-buffer-names
special-display-regexps)
           (display-buffer buffer)))
  (let ((frame (with-current-buffer buffer (make-frame ...))))
   (set-window-buffer (frame-selected-window frame) buffer)
   (set-window-dedicated-p (frame-selected-window frame) t)
   (frame-selected-window frame)))))

  special-display-popup-frame(
  #<buffer *Completions*>
  (1on1-display-*Completions*-frame
   ((background-color ...)))))

* display-buffer(#<buffer *Completions*> nil nil)

And here is the call in this week's build:

Debugger entered--returning value: (background-color . "LavenderBlush2")
  car(((background-color . "LavenderBlush2")
       (mouse-color . "VioletRed")
       (cursor-color . "VioletRed")
       (menu-bar-lines . 0)
       (tool-bar-lines . 0)
       (width . 100)))
* (symbolp (car args))
* (and args (symbolp (car args)))
* (if (and args (symbolp (car args)))
      (apply (car args) buffer (cdr args))
   (let ...

IOW, what seems to be happening is that the first arg is not a symbol, so the
`if' branch that applies the special-display function (the symbol that is the
car) to its args (the cdr) is not taken at all.

The args to `special-display-popup-frame' are different in the two builds.  For
last week's build, they are:

  special-display-popup-frame(
#<buffer *Completions*>
(1on1-display-*Completions*-frame
  ((background-color . "LavenderBlush2")
   (mouse-color . "VioletRed")
   (cursor-color . "VioletRed")
   (menu-bar-lines . 0)
   (tool-bar-lines . 0)
   (width . 100))))

For this week's build they are:

  special-display-popup-frame(
#<buffer *Completions*>
((background-color . "LavenderBlush2")
 (mouse-color . "VioletRed")
 (cursor-color . "VioletRed")
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (width . 100)))

However, the *Completions* frame does seem to have the correct alist (background
color etc.).  That apparently happens in the other `if' branch, here:

* (append args special-display-frame-alist)
* (make-frame (append args special-display-frame-alist))

IOW, the special-display function, `1on1-display-*Completions*-frame' is not
called by `special-display-popup-frame' in the new build.

However, as I said before, `1on1-display-*Completions*-frame' is called, but
only by `display-buffer'.  Here is a backtrace from debugging only entry to
`1on1-display-*Completions*-frame' (not entry to `special-display-popup-frame'):

  1on1-display-*Completions*-frame(
#<buffer *Completions*>
((background-color . "LavenderBlush2")
 (mouse-color . "VioletRed")
 (cursor-color . "VioletRed")
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (width . 100)))
* apply(
1on1-display-*Completions*-frame
#<buffer *Completions*>
((background-color . "LavenderBlush2")
 (mouse-color . "VioletRed")
 (cursor-color . "VioletRed")
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (width . 100)))

  display-buffer(#<buffer *Completions*> nil nil)
  internal-temp-output-buffer-show(#<buffer *Completions*>)
  minibuffer-completion-help()
  completion--do-completion()
  minibuffer-complete()

That call to `1on1-display-*Completions*-frame' does do (set-window-dedicated-p
#<window 48 on *Completions*> t).  And in the debugger evaluating
(window-dedicated-p (get-buffer-window "*Completions*" 0)) returns t.  And also
this gets evaluated (to nil), with *Completions* as the selected frame:

* (redirect-frame-focus (selected-frame) 1on1-minibuffer-frame)

So I don't really understand what the problem is.  In any case, it's clear that
the first branch of the `if' in `special-display-popup-frame' is not being
taken, and that `1on1-display-*Completions*-frame' is getting called by
`display-buffer' before it even calls `special-display-popup-frame'.

It took me a long time to get this far.  I hope you can take it from here.

In any case, I gave you a complete recipe.  You can do exactly what you asked me
to do just now.  See for yourself what the problems are.  You need only download
the two files I mentioned, oneonone.el and hexrgb.el.






  reply	other threads:[~2011-06-14 20:36 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 16:08 bug#8851: 24.0.50; regression: special-display-frame is no longer dedicated Drew Adams
2011-06-13 18:00 ` martin rudalics
2011-06-13 18:41   ` Drew Adams
2011-06-14  9:15     ` martin rudalics
2011-06-14 20:36       ` Drew Adams [this message]
     [not found]         ` <4DFB6BBF.3080504@gmx.at>
2011-06-17 15:51           ` Drew Adams
2011-06-17 16:22             ` bug#8856: " martin rudalics
2011-06-17 17:48               ` Drew Adams
2011-06-19 17:29                 ` Drew Adams
2011-06-20  3:04                   ` Stefan Monnier
2011-06-17 17:48             ` bug#8856: " Drew Adams
2011-06-19 13:26               ` martin rudalics
2011-06-19 14:31                 ` bug#8856: 24.0.50;regression: `special-display-frame' broken Drew Adams
2011-06-19 18:50                   ` Chong Yidong
2011-06-19 18:54                     ` Drew Adams
     [not found]               ` <4DFE09A7.10500@gmx.at>
2011-06-19 14:43                 ` bug#8856: 24.0.50; regression: special-display-frame is no longer dedicated Drew Adams
2011-06-19 17:26                   ` Drew Adams
2011-06-19 18:40                     ` martin rudalics
2011-06-19 19:34                       ` bug#8856: 24.0.50; regression: `special-display-popup-frame' broken Drew Adams
2011-06-19 19:52                         ` Drew Adams
2011-06-20  9:46                     ` bug#8856: 24.0.50; regression: special-display-frame is no longer dedicated martin rudalics
2011-06-20 13:01                       ` Drew Adams
     [not found]                         ` <4E00C54C.5080108@gmx.at>
2011-06-21 18:10                           ` Drew Adams
2011-06-22  0:13                             ` Drew Adams
2011-06-22  0:14                             ` Drew Adams
2011-06-22  0:15                             ` Drew Adams
2011-06-23 16:45                               ` Drew Adams
     [not found]                               ` <4E033CBA.1050700@gmx.at>
     [not found]                                 ` <DB9EDF1C454F42A0BC437F0E0AEE6CA2@us.oracle.com>
     [not found]                                   ` <4E037708.2000205@gmx.at>
2011-06-23 22:06                                     ` Drew Adams
2011-06-24  8:53                                       ` martin rudalics
2011-06-24 21:21                                         ` Drew Adams
2011-06-25 14:15                                           ` martin rudalics
2011-06-25 14:52                                             ` Drew Adams
     [not found]                                               ` <8A3D5626004B4 945A624B69463A0B849@us.oracle.com>
2011-06-25 15:04                                               ` Drew Adams
2011-06-25 15:57                                                 ` martin rudalics
2011-06-25 16:15                                                   ` Drew Adams
2011-06-25 17:00                                                     ` martin rudalics
2011-06-25 17:48                                                       ` Drew Adams
2011-06-26 13:50                                                         ` martin rudalics
2011-06-26 14:56                                                           ` Drew Adams
     [not found]                                                             ` <0721F495F4A441529FCB91280D284E42@us.oracle.com! >
2011-06-26 15:15                                                             ` Drew Adams
2011-06-26 15:54                                                               ` martin rudalics
2011-06-26 16:06                                                                 ` Drew Adams

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=8E7452317D5B4FD183FD24E0FAA14F6F@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8851@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).