Emacs: Open File in Org Mode

By Xah Lee. Date: .

By default, emacs opens any file name ending .org in org-mode.

Make a File Open in org-mode

add this line as the first line of the file:

-*- mode: org -*-

Open .txt file in org-mode

put this in your Emacs Init File:

;; make emacs open file ending in .txt in org-mode
(add-to-list 'auto-mode-alist '("\\.txt\\'" . org-mode))

Emacs, org mode