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

1
  • 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.
    – user12563
    Jul 4, 2019 at 15:20

2 Answers 2

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.
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.

5
  • 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 4, 2019 at 15:14
  • Thank you @rpluim, this is what I was looking for
    – Saurabh
    Jul 4, 2019 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 4, 2019 at 16:19
  • I was hoping @shoshin would update his answer ☺
    – rpluim
    Jul 6, 2019 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 6, 2019 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.