Org mode is a derived mode of Text mode: if you turn auto-fill-mode
on for Text mode, then you turn it on for all derived modes, including Org mode. If you want it on for Text mode but want it off for Org mode, then you have to turn it off in org-mode-hook
:
(with-eval-after-load 'org
(add-hook 'org-mode-hook (lambda () (auto-fill-mode -1))))
Do C-h f org-mode
: near the end you will find this paragraph:
In addition to any hooks its parent mode ‘outline-mode’ might have
run, this mode runs the hook ‘org-mode-hook’, as the final or
penultimate step during initialization.
Parent mode: ‘outline-mode’.
and if you do the same with C-h f outline-mode
, you will find this paragraph:
Turning on outline mode calls the value of ‘text-mode-hook’ and then of
‘outline-mode-hook’, if they are non-nil.
Parent mode: ‘text-mode’.
emacs -Q
),auto-fill-mode
is off in every mode and every buffer. It is a minor mode, so the user chooses whether to turn it on in a particular buffer or a particular mode. So if it is on in Org mode buffers, it is because you are turning it on. Check the value oforg-mode-hook
withC-h v org-mode-hook
and see if you have added a function to it that turns it on - if so, just don't add that function.normal-auto-fill-function
is set toorg-auto-fill-function
. I haven't set it that way. There's nothing in my .emacs mentioningauto-fill
outside of thetext-mode-hook
and thetex-mode-hook
.tex-mode
is derived fromtext-mode
, so if you turn it on intext-mode-hook
, you don't need to turn it on intex-mode-hook
too.