unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
To: Damien Cassou <damien.cassou@gmail.com>,
	notmuch mailing list <notmuch@notmuchmail.org>
Subject: Re: emacs: Handling external dependencies
Date: Tue, 13 Nov 2012 20:19:02 -0500	[thread overview]
Message-ID: <87pq3h56d5.fsf@betacantrips.com> (raw)
In-Reply-To: <CA+y5ggiGrAcicQLeskaXFoxYyJQVVXZ1VRX=XS8zPFR9_mBFxA@mail.gmail.com>

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

  reply	other threads:[~2012-11-14  1:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 15:58 emacs: Handling external dependencies Damien Cassou
2012-11-14  1:19 ` Ethan Glasser-Camp [this message]
2012-11-14  9:43   ` Tomi Ollila
2012-11-14  1:32 ` Adam Wolfe Gordon
2012-11-14  9:48   ` Tomi Ollila
2012-11-15 14:59   ` Damien Cassou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq3h56d5.fsf@betacantrips.com \
    --to=ethan.glasser.camp@gmail.com \
    --cc=damien.cassou@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).