From: James Freer <jessejazza3.uk@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: maximising window?
Date: Sun, 8 Jun 2014 18:00:01 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.10.1406081756140.2056@james> (raw)
In-Reply-To: <878up74f7p.fsf@web.de>
On Sun, 8 Jun 2014, Michael Heerdegen wrote:
> James Freer <jessejazza3.uk@gmail.com> 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
prev parent reply other threads:[~2014-06-08 17:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-07 23:27 maximising window? James Freer
2014-06-08 0:20 ` John Mastro
2014-06-08 0:35 ` Chris F.A. Johnson
2014-06-08 5:49 ` Igor Sosa Mayor
2014-06-08 6:29 ` Shelagh Manton
2014-06-08 6:49 ` Igor Sosa Mayor
[not found] ` <mailman.3235.1402209024.1147.help-gnu-emacs@gnu.org>
2014-06-11 0:06 ` Emanuel Berg
2014-06-08 15:02 ` Michael Heerdegen
2014-06-08 17:00 ` James Freer [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1406081756140.2056@james \
--to=jessejazza3.uk@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).