14

This is such a basic question but I am really at a loss (a google search only revealed solutions for OS X).

Until recently, I primarily used terminal mode (which I can make full-screen using my desktop environment's full-screen shortcut for the shell window) but switched to GUI because I'd like to be able to pick a font.

Any suggestions? Maximizing using the buttons in the window title bar doesn't go to true full screen - I can still see the task bar and the window title bar.

Edit: I should add that the Full-screen option (i.e., after right-clicking the window title bar) is greyed out (see exhibit 1 below). Also, changing the Full Screen setting under Special Applications Settings automatically reverts to being disabled.

The No border option does offer a partial solution in that it makes the window title bar disappear (though task bar is still visible) - it would be nice if there was a way to easily toggle full-screen using a keyboard shortcut and given KDE's and emacs' customizability, I think it's probaby due to my being a KDE and emacs n00b.


Exhibit 1:

enter image description here


Update:

In order to safeguard against any settings I may have inadvertently customized, I ended up resetting my kde desktop (by deleting the relevant plasma file). Upon reboot, I was able to use the Special Window Settings dialog box to Force the application into full-screen mode (the dialog box is accessed by invoking the menu via Alt+F3 -> More actions -> Special window settings). (Screenshot below.)

In a general sense, I still prefer paprika's answer which involves creating a global keyboard shortcut as it's the better solution. Just wanted to include my roundabout fix in case other folks also find that their emacs is refusing to accept the full screen global keyboard shortcut.

Forcing full-screen mode from the Special Window Settings dialog box:

enter image description here

22

GNU Emacs has built-in support for fullscreen since version 24.4. From the changelog:

New commands toggle-frame-fullscreen and toggle-frame-maximized, bound to <f11> and M-<f10>, respectively.

Note that you don't need to use the latest Emacs version just for this feature. Your window manager (KDE/KWin) is able to put any application window into fullscreen mode, as explained here.

  • Yeah, I'd added (i) Shift + F11 as a global keyboard shortcut bound to Map to all fullscreen and (ii) F11 as a standard keyboard shortcut bound to Full Screen Mode but neither of those is working. It's odd that the the Full-screen option is greyed out in the menu-bar (i.e., the menu that comes up after right-clicking the title bar of the emacs window). – iceman Oct 19 '14 at 16:26
2

The instructions on emacswiki worked for me (Emacs 24.3.1). I've only tried this on Unity, so I'm not 100% sure it will work on KDE. Here's the relevant portion from my ~/.emacs:

(defun my-fullscreen ()
  (interactive)
  (set-frame-parameter nil 'fullscreen 'fullboth) ;this makes the frame go fullscreen
  (tool-bar-mode -1) ;these 3 lines turn off GUI junk
  (scroll-bar-mode -1)
  (menu-bar-mode -1))

(defun my-non-fullscreen ()
  (interactive)
  (set-frame-parameter nil 'width 82)
  (set-frame-parameter nil 'fullscreen 'fullheight)
  (menu-bar-mode t)) ;I don't turn tool-bar and scroll-bar back on b/c I never want them

(defun toggle-fullscreen ()
  (interactive)
  (if (eq (frame-parameter nil 'fullscreen) 'fullboth)  ;tests if already fullscreened
      (my-non-fullscreen)
    (my-fullscreen)))

(global-set-key (kbd "<f11>") 'toggle-fullscreen) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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