Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using emacs 23.1.1. I set the font size in my .emacs with

(set-face-attribute 'default nil :height 100)

The problem is that my emacs is now really small. The outer box (what I call a window and what I think emacs calls a "frame") is sized normally, but the inner box (which I call a "frame" and emacs a "window", I think) is too small. I tried the suggestions here, but neither of them seem to work.

Any ideas? I'm on ubuntu netbook if that's relevant. My entire startup file is:

(add-hook 'after-make-frame-functions
  (lambda (frame)
      (set-frame-height frame
            (/ (x-display-pixel-height)
      (set-frame-width frame
            (/ (x-display-pixel-width)

(autoload 'octave-mode "octave-mod" nil t)
(setq auto-mode-alist
      (cons '("\\.m$" . octave-mode) auto-mode-alist))
(add-hook 'octave-mode-hook
          (lambda ()
            (abbrev-mode 1)
            (auto-fill-mode 1)
            (if (eq window-system 'x)
                (font-lock-mode 1))))
(tool-bar-mode -1)
(set-face-attribute 'default nil :height 100)

Here is a picture of what it looks like. It might be hard to tell, but the "window" is taking up the whole screen; that whitespace is all inside emacs.


share|improve this question
I don't understand the effect. Could you post a screenshot? –  Gilles Apr 21 '11 at 22:37
@Gilles: picture attached. –  Xodarap Apr 21 '11 at 22:46

2 Answers 2

I think I had problems of this nature before and solved them using Xresources. That might have been with XEmacs though. I think the basic idea is that Emacs creates the frame before reading .emacs, so you can give it a heads up using Xresources.

For an example, here are some of the contents of my ~/.Xdefaults:

emacs*geometry: WxH
Emacs.menuBar: off
Emacs.toolBar: off
Emacs*font: Font-Family Pt-size

(where W, H, Font-Family, and Pt-size should be customized)

I use 'xrdb /path/to/.Xdefaults' during my GNOME session start-up to compile/load these settings. You can invoke xrdb manually while testing this out.

share|improve this answer

This probably doesn't help you much, but: I find that when I do that (set-face-attribute 'default nil :height 100), if my frame is maximized, it stays maximized. (I'm using Gnome with Metacity on an old Debian 5 box).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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