Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Subdirectories to Load Path

Tags:

emacs

emacs23

Rather than individually specifing each subdirectory in my plugins directory I want to be able to automatically load them, to that end I included the following to my .emacs file:

(let ((base  "~/.emacs.d/plugins/"))
      (normal-top-level-add-subdirs-to-load-path))

require 'rinari
require 'yasnippet

Unfortunately the above results in: File error: Cannot open load file, rinari

Anyone know what's wrong and how to fix it?

like image 750
sjac Avatar asked Sep 06 '11 15:09

sjac


1 Answers

You're so close...

(let ((default-directory "~/.emacs.d/plugins/"))
  (normal-top-level-add-subdirs-to-load-path))

normal-top-level-add-subdirs-to-load-path works off the current directory, which you can set via the variable default-directory - not base like you tried.

like image 117
Trey Jackson Avatar answered Oct 02 '22 09:10

Trey Jackson