help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with .emacs, files not loading


From: Colin S. Miller
Subject: Re: Issue with .emacs, files not loading
Date: Tue, 03 Jun 2008 22:40:35 +0100
User-agent: Icedove 1.5.0.14eol (X11/20080509)

Chris Poole wrote:
I used to have everything in one .emacs file.

Now I've split it up into various files for different systems (I use
Mac OS X and GNU/Linux).

This is my .emacs file:

;; Check to see if running on Mac OS X or some GNU/Linux distro
(defvar macosx-p (string-match "darwin" (symbol-name system-type)))
(defvar linux-p (string-match "gnu/linux" (symbol-name system-type)))

;; Load stuff for GNU/Linux systems only
(when linux-p
  (setq load-path (append load-path (list "~/emacs/lisp/linux"))))

;; Load stuff for Mac OS X only
(when macosx-p
  (setq load-path (append load-path (list "~/emacs/lisp/macosx"))))

;; Load OS-independant stuff
(setq load-path (append load-path (list "~/emacs/lisp/generic")))

;; Load extra major modes (to top of load-path so loads first)
(setq load-path (cons "~/emacs/lisp/generic/org" load-path))

Inside ~/emacs/lisp/generic, I have all my settings in my-custom-
generic.el. (Not byte-compiled yet.) I also have several other files.
None of them load. Similar situation with the macosx directory, etc.

The final loading of org-mode does load though, replacing the version
that came with Emacs.

I can't see what I'm doing wrong -- can anyone tell me my stupid
mistake?

Thanks.

Chris,
From the variable's documentation

  *List of directories to search for files to load.
  Each element is a string (directory name) or nil (try default directory).

  Note that the elements of this list *may not* begin with "~", so you must
  call `expand-file-name' on them before adding them to this list.


You need to expand your paths before adding them to load-path.
I can't see where you are calling (load-library) to load
my-custom-generic.el.

HTH,
Colin S. Miller


reply via email to

[Prev in Thread] Current Thread [Next in Thread]