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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I tell emacs to wrap lines at the 80th character?

I am looking for a solution I can put in /.emacs.

I put this in /.emacs but it doesn't work.

;; ========== Enable Line Numbering ==========                                         

(line-number-mode 1)

;; ========== Set the fill column ==========                                           

(setq-default fill-column 80)
share|improve this question
fill-column controls paragraph reformatting (M-q, similar to Vim's gqap) and the automatic replacement of inserted spaces by (auto-fill-mode, similar to Vim's textwidth (I think)). Is that what you wanted? Or did you mean on-screen wrapping that doesn't affect the content of the file? – Gilles Apr 9 '13 at 22:54
up vote 0 down vote accepted

I think it's a typographical error?

It should be

(setq default-fill-column 80)

share|improve this answer
No, that's deprecated but equivalent to (setq-default fill-column 80). – Gilles Apr 9 '13 at 22:51

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.