Take the 2-minute tour ×

I have the following code to have auto-fill mode as minor mode when I run emacs/org-mode.

(defun my-org-mode-hook()
(add-hook 'org-mode-hook 'my-org-mode-hook)

But, when I open the org file, I see only (Org Fly Spc): flyspell mode is on, but not the auto-fill mode is not on.

What's wrong with this?

share|improve this question
Does anyone know why (add-hook 'text-mode-hook 'turn-on-auto-fill) or even (add-hook 'org-mode-hook 'turn-on-auto-fill) does not work? –  user600830 May 14 '11 at 19:59

1 Answer 1

up vote 4 down vote accepted

auto-fill-mode without an argument toggles the mode. Try using

(auto-fill-mode 1)

in your hook instead?

share|improve this answer
It works, thanks! –  prosseek Sep 8 '10 at 22:54

Your Answer


