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

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

bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame n


From: Drew Adams
Subject: bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame no longer has parameter `minibuffer'
Date: Thu, 26 Oct 2017 07:01:51 -0700 (PDT)

>  > I don't call `make-frame' to create frame `*Completions*'.
>  > It is created when ` 1on1-display-*Completions*-frame' is
>  > called, and that is done by `special-display-function'.
>  > I showed the code for that in my previous message.
> 
> The 'minibuffer' parameter must be set up specially by whoever calls
> ‘make-frame’.  If this is not done, you can't change it afterwards.  The
> default value of ‘special-display-function’ is
> ‘special-display-popup-frame’ and I don't see the latter setting up the
> 'minibuffer' parameter anywhere.

I use the default value of `special-display-function',
`special-display-popup-frame'.

I don't call `make-frame' for `*Completions*'.  I just
provide an alist to `special-display-buffer-names'.
That alist includes, as its second element, function
`1on1-display-*Completions*-frame', which displays the
frame.

This is `special-display-buffer-names':

(("*Completions*" 1on1-display-*Completions*-frame
  ((background-color . "LavenderBlush2")
   (mouse-color . "VioletRed")
   (cursor-color . "VioletRed")
   (menu-bar-lines . 0)
   (tool-bar-lines . 0)
   (width . 100)))
 ("*Help*" 1on1-display-*Help*-frame
  ((background-color . "Thistle")
   (mouse-color . "Blue Violet")
   (cursor-color . "Blue Violet")
   (height . 40))))

The only thing that matters there is
`1on1-display-*Completions*-frame'.

>  > I don't ever set parameter `minibuffer' explicitly for
>  > *Completions*.  I'm guessing that it has always gotten
>  > set automatically when frame input was redirected from
>  > frame *Completions* to the standalone minibuffer.
>  >
>  > (It is redirected to `completion-reference-buffer' if
>  > the minibuffer is not active (and if `c-r-b' is not
>  > frame *Completions*)).
> 
> Maybe you mean "focus redirection" here which is something
> different from setting up the 'minibuffer' parameter.

Yes, I mean input/focus redirection, with
`redirect-frame-focus'.  I'm guessing that redirecting
focus is somehow behind the changed value of parameter
`minibuffer' for frame `*Completions*'.  The redirection
of frame focus is the only connection I'm aware of
between those two frames.

I don't change parameter `minibuffer' for *Completions*,
that I'm aware of.  Frame *Completions* is created by
the special-display code, just by my using
`special-display-buffer-names'.  I don't create it
directly - I don't call `make-frame' for it.  If it
is now getting the wrong value of parameter `minibuffer'
I don't see how it could be my code that is doing
that.
 
> I understand that you want that parameter to have a non-nil value there.
> So make sure that it is.  For this you will have to debug your earlier
> version to see how they set up the 'miniuffer' parameter and compare
> them with the current version to see how it fails to do that.

I have no idea what part of the special-display code might
have managed parameter `minibuffer' before vs now, or
whether that is done in Emacs C code or Emacs Lisp code.
I don't know what has changed in the Emacs code.

However, I realize now that I reported the exact opposite
of the real problem.  Apologies for that.

The problem is NOT that (1) PREVIOUSLY, frame *Completions*
had a `minibuffer' parameter whose value was the active
minibuffer window (on the minibuffer frame) and (2) NOW,
frame *Completions* has a nil `minibuffer' parameter.

The problem is that (1) PREVIOUSLY, frame *Completions*
had a nil `minibuffer' and (2) NOW, frame *Completions*
has a `minibuffer' parameter whose value is the active
minibuffer window (on the minibuffer frame).

IOW, the problem is that the separate, dedicated frame
*Completions* somehow gets a `minibuffer' parameter
(whose value is the minibuffer window on the minibuffer
frame).

`*Completions*' is not a minibuffer frame.  The only
minibuffer frame has a `minibuffer' parameter whose
value is `only' - the value is not a minibuffer
_window_.

Does the problem description make more sense now?
Sorry for the confusion.

I am not setting parameter `minibuffer'.  The only
connection I know of between the *Completions* frame
and the standalone minibuffer frame is the focus
redirection.  Is it possible that that redirection
code now mistakenly gives a non-nil `minibuffer'
parameter to the frame whose input focus is
redirected to the minibuffer frame?

Attached is the debug output that I see, in case it
helps.  The cause of my problem seems to be that
somehow frame `*Completions*' is getting a non-nil
parameter `minibuffer' - the value being the
minibuffer window (on the minibuffer frame).
Or do you interpret the attached debug info
differently?

Hoping you can set me straight about this.
I don't think I should need to do anything
different in my code, but if I need to make
some minor adjustment for some change in
Emacs, please let me know what I'll need to do.

So far, this seems like an Emacs bug, to me.

Attachment: throw-bug-28978.el
Description: Binary data


reply via email to

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