From: Drew Adams <drew.adams@oracle.com>
To: Alan Mackenzie <acm@muc.de>, martin rudalics <rudalics@gmx.at>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: What are invisible frames for?
Date: Thu, 22 Apr 2021 16:09:52 +0000 [thread overview]
Message-ID: <SA2PR10MB447413C352F67A45D8108603F3469@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <YIGEeiOOh9Qk2TWq@ACM>
> OK. Presumably you set this up by setting the 'visibility frame
> parameter. I don't think setting that frame parameter causes
> Fmake_frame_invisible to get called. At least, I can't find the call
> anywhere.
>
> I don't think I was clear enough in my OP, but it's calls to
> Fmake_frame_invisible which are bothering me. That function moves any
> minibuffer on the frame to some other frame. I don't think it should.
> That's what I'm trying to sort out.
I use the Lisp function `make-frame-invisible'. For example:
(defun hide-frame (frame &optional prefix)
"Make FRAME invisible. Like `make-frame-invisible', but reads frame name.
Non-nil PREFIX makes it invisible even if all other frames are invisible."
(interactive (list (read-frame "Frame to make invisible: ")))
(make-frame-invisible (get-a-frame frame) prefix))
(defun show-frame (frame)
"Make FRAME visible and raise it, without selecting it.
FRAME may be a frame or its name."
(interactive (list (read-frame "Frame to make visible: ")))
(setq frame (get-a-frame frame))
(make-frame-visible frame)
(raise-frame frame))
(defun hide-everything ()
"Hide all frames of session at once.
Iconify minibuffer frame; make all others invisible.
Remembers frame configuration in register `C-l' (Control-L).
To restore this frame configuration, use `\\[jump-to-register] C-l'."
(interactive)
(frame-configuration-to-register frame-config-register)
(let ((minibuf-frame-name
(and (boundp '1on1-minibuffer-frame)
(cdr (assq 'name (frame-parameters
1on1-minibuffer-frame)))))
(thumfr-thumbify-dont-iconify-flag nil)) ; In `thumb-frm.el'.
(dolist (frame (frame-list))
(if (eq minibuf-frame-name
(cdr (assq 'name (frame-parameters frame))))
(iconify-frame frame) ; minibuffer frame
(make-frame-invisible frame t))))) ; other frames
(defun show-hide ()
"1 frame visible: `show-hide-show-function'; else: `hide-everything'.
This acts as a toggle between showing all frames and showing only an
iconified minibuffer frame."
(interactive)
(if (< (length (visible-frame-list)) 2)
(funcall show-hide-show-function)
(hide-everything)))
https://www.emacswiki.org/emacs/download/frame-cmds.el
next prev parent reply other threads:[~2021-04-22 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 10:09 What are invisible frames for? Alan Mackenzie
2021-04-22 12:15 ` martin rudalics
2021-04-22 13:18 ` Stefan Monnier
2021-04-22 21:23 ` Clément Pit-Claudel
2021-04-22 14:13 ` Alan Mackenzie
2021-04-22 16:09 ` Drew Adams [this message]
2021-04-22 12:31 ` Stefan Monnier
2021-04-22 13:54 ` Michael Welsh Duggan
2021-04-22 14:08 ` Stefan Monnier
2021-04-22 14:13 ` Eli Zaretskii
2021-04-22 14:14 ` tumashu
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=SA2PR10MB447413C352F67A45D8108603F3469@SA2PR10MB4474.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=acm@muc.de \
--cc=emacs-devel@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 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.