Mac – Emacs fails to load (.emacs) configuration file

emacs

I am using Emacs on Ubuntu 9.04.

I have my emacs configuration file in the ~/.emacs.d directory.

My emacs file is called .emacs.

I have some basic configuration. However, when I start emacs, it never loads my configuration and I have to keep doing it manually using e.g.

M-X Transient-mark-mode

My emacs file is listed below:

;; Emac customization file path
(add-to-list 'load-path "~/emacs.d")

;; Use font lock mode
(global-font-lock-mode t)

;; Highlight cursor line
(global-hl-line-mode t)

;; Highlight selected region
(transient-mark-mode t)

I want to add to this configuration instead of manually adding entries.

Best Answer

Your init file contains personal EmacsLisp code that you want to execute when you start Emacs.

  • For GnuEmacs, it is ~/.emacs or _emacs or ~/.emacs.d/init.el.
  • For XEmacs, it is ~/.xemacs or ~/.xemacs/init.el.
Related Question