all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Subhan Michael Tindall <SubhanT@familycareinc.org>,
	help-gnu-emacs@gnu.org
Subject: RE: Maximize/restore frame function
Date: Fri, 3 Oct 2014 22:49:44 -0700 (PDT)	[thread overview]
Message-ID: <0a8efd3b-4f9e-4070-9bbc-2679ec47ef70@default> (raw)
In-Reply-To: <c546c1dfe70547ac97b69bebbe6fa294@fcmailsvr2.familycareinc.org>

> Hi, I'm looking for a simple (hopefully!) function to maximize a
> frame/restore to it's previous size.
> I've looked through the apropos and the closest I could find was
> iconify-frame and iconify-or-deiconify-frame, neither of which quite
> does what I want.
> What I want is function to toggle a given frame between being
> maximized on it's display and it's original size
> I work in windows (bleh), I get this same functionality by double
> clicking on the top bar of the frame. This maximizes it to the
> monitor It's on.
> Dual monitor setup with virtuawin multiple desktops if that helps.
> Any ideas?

As Oscar indicated, Emacs 24.4 has this.

You can also toggle maximization (but not fullscreen), on all
platforms in all Emacs versions (starting with Emacs 20), using
library `frame-cmds.el', which you can get from Emacs Wiki (or
MELPA), http://www.emacswiki.org/emacs-en/download/frame-cmds.el

There you will find commands `maximize-frame' and `restore-frame',
aka `toggle-max-frame'.  From the doc string:

,----
| Toggle maximization of FRAME horizontally, vertically, or both.
| Reverses or (if restored) repeats the effect of the Emacs maximize
| commands.  Does not restore from maximization effected outside Emacs.
| 
| With no prefix arg, toggle both directions.
| With a non-negative prefix arg, toggle only vertically.
| With a negative prefix arg, toggle horizontally.
| 
| When toggling both directions, each is toggled from its last maximize
| or restore state.  This means that using this after
| `maximize-frame-horizontally', `maximize-frame-vertically',
| `toggle-max-frame-horizontally', or `toggle-max-frame-vertically' does
| not necessarily just reverse the effect of that command.
`----

If you use a standalone minibuffer frame then "maximizing" another
frame leaves room for the minibuffer frame; it does not occlude it.

All of the commands in the library work with all Emacs versions
(starting with Emacs 20).



  parent reply	other threads:[~2014-10-04  5:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 17:31 Maximize/restore frame function Subhan Michael Tindall
2014-10-03 18:50 ` Óscar Fuentes
2014-10-04  5:49 ` Drew Adams [this message]
2014-10-05 18:13   ` Subhan Michael Tindall
2014-10-05 19:23     ` 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=0a8efd3b-4f9e-4070-9bbc-2679ec47ef70@default \
    --to=drew.adams@oracle.com \
    --cc=SubhanT@familycareinc.org \
    --cc=help-gnu-emacs@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.