0

When I open emacs, the frame size is set to: width 85 and height 40.

Is there a keybinding to toggle between maximizing the frame, and going back to the previous frame size of 85 x 40

Saurabh
  • 211
  • 1
  • 10
  • Have you tried going into and out of the full screen mode with `F11`? If you don't resize the frame, it will toggle between full screen and window with initial size. –  Jul 04 '19 at 15:20

2 Answers2

2

To maximize the frame, but not make it take up the whole screen, you can use toggle-frame-maximized, which is on M-f10 by default. C-h f toggle-frame-maximized:

toggle-frame-maximized is an interactive compiled Lisp function in
`frame.el'.

It is bound to <M-f10>, ESC <f10>.

(toggle-frame-maximized &optional FRAME)

  Probably introduced at or before Emacs version 24.4.

Toggle maximization state of FRAME.
Maximize selected frame or un-maximize if it is already maximized.
rpluim
  • 4,605
  • 8
  • 22
1

There's a function called toggle-frame-fullscreen which looks to be bound to f11 key by default. You can use C-h f to call describe-function and put toggle-frame-fullscreen at the prompt. It will tell you about how the function works and what key it is currently bound to, if any.

shoshin
  • 904
  • 4
  • 9
  • 3
    If OP want 'maximize' in the sense of 'make as big as possible without obscuring toolbars' etc., there's also `toggle-frame-maximized`, which is on `M-f10` – rpluim Jul 04 '19 at 15:14
  • Thank you @rpluim, this is what I was looking for – Saurabh Jul 04 '19 at 15:34
  • @rpluim: Please submit that as an answer (comments can be deleted at any time). OP: If that's your preferred answer then you can accept it (unaccepting this answer). – Drew Jul 04 '19 at 16:19
  • I was hoping @shoshin would update his answer ☺ – rpluim Jul 06 '19 at 11:45
  • haha, i was going to, but didn't want to take away your credit @rplium :) i simply misread the question. – shoshin Jul 06 '19 at 14:42