For a test purpose, I enabled the org-mode by M-x org-mode
in a buffer (e.g., in scratch buffer). How to disable it? Doing again an M-x org-mode
does not turn it off.
1 Answer
Doing again an M-x org-mode does not turn it off.
This convention is for minor-modes - Doing a M-x "minor-mode-name" again disables that minor mode. org-mode is a major mode. When you do this, emacs has no clue which major mode to go into. There must be a major mode always active.
So, rather than disable org-mode, you have to think in terms of which major mode to go into. Fundamental mode, as described in a comment is a choice as good as any.
-
1The scratch buffer is in lisp interaction mode when starting Emacs so that would be a good candidate as well Commented Mar 3, 2017 at 7:14
M-x fundamental-mode
? See also the contents of the functionfundamental-mode
-- i.e.,(kill-all-local-variables) (run-mode-hooks)
. I take it a step further and remove overlays, and I remove text properties, and some other stuff -- see: emacs.stackexchange.com/a/12527/2287