Newbie question

In my Preferences.el file there is a line (setq-default fill-column 78) which works wonderfully.

Now I need to tell Emacs (Aqumacs in my case) to open windows with 85 characters width, so that I do not have to resize every window when it opens (as they open with around 60 characters width only).

How do I do that?

  • Do you really mean (Emacs) window or (Emacs) frame? A window typically has the width of its frame, or else a width that results from dividing an existing window left/right. – Drew Feb 13 '16 at 17:41

If you are looking for a way to set the default frame width, then just customize option default-frame-alist to specify parameter width as 85:

M-x customize-option RET default-frame-alist RET

Save your customization.


My problem was solved using

(setq default-frame-alist
                (width . 140)

85 did not work, probably because the number is font-dependent.

  • That is the same answer I already gave: Use default-frame-alist. But what you say about 85 not working is not clear to me. Just what does "85 did not work" mean - what are the symptoms? It works for me. And what do you mean by "the number is font-dependent"? The frame width parameter is the number of characters, regardless of the face/font used. – Drew Feb 13 '16 at 18:30
  • 1
    Perhaps the user is changing the font subsequent to creating the frame, and that is why 140 seems to work better. The font can be set simultaneously as part of the default-frame-alist. Note: there were several bugs prior to feature 21415 that previously prevented proper frame creation (fonts, sizes, positioning) -- Emacs 25 and master branch have the bug fixes implemented. – lawlist Feb 13 '16 at 19:40
  • My experience is also that the number does not properly translate to the number of columns in the created frame. Perhaps the width is calculated in a different font than the one the frame actually ends up using? – tripleee Sep 11 '19 at 9:01

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.