From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Freer Newsgroups: gmane.emacs.help Subject: Re: maximising window? Date: Sun, 8 Jun 2014 18:00:01 +0100 (BST) Message-ID: References: <878up74f7p.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Trace: ger.gmane.org 1402246849 12325 80.91.229.3 (8 Jun 2014 17:00:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2014 17:00:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 19:00:42 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 1WtgSY-0004tb-2F for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 19:00:42 +0200 Original-Received: from localhost ([::1]:57128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtgSX-0006Ak-MO for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 13:00:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtgS6-0005so-BT for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 13:00:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtgRx-0006Gp-A2 for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 13:00:14 -0400 Original-Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:54177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtgRx-0006D0-4Q for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 13:00:05 -0400 Original-Received: by mail-wg0-f48.google.com with SMTP id n12so4626525wgh.19 for ; Sun, 08 Jun 2014 10:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=vzBvShqL7xuGW+1pE7/K+YcciHhFhjxH0G5EqhR4HCg=; b=hIsszeSSNBuhcvPDntEBG0oxojz5KmHcFjcyxbwPWixNxXugNDAxVUf76N1cOvIFYj Oy9f9qsrOxqF+Jttg/o+AwSemY8Tl+sXZ1uAsPmrLNTuVi6tL0PM9A3CE+Hrzh/F9hp9 hXXplsVxEoHzG7hDO4HRwuz39lCE62u0E/2JzIODBLujuZtqsgdK4+5AHDyQB+yjA0Q+ friOII9lkTt04rR5VsHhhvS1/uyDmxTHy1mTiAZgzdEp0IL835zLkQpJNnvl+miNo+fx XHLaLzocSIuqQybnOQRW8KJoFeRJejk2UkTzFXgHZDKrL1I8hkn15MK5GjzbnPo//ARJ Sz2Q== X-Received: by 10.180.88.129 with SMTP id bg1mr24446502wib.51.1402246803756; Sun, 08 Jun 2014 10:00:03 -0700 (PDT) Original-Received: from james.home (host86-170-32-167.range86-170.btcentralplus.com. [86.170.32.167]) by mx.google.com with ESMTPSA id z14sm9831329wiu.6.2014.06.08.10.00.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Jun 2014 10:00:03 -0700 (PDT) X-X-Sender: james@james In-Reply-To: <878up74f7p.fsf@web.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::230 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:98097 Archived-At: On Sun, 8 Jun 2014, Michael Heerdegen wrote: > James Freer writes: > >> One thing I want to enter in the .emacs is the equivalent of >> alt+f10. Maximise 'window' isn't quite the same from what I've read >> this evening... in emacs they're frames. Vary depending on Mac, linux >> or windows - I'm using Linux Xubuntu on a CRT monitor. > > If you want to do it for all new frames, `default-frame-alist' is the > right place: > > (add-to-list 'default-frame-alist '(fullscreen . maximized)) > > See (info "(elisp) Frame Parameters") for details. > > Interactively: `toggle-frame-maximized', `toggle-frame-fullscreen', as > it had been suggested. For older Emacsen, you can simply write your own > commands using `modify-frame-parameters'. These definitions from > frame.el should work in Emacs 23, too: > > --8<---------------cut here---------------start------------->8--- > (defun toggle-frame-maximized () > "Toggle maximization state of the selected frame. > Maximize the selected frame or un-maximize if it is already maximized. > Respect window manager screen decorations. > If the frame is in fullscreen mode, don't change its mode, > just toggle the temporary frame parameter `maximized', > so the frame will go to the right maximization state > after disabling fullscreen mode. > See also `toggle-frame-fullscreen'." > (interactive) > (if (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) > (modify-frame-parameters > nil > `((maximized > . ,(unless (eq (frame-parameter nil 'maximized) 'maximized) > 'maximized)))) > (modify-frame-parameters > nil > `((fullscreen > . ,(unless (eq (frame-parameter nil 'fullscreen) 'maximized) > 'maximized)))))) > > (defun toggle-frame-fullscreen () > "Toggle fullscreen mode of the selected frame. > Enable fullscreen mode of the selected frame or disable if it is > already fullscreen. Ignore window manager screen decorations. > When turning on fullscreen mode, remember the previous value of the > maximization state in the temporary frame parameter `maximized'. > Restore the maximization state when turning off fullscreen mode. > See also `toggle-frame-maximized'." > (interactive) > (modify-frame-parameters > nil > `((maximized > . ,(unless (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) > (frame-parameter nil 'fullscreen))) > (fullscreen > . ,(if (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) > (if (eq (frame-parameter nil 'maximized) 'maximized) > 'maximized) > 'fullscreen))))) > --8<---------------cut here---------------end--------------->8--- > > > Michael. Thanks for putting me on the right track. Just tried 'default-frame-alist' and that's fine. I'll save the email and look into the later stuff another time. A lot to learn with emacs and I'm taking it one step at a time. james