From: martin rudalics <rudalics@gmx.at>
To: emacs-devel <emacs-devel@gnu.org>
Subject: About the 'minibuffer' frame parameter
Date: Sun, 31 Jul 2016 20:12:46 +0200 [thread overview]
Message-ID: <579E3F9E.8020200@gmx.at> (raw)
With emacs -Q evaluate:
(progn
(setq minibuffer-less-frame (make-frame '((minibuffer . nil))))
(setq minibuffer-only-frame (make-frame '((minibuffer . only))))
(set-frame-parameter
minibuffer-less-frame 'minibuffer (frame-root-window minibuffer-only-frame))
(frame-parameter minibuffer-less-frame 'minibuffer))
This reveals a number of problems with how we currently handle the
'minibuffer' frame parameter and how it's documented. In section
28.4.3.5 we say about this parameter:
`minibuffer'
Whether this frame has its own minibuffer. The value `t' means
yes, `nil' means no, `only' means this frame is just a minibuffer.
If the value is a minibuffer window (in some other frame), the
frame uses that minibuffer.
This frame parameter takes effect when the frame is created, and
can not be changed afterwards.
The sentence "If the value is a minibuffer window (in some other frame),
the frame uses that minibuffer." is misleading. A minibuffer window is
reported iff that window is on the _same_ frame and that frame is not a
minibuffer-only frame. A minibuffer window in some other frame is never
reported.
But if the frame is minibuffer-less and uses the minibuffer window of
some other frame, we return as value nil although the real, internal
frame parameter's value (not the one produced by the
store_in_alist (&alist, Qminibuffer,
(! FRAME_HAS_MINIBUF_P (f) ? Qnil
: FRAME_MINIBUF_ONLY_P (f) ? Qonly
: FRAME_MINIBUF_WINDOW (f)));
construct) is actually that window. Otherwise, evaluating the
‘set-frame-parameter’ above would have produced an error. Which means
that the sentence "This frame parameter takes effect when the frame is
created, and can not be changed afterwards." is misleading as well. In
fact, setting the 'minibuffer' frame parameter is the only way to change
the minibuffer window for a specific frame.
Note in this context that ‘minibuffer-window’ returns the correct
minibuffer window for its FRAME argument while ‘set-minibuffer-window’
does not allow to set the minibuffer window for a specific frame.
I'm not sure how to deal with this situation. Personally, I'd prefer to
report the real, internal 'minibuffer' parameter but am afraid that
might break existing code. In any case, the documentation should be
fixed. Somehow.
martin
next reply other threads:[~2016-07-31 18:12 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-31 18:12 martin rudalics [this message]
2016-08-05 13:33 ` About the 'minibuffer' frame parameter Eli Zaretskii
2016-08-05 16:37 ` martin rudalics
2016-08-05 17:18 ` Drew Adams
2016-08-05 17:35 ` martin rudalics
2016-08-05 17:52 ` Drew Adams
2016-08-05 18:19 ` martin rudalics
2016-08-05 18:37 ` Drew Adams
2016-08-06 9:32 ` martin rudalics
2016-08-06 16:46 ` Drew Adams
2016-08-07 8:46 ` martin rudalics
2017-01-14 0:59 ` Juanma Barranquero
2017-01-14 7:47 ` Eli Zaretskii
2017-01-14 9:18 ` Juanma Barranquero
2017-01-14 10:42 ` Eli Zaretskii
2017-01-14 11:05 ` martin rudalics
2017-01-14 14:01 ` Juanma Barranquero
2017-01-19 3:54 ` John Wiegley
2017-01-14 15:56 ` Drew Adams
2017-01-15 3:01 ` Richard Stallman
2016-08-05 19:25 ` Eli Zaretskii
2016-08-06 9:33 ` martin rudalics
2016-08-07 13:54 ` Eli Zaretskii
2016-08-08 8:27 ` martin rudalics
2016-08-08 15:34 ` Eli Zaretskii
2016-08-09 8:27 ` martin rudalics
2016-08-09 14:51 ` Eli Zaretskii
2016-08-09 16:07 ` martin rudalics
2016-08-09 16:21 ` Eli Zaretskii
2016-08-09 17:34 ` martin rudalics
2016-08-09 17:51 ` Eli Zaretskii
2016-08-10 12:15 ` martin rudalics
2016-08-10 14:23 ` Stefan Monnier
2016-08-10 14:54 ` Eli Zaretskii
2016-08-10 14:49 ` Eli Zaretskii
2016-08-21 9:41 ` martin rudalics
2016-08-21 20:51 ` Kaushal Modi
2016-08-22 12:49 ` Kaushal Modi
2016-08-22 13:03 ` Kaushal Modi
2016-08-22 15:51 ` Kaushal Modi
2016-08-22 16:01 ` martin rudalics
2016-08-22 16:27 ` Kaushal Modi
2016-08-23 8:19 ` martin rudalics
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=579E3F9E.8020200@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
/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.