From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Maximize/restore frame function Date: Fri, 3 Oct 2014 22:49:44 -0700 (PDT) Message-ID: <0a8efd3b-4f9e-4070-9bbc-2679ec47ef70@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1412401824 15283 80.91.229.3 (4 Oct 2014 05:50:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2014 05:50:24 +0000 (UTC) To: Subhan Michael Tindall , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 04 07:50:17 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XaIES-0003zZ-PV for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 07:50:16 +0200 Original-Received: from localhost ([::1]:42671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaIES-0006b6-E5 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 01:50:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaIEB-0006Xl-Av for help-gnu-emacs@gnu.org; Sat, 04 Oct 2014 01:50:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaIE3-0005ky-NR for help-gnu-emacs@gnu.org; Sat, 04 Oct 2014 01:49:59 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:39092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaIE3-0005km-Gv for help-gnu-emacs@gnu.org; Sat, 04 Oct 2014 01:49:51 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s945nkfT014540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 4 Oct 2014 05:49:47 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s945njOi008815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 4 Oct 2014 05:49:45 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s945nibe008811; Sat, 4 Oct 2014 05:49:45 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100264 Archived-At: > 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. |=20 | With no prefix arg, toggle both directions. | With a non-negative prefix arg, toggle only vertically. | With a negative prefix arg, toggle horizontally. |=20 | 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).