This is a subpage of CategoryFrames and CategoryModes. It describes [[frame]] setups, frame [[command]]s, and frame functions.



[:ShrinkWrappedFrames]
== Shrink-Wrapped Frames ==

These libraries provide functions that resize frames so they fit their buffer(s):
 
* <tt>[[autofit-frame.el]]</tt> -- Automatically fit each frame.
* <tt>[[fit-frame.el]]</tt>  -- Manually resize a frame. Shrink-wrap it to fit its [[buffer]](s).

Use these libraries especially if you use frames, instead of Emacs windows, by default -- that is, if you have <code>(setq pop-up-frames t)</code>.

See [[Shrink-Wrapping Frames]] for more information.


[:OneOnOne]
== Custom Frames Setup ==

Library <tt>[[oneonone.el]]</tt> makes Emacs more ''frame-oriented''.
See OneOnOneEmacs for more information. Here is a summary:

* Use frames, by default, instead of [[window]]s.
* Define default properties for normal frames and "special" frames (see EmacsManual for info on special frames -- e.g. `special-display-frame-alist').
* Create three predefined frames:
** <code>*Help*</code> buffer frame
** <code>*Completions*</code> buffer frame
** `1on1-minibuffer-frame' -- a standalone [[minibuffer]] frame

:: This is the only frame to have a minibuffer. By default, it is automatically sized to the full width of your display and placed at the bottom of the display. It changes background color, depending on what you're doing: searching, typing in the minibuffer, or nothing (inactive).

This library is especially useful if used in combination with libraries <tt>[[autofit-frame.el]]</tt>, which automatically fits frames to their selected window (buffer), and <tt>[[fit-frame.el]]</tt>, which lets you fit a frame manually or resize it incrementally. See [[#ShrinkWrappedFrames]].

'''Note:''' Because Emacs is not really designed to be frame-oriented, there are some built-in and standard functions that produce less-than-desirable results when frames, instead of windows, are the default. In other libraries, I have fixed most of these functions to play well with this library. See the libraries by DrewAdams that are named ''<file>''-.el and ''<file>''+.el, where ''<file>'' is the name of a standard Emacs library.

The properties of all frames are user-configurable using variables.



[:FrameCommands]
== Frame Commands ==

This section describes commands (interactive functions) dealing with frames.


[:frame-cmds.el]
== frame-cmds.el ==

Library <tt>[[frame-cmds.el]]</tt> is a library of frame commands. Using the suggested key bindings, you can:

* Use `C-x 5 2' to clone the selected frame, that is, create a new frame with the same charactistics (frame parameters).
* Use `C-M-' with the arrow keys (up, down, left, right) to resize a frame incrementally.
* Use `M-' with the arrow keys to move a frame incrementally.
* Use '''Shift''' plus the usual keys for scrolling to move a frame to the screen edges: `C-S-v' (bottom), `M-S-v' (top), `C-S-next' (right), `C-S-prior' (left).
* Use `M-x tile-frames-horizontally' and `M-x tile-frames-vertically' to tile all visible frames.
* Use `M-x maximize-frame-horizontally', `M-x maximize-frame-vertically', and `M-x max-frame' to maximize the current frame.
* Use `C-M-z' or `C-x C-z' to iconify/hide all frames -- see `show-hide', below. 
* Use `C-M-z' in a lone frame to restore all frames -- see `show-hide', below.
* Use `C-mouse-1' in the minibuffer to restore all frames -- see `mouse-show-hide-mark-unmark', below.
* Use `C-mouse-1' in Dired to mark/unmark a file -- see `mouse-show-hide-mark-unmark', below.
* Use `C-mouse-3' on the mode line to remove window from frame -- see `mouse-remove-window', below.

These are some of the commands in <tt>[[frame-cmds.el]]</tt>:

* `clone-frame' -- Copy selected frame to a new frame with the same parameters.
* `enlarge-frame', `enlarge-frame-horizontally', `shrink-frame', and `shrink-frame-horizontally' -- Resize a frame incrementally.
* `tile-frames-horizontally' and `tile-frames-vertically' -- Tile the visible frames horizontally and vertically.
** With prefix argument, you are prompted for names of two frames to tile.
** Otherwise, all visible frames are tiled (except a standalone
minibuffer frame, if any).
* `move-frame-up', `move-frame-down', `move-frame-left', and `move-frame-right' -- Move a frame incrementally.
* `move-frame-to-screen-top', `move-frame-to-screen-bottom', `move-frame-to-screen-left', `move-frame-to-screen-right' -- Move a frame to a screen edge.
* `enlarge-font' -- Incrementally change the size of a frame's font. See also these frame-zooming commands in library <tt>[[zoom-frm.el]]</tt>: `zoom-frm-in', `zoom-frm-out', `zoom-frm-unzoom', `toggle-zoom-frame'. 
* `set-frame-alist-parameter-from-frame' and `set-all-frame-alist-parameters-from-frame' -- Update a frame-parameter alist, such as `default-frame-alist', using the parameters of the current frame.
* `tell-customize-var-has-changed' -- Tell customize to consider that a given variable has been set (changed).
* `show-hide' -- If only one frame is visible then call `show-hide-show-function'; else call `hide-everything' (see below). By default, `show-hide-show-function' is `jump-to-frame-config-register', which restores the frame configuration saved when you `iconify-everything' or `hide-everything'.
* `iconify-everything' -- Iconify all frames of session at once. Save frame configuration for restoring by `show-hide'.
* `hide-everything' -- Hide all frames of session at once. Iconify standalone minibuffer frame (if any); make all other frames invisible. Save frame configuration for restoring by `show-hide'.
* `show-buffer-menu' -- Call `buffer-menu' after making all frames visible.
* `mouse-show-hide-mark-unmark' -- Mouse command (bind to mouse click) that acts differently, depending on where mouse is clicked:
** Call `show-hide' if in minibuffer.
** Mark or unmark the clicked file, if in Dired.
** Call `buffer-menu' if clicked elsewhere.
* `iconify/map-frame' -- Iconify selected frame if now mapped.  Map it if now iconified. With non-nil prefix arg, iconify all visible frames.
* `mouse-iconify/map-frame' -- Iconify frame clicked on, if now mapped. Map it if now iconified.
* `remove-window' -- Remove window from the display (default is `selected-window'). If window is the only one in its frame, then:
** If window is dedicated to its buffer, then make its frame invisible.
** Otherwise, delete its frame (as well as the window).
* `remove-windows-on' -- Remove all windows showing buffer (calls `remove-window' on each window showing buffer).
* `mouse-remove-window' -- Remove the window you click on (calls `remove-window').
* `delete/iconify-window' -- Delete or iconify window (default: `selected-window').
** Without a prefix arg (prefix = nil), the frame is iconified if window is dedicated, otherwise the frame is deleted.
** With prefix arg < 0, the frame is iconified.
** With prefix arg >= 0, the frame is deleted.
* `delete/iconify-windows-on' -- For each window showing buffer: delete it or iconify its frame. (This calls `delete/iconify-window' on each window showing buffer.) Interactively, treats all windows showing buffer in any frame. Prefix argument functions the same as in command `delete/iconify-window'.
* `rename-frame' -- Rename a frame. Prefix arg non-nil means rename all frames that have the same name. Default frame to rename is `selected-frame'. Default new name is `buffer-name'.
* `show-frame' -- Make frame visible and raise it, without selecting it.
* `hide-frame' -- Make frame invisible.  Like `make-frame-invisible', but reads frame name.
* `show-a-frame-on' -- Make visible and raise a frame showing buffer, if there is one. Neither the frame nor the buffer is selected.
* `show-*Help*-buffer' -- Raise a frame showing buffer `*Help*', without selecting it.
* `delete-1-window-frames-on' -- Delete all visible 1-window frames showing buffer.


[:fit-frame.el]
[:auto-fit-frame.el]
== fit-frame.el, autofit-frame.el ==

For commands to resize a frame to fit its selected window, see libraries <tt>[[fit-frame.el]]</tt> and <tt>[[autofit-frame.el]]</tt> (and more info at [[Shrink-Wrapping Frames]]). In Windows, library ##fit-frame.el## also has commands to maximize and restore a frame.

----
CategoryFrames CategoryModes CategoryDisplay
