12
7
Is there any way of using Emacs in fullscreen mode in OSX.
I'm currently using Emacs from http://emacsforosx.com/
Edit: This question is not relevant anymore since the release of Emacs version 24.4. Please see the accepted answer.
12
7
Is there any way of using Emacs in fullscreen mode in OSX.
I'm currently using Emacs from http://emacsforosx.com/
Edit: This question is not relevant anymore since the release of Emacs version 24.4. Please see the accepted answer.
9
This feature is present in Emacs 24.4. From the NEWS file:
Changes in Emacs 24.4 on Non-Free Operating Systems
...
Improved fullscreen support on Mac OS X.
Both native (>= OSX 10.7) and "old style" fullscreen are supported. Customize `ns-use-native-fullscreen' to change style. For >= 10.7 native is the default.
And:
New commands
toggle-frame-fullscreen
andtoggle-frame-maximized
, bound to<f11>
andM-<f10>
, respectively.
1As the original author of maxframe.el, I fully support this answer. – Ryan McGeary – 2014-11-07T17:44:31.140
1Thanks. toggle-frame-fullscreen
helped exit fullscreen state in separate desktop where nothing else obvious would -- no close window icon on the created desktop, for example. – kjhughes – 2016-10-24T13:18:33.673
10
The build of Emacs distributed via http://emacsforosx.com doesn't include the fullscreen option.
If you use the Homebrew package manager, you can install Emacs with fullscreen support via
brew install emacs --cocoa
You'll then want to link Homebrew's Emacs.app
to one in your /Applications
directory:
ln -s `brew --prefix`/Cellar/emacs/23.2/Emacs.app /Applications/Emacs.app
Now you'll be able to use fullscreen mode via ns-toggle-fullscreen.
2
fwiw, this answer is no longer applicable to emacs 24+, see http://superuser.com/a/599029/78325 for a more recent answer.
– Aaron Jensen – 2016-02-19T12:36:05.9834
If you want to keep your version of GNU Emacs, here are two possible tested approaches.
From Amit's Thoughts: Emacs: full screen on Mac OS X for GNU (Cocoa/Nextstep) Emacs 23 :
I'm using a patched version of maxframe.el, and this function from the EmacsWiki page:
(defvar maxframe-maximized-p nil "maxframe is in fullscreen mode") (defun toggle-maxframe () "Toggle maximized frame" (interactive) (setq maxframe-maximized-p (not maxframe-maximized-p)) (cond (maxframe-maximized-p (maximize-frame)) (t (restore-frame)))) (define-key global-map [(alt return)] 'toggle-maxframe)
Unfortunately this doesn't hide the menubar or titlebar.
Another article recommends :
If you want to make GNU Emacs fullscreen, there are three things you should do:
- Disable tool bar
This can be accomplished executing (inside Emacs)(tool-bar-mode -1)
- Disable menu bar
This can be done executing(menu-bar-mode -1)
- Go to full screen mode
You have to execute(set-frame-parameter nil 'fullscreen 'fullboth)
If you want to disable always tool bar and menu bar, like me, and you want to be able to go to full screen with a keystroke (F11, for example), add this to your .emacs:
;; F11 = Full Screen (defun toggle-fullscreen (&optional f) (interactive) (let ((current-value (frame-parameter nil 'fullscreen))) (set-frame-parameter nil 'fullscreen (if (equal 'fullboth current-value) (if (boundp 'old-fullscreen) old-fullscreen nil) (progn (setq old-fullscreen current-value) 'fullboth))))) (global-set-key [f11] 'toggle-fullscreen) ;; Disable tool-bar (tool-bar-mode -1) ;; Disable Menu Bar (menu-bar-mode -1)
3This seems to give maximized screen, not full screen, if you know what I mean. – qazwsx – 2012-03-28T19:54:28.803
Your 2nd article is not specific to Mac OS X and was written by a Debian developer, it includes focus bug. – Tamara Wijsman – 2012-03-29T10:16:18.030
@harrymc: Luckily I came across here, because you made a typo behind my name. The focus bug is in a function called by your script, and thus can't be fixed in the script itself. – Tamara Wijsman – 2012-03-29T19:56:47.297
2
I've successfully done this in the past using these set of commands:
True fullscreen for the Cocoa build in Emacs 23
This fork has patches for true fullscreen and it works wonderfully.
git clone git://github.com/typester/emacs.git cd emacs ./configure --with-ns make bootstrap make install mv nextstep/Emacs.app /Applications
Then, you can simply set a global key and use it:
(global-set-key (kbd "M-RET") 'ns-toggle-fullscreen)
M-RET translates to Alt+Return. You might need to install git in advance...
Alternatively, you can find some old binaries here including the patch so that you only have to set the global key; although I would really advise against downloading someone else's binaries, they're old and can't be trusted...
If you have/install homebrew, you can compile a March 2012 version that enables fullscreen support:
brew install https://gist.github.com/raw/1946398/e7bbb52a4fe3ae0060e65df3d4a7462730ddc822/emacs.rb --force --HEAD --cocoa --use-git-head
I found this in EmacsWiki: Full Screen - Mac OS X - Patching the binary.
1
Click the green maximize/zoom twice. The first time maximizes the height, the second click maximizes the width.
1
If you run emacs in a terminal, get the new version of iTerm, it has a "Full Screen" mode.
0
While full-screen support has been added to NextStep (Cocoa) version of Emacs several times, it's not accepted upstream, so vanilla Emacs builds don't have it. You might find the patch online and apply it yourself.
In my opinion, the most viable option is to use iTerm (or Apple Terminal on OS X 10.7) in fullscreen mode with console version of emacs. You may want to create an alias for /Applications/Emacs-23.3.app/Contents/MacOS/Emacs -nw
1Well, if you just acess emacs in terminal, you can make the terminal window full screen. – Billjk – 2012-04-01T15:05:31.430