0

I'm using Emacs-28.2 (9.0) on MacOS Sonoma 14.3 and Emacs 26.1-10 on RedHat-8.8. In both cases I have the same config with the following setting:

(setq fill-column 79)

So I was expecting that when I type the text, Emacs would let me fill in up to 79 characters per line and break down lines when needed. However very often it break the line at column 65, 71, 75 or such, much earlier then expected.

Am I doing something wrong, or this setting works as designed and I don't use the right way?

2
  • 3
    C-h f auto-fill-mode says: "When Auto Fill mode is enabled, inserting a space at a column beyond ‘current-fill-column’ automatically breaks the line at a previous space." Does that explain the behavior you see? If not, add an example in your question.
    – NickD
    Feb 3 at 18:17
  • Does this answer your question? fill-paragraph does not honor fill-column
    – Drew
    Feb 3 at 19:50

1 Answer 1

2

I assume that you are using M-q (fill-paragraph) to wrap the text? If so, then it breaks the text at the end of the last word prior to the fill column. This does leave most lines shorter than the fill-column, also called a ragged right edge. If you would prefer to justify the text to the fill-column, then use C-u M-q instead. You can read the help for the fill-paragraph function by using C-h f.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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