XYZ
XYZ

Reputation: 27437

How to enable org-indent-mode by default?

I am using Emacs 25.1.50.2

When I am using Org-mode, the org-indent-mode is off by default. So I have to enable it using M-x org-indent-mode everytime.

I put the lisp below into my config file ~/.emecs.d/init.el with no effect.

;; Enable org-indent mode by default
(org-indent mode 1)
;; Above line really should be (org-indent-mode 1)

Thanks for your time :)

Upvotes: 8

Views: 9075

Answers (2)

aruku7230
aruku7230

Reputation: 991

In 2021 current version of org, you can do this:

(setq org-startup-indented t)

Upvotes: 12

phils
phils

Reputation: 73365

You can use the mode hook for the major mode to enable this buffer-local minor mode in org-mode buffers.

For Emacs 24+ you can simply write:

(add-hook 'org-mode-hook 'org-indent-mode)

In earlier Emacs versions you should instead use a custom function to explicitly enable the minor mode by calling (org-indent-mode 1), and then add that custom function to the hook variable.

Upvotes: 14

Related Questions