From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>, 28978-done@debbugs.gnu.org
Subject: bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame no longer has parameter `minibuffer'
Date: Sun, 29 Oct 2017 19:13:04 +0100 [thread overview]
Message-ID: <59F61A30.30300@gmx.at> (raw)
In-Reply-To: <c1bf60e7-5fdf-4a6c-95c5-e98ae86341c1@default>
> And no, there is no problem such as (I think) you
> describe. In my own setup (but the code is not just
> for my setup) ALL of the frames except my standalone
> minibuffer frame have a nil `minibuffer' parameter.
> And none are mistakenly removed. Only the windows
> and frames showing BUFFER are affected, and only
> windows showing BUFFER are removed.
Then I have difficulties to understand what this part of your code tries
to do:
(setq mini-param
(cdr
(assoc
'minibuffer
(frame-parameters this-frame))))
(eq mini-param (active-minibuffer-window))
You set mini-param to the 'minibuffer' parameter of this-frame which is
IIUC your *Completions* frame. If you say that this parameter is always
nil for this-frame, why do you retrieve it? If all you want to check is
whether this-frame is the active minibuffer window's frame, then there
should be easier ways to do that like, for example,
(and (active-minibuffer-window)
(eq this-frame (window-frame (active-minibuffer-window))))
> Really? The window that was selected before minibuffer
> interaction?
Yes.
> I truly do not understand, in that case. And that is
> not what I think I see. If what you say is true then
> I should never see that the same minibuffer window
> as `active-minibuffer-window' (or even an inactive
> minibuffer window) is itself returned by the function.
Invoke
emacs -Q --eval "(setq default-frame-alist '((minibuffer . nil)))"
and switch to the minibuffer-less frame. Type C-h f to enter the
minibuffer. Once there, type
M-: (active-minibuffer-window)
This gets me the window of the minibuffer frame. Now type
M-: (minibuffer-selected-window)
This gets me the window of the minibuffer-less frame.
What do you get?
> How can the minibuffer window that becomes selected
> for the minibuffer interaction have been the selected
> window before "the minibuffer interaction started"?
I don't know. It doesn't happen with the scenario sketched above.
> And even if that is the actual meaning/behavior of
> that function, the doc string is not appropriate.
> In that case it is inappropriate because it allows
> the other meaning: after instead of before. Either
> way, the doc string is misleading/ambiguous.
Please suggest a better one.
> Let me ask you the same question you asked me about
> my function for removing displays of a buffer: what
> are the use cases for `minibuffer-selected-window'?
> What is it intended for? I thought I understood it
> until your reply saying that it returns the window
> selected _before_ the minibuffer interaction.
IIUC it's mainly used to find the original buffer from where the
minibuffer was entered. Have a look at the Elisp sources.
> Could you please post the fixed string here, so I
> can see it? Clearly I don't understand this yet.
> Hopefully that will help. Thx.
The doc-string is probably not much better:
doc: /* Return the window which was selected when entering the minibuffer.
Return nil if the selected window is not a minibuffer window. */)
The Elisp documentation now has
This function returns the window that was selected at the moment
the minibuffer was entered. If the currently selected window is
not a minibuffer window, it returns `nil'.
which you might want to improve as well.
martin
next prev parent reply other threads:[~2017-10-29 18:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 20:20 bug#28978: 26.0; Regression: separate, dedicated `*Completions*' frame no longer has parameter `minibuffer' Drew Adams
2017-10-25 7:45 ` martin rudalics
2017-10-25 14:47 ` Drew Adams
2017-10-26 7:57 ` martin rudalics
2017-10-26 14:01 ` Drew Adams
2017-10-27 8:25 ` martin rudalics
2017-10-27 14:19 ` Drew Adams
2017-10-28 8:45 ` martin rudalics
2017-10-28 19:15 ` Drew Adams
2017-10-29 11:18 ` martin rudalics
2017-10-29 15:59 ` Drew Adams
2017-10-29 18:13 ` martin rudalics [this message]
2017-10-29 23:56 ` Drew Adams
2017-10-30 8:24 ` martin rudalics
2017-10-30 14:32 ` Drew Adams
2017-10-30 19:00 ` martin rudalics
2017-10-30 19:16 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59F61A30.30300@gmx.at \
--to=rudalics@gmx.at \
--cc=28978-done@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.