Whenever I see some installation instruction for an emacs package it always suggests to use add-to-list 'load-path it never works for me. For some reason and I have to use load-file. For example, this will not work:
(add-to-list 'load-path "~/.emacs.d/jade-mode")
(require 'sws-mode)
(require 'jade-mode)
(add-to-list 'auto-mode-alist '("\\.styl$" . sws-mode))
(add-to-list 'auto-mode-alist '("\\.jade$" . sws-mode))
but this will work:
(load-file "~/.emacs.d/jade-mode/sws-mode.el")
(load-file "~/.emacs.d/jade-mode/jade-mode.el")
(require 'sws-mode)
(require 'jade-mode)
anybody can tell me why?
EDIT: I use Carbon Emacs on MAC OS X 10.5
Perhaps the problem is that the leading tilde (‘~’) is not expanded when
requiresearches the entries in theload-pathlist. Consider using theexpand-file-namefunction to prepare your entry for subsequent use byrequire:or
It would help to know which Emacs you’re using on which operating system.