4

For example, we can open a new buffer with C-x b <new-buffer-name>, and by default, this new buffer opens in fundamental-mode, which is not very useful to me. I would like to change this to open all new buffers in org-mode. How can I do this?

6

You have to customize the major-mode variable (see also the emacs manual). C-h v:

Symbol for current buffer's major mode.

The default value (normally `fundamental-mode') affects new buffers. A value of nil means to use the current buffer's major mode, provided it is not marked as "special".

You can do this with M-x customize-variable major-mode or with something like (setq-default major-mode 'org-mode) somewhere in your init file.

See also initial-major-mode for the *scratch* buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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