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: Wed, 25 Oct 2017 07:47:41 -0700 (PDT)

Thanks for looking into this.

>  > It should be the case in my context that this returns the minibuffer
>  > window: (cdr (assoc 'minibuffer (frame-parameters
>  >                                  (#<frame *Completions*
>  >                                   000000000cacf6c8>))))
>  >
>  > Instead, it now returns nil.  Parameter `minibuffer' for the
>  > `*Completions*' frame is no longer the minibuffer window; it is nil.
> 
> Since the 'minibuffer' parameter of a frame cannot be changed (from nil
> to some non-nil value and vice-versa at least) after its creation, 

Is that something new?

> your code somehow now seems to fail to set up that parameter.
> Please show the corresponding part where your code tries to
> set the parameter.  If necessary, debug it to show that after
> the corresponding ‘make-frame’ call the frame does not have
> that parameter set as requested.

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.

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*)).

See previous message for that code.  The complete code is
here: https://www.emacswiki.org/emacs/download/oneonone.el

As I say, the code works in all Emacs releases.  It
does not work in this Emacs 26 prerelease (only).

Here is (some of) the code (from icicles-mcmd.el) that
relies on the parameter having being set:

(defun icicle-delete-windows-on (buffer)
  "Delete all windows showing BUFFER.
If such a window is alone in its frame, then delete the frame
- unless it is the only frame or a standalone minibuffer frame."
  (interactive
   (list (let ((enable-recursive-minibuffers  t))
           (read-buffer "Remove all windows showing buffer: "
                        (current-buffer)
                        'existing))))
  (setq buffer  (get-buffer buffer))
  (when buffer
    (let* ((this-buffer-frames  (icicle-frames-on buffer))
           (this-frame          (car this-buffer-frames))
           mini-param)
      (unless (and this-frame
                   (frame-visible-p this-frame)
                   (null (cdr this-buffer-frames))
                   (setq mini-param
                         (cdr
                          (assoc
                           'minibuffer ; <=================
                           (frame-parameters this-frame))))
                   (eq mini-param (active-minibuffer-window))
                   (save-window-excursion
                     (select-frame this-frame)
                     (one-window-p t 'SELECTED-FRAME-ONLY)))
        (let (win)
          (dolist (fr  this-buffer-frames)
            (setq win  (get-buffer-window buffer fr))
            (select-window win)
            (if (and (one-window-p t)
                     (cdr (visible-frame-list)))
                (delete-frame)
              (delete-window (selected-window)))))))))





reply via email to

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