If you have a recent version of Carbon Emacs, you can run M-x mac-toggle-max-window to toggle full screen mode, with no menubar. This is handy enough that I've bound it to ⌘ Return, which is similar to what some Linux and Windows apps use to toggle full screen mode.

(define-key global-map [(alt return)]
    'mac-toggle-max-window)

I also keep the tool bar off with (tool-bar-mode -1), scroll bars disabled with (scroll-bar-mode -1), and menu bars off with (menu-bar-mode -1). Enjoy an Emacs without distractions!

Update [2008-08-10] They seem to have removed the function, but you can get it back with this code, Vebjorn Lsoja:

(defun mac-toggle-max-window ()
  (interactive)
  (set-frame-parameter nil 'fullscreen 
    (if (frame-parameter nil 'fullscreen)
      nil
      'fullboth))) 

Labels: , ,

9 comments:

BrnLng wrote at July 03, 2008 11:53 AM

What about Stallman saying Emacs´ no more?

Anonymous wrote at July 31, 2008 9:35 PM

Another handy app is iterm, where command - return toggles to completely full screen mode too. I often run regular emacs like that.

Rick C wrote at August 07, 2008 9:44 AM

Amit, both your "home" links in the top right are now 403. Did Stanford delete your pages?

Amit wrote at August 07, 2008 12:31 PM

Rick, sometimes the Stanford alumni web server goes down for various reasons :( but it usually is back up within a few hours. I've considered using another host but it's a lot of work to ask everyone to change their links.

Rick C wrote at August 08, 2008 8:16 AM

Yep--when I saw your response, I checked the page and noticed it had come back. If the server hadn't responded or thrown a 500 error, I wouldn't have even commented, but a 403 made me wonder.

Ryan Davis wrote at August 13, 2008 1:16 PM

Amit, thanks for the code snippet in the update. It seems to work in carbon emacs as well, but it resizes 1 line too big so that the minibuffer is hidden from view.

Sanjana wrote at September 10, 2008 10:37 AM

Hey amit very good blog and good technical knowledge by u about emacs.

I am really very much amazed with your technology understanding

I have also implemented my project as a social networking website
in java jsp its an open source
https://www.fabgabs.com
Keep it up with ur work
we young indians will make every indians proud

Anonymous wrote at March 09, 2009 9:42 PM

Thanks for the tip! The key binding didn't work for me for some reason, but this did:

(define-key global-map (kbd "M-RET") 'mac-toggle-max-window)

(just in case it might help someone else)

topfunky wrote at October 07, 2009 12:52 PM

I use this mode constantly, but would love to tell it to use my second monitor (instead of the main one). Is this possible?

Post a Comment