Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Emacs not use Mountain Lion's full screen style

Tags:

emacs

I'm a heavy Emacs user. However, on my Mac, if I switch Emacs to fullscreen mode, it will use Mountain Lion's fullscreen style, which places Emacs on another desktop. In this fullscreen mode, the 2 top lines are wasted since I cannot use them for displaying the Emacs buffer (you can see in the picture below). Also, the animation when I change desktop is annoying.

I wonder if there is any solution to force Emacs not use Mountain Lion's fullscreen style. I just want a maximize displaying area (hide the menu bar, hide the title bar,...) like when I playing video in fullscreen with VLC 1.x

like image 904
tmtxt Avatar asked Dec 05 '13 16:12

tmtxt


People also ask

How do I exit full-screen in Emacs?

Now run Emacs and press F11 to switch into full-screen mode. Press F11 again to switch to windowed mode.

How to fullscreen a buffer in Emacs?

F11 ¶ Toggle full-screen mode for the current frame. (The difference between full-screen and maximized is normally that the former hides window manager decorations, giving slightly more screen space to Emacs itself.)


2 Answers

Emacs 24 has an option not to use the separate-desktop-fullscreen Mac OS thing:

(setq ns-use-native-fullscreen nil)

It still covers the whole screen including the dock, and hides the window title bar.

After setting this variable up, you can switch to fullscreen using M-xtoggle-frame-fullscreen.

Also, don't forget to hide the useless toolbar:

(tool-bar-mode -1)
like image 115
katspaugh Avatar answered Sep 27 '22 23:09

katspaugh


You can do the following:

  • Auto-hide the menu bar using (setq ns-auto-hide-menu-bar t)

  • Hide the tool bar using (tool-bar-mode -1) (I haven't found it useful.)

  • Place the title bar above the top of the screen. Although it's not possible to drag it there, the Mac OS X port allows you to place it there programatically. For example, you could do this using: (set-frame-position (selected-frame) 0 -24). Note: this requires the menu bar to be hidden.

  • Resize the window to the desired size, e.g. (set-frame-size (selected-frame) 80 85). (Unfortunately, due to limitations in the OS, you can't manually resize the frame to be higher than the display.)

With a 6x8 font, the editing area will be 148 lines on a 1600x1200 monitor. I use two such monitors, and split my Emacs frame into six columns. By using follow-mode, I can see 888 consecutive lines of code.

like image 22
Lindydancer Avatar answered Sep 28 '22 00:09

Lindydancer