Re: emacs: Handling external dependencies

Subject: Re: emacs: Handling external dependencies

Date: Tue, 13 Nov 2012 20:19:02 -0500

To: Damien Cassou, notmuch mailing list

Cc:

From: Ethan Glasser-Camp


Damien Cassou <damien.cassou@gmail.com> writes:

> 4) distribute the dependency with the rest of notmuch (in a separate
> "fallback-libs/" directory) and load it only when requiring the
> library with the standard load-path does not work. Jonas Bernoulli
> gave me a way to do that:
>
> ,----
> | (or (require 'THE-LIB nil t)
> |     (let ((load-path
> |           (cons (expand-file-name
> |                  "fallback-libs"
> |                  (file-name-directory (or load-file-name buffer-file-name)))
> |                 load-path)))
> |       (require 'THE-LIB)))
> `----
>
> What do you think?

Why not just append it to the *end* of load-path? Then it won't shadow
anything.

Ethan

Thread: