From eeef152c6f149b15d2a8ed4522565b90c173018b Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Wed, 14 Nov 2012 20:19:02 +1900 Subject: [PATCH] Re: emacs: Handling external dependencies --- 99/ddbbbbc8c6dd7a5d0e669c1fe2605a1366e7b8 | 91 +++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 99/ddbbbbc8c6dd7a5d0e669c1fe2605a1366e7b8 diff --git a/99/ddbbbbc8c6dd7a5d0e669c1fe2605a1366e7b8 b/99/ddbbbbc8c6dd7a5d0e669c1fe2605a1366e7b8 new file mode 100644 index 000000000..f2aa5196a --- /dev/null +++ b/99/ddbbbbc8c6dd7a5d0e669c1fe2605a1366e7b8 @@ -0,0 +1,91 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1EC0E431FBC + for ; Tue, 13 Nov 2012 17:19:08 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 9QRH3EuBZplM for ; + Tue, 13 Nov 2012 17:19:06 -0800 (PST) +Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com + [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id AA0A8431FAF + for ; Tue, 13 Nov 2012 17:19:06 -0800 (PST) +Received: by mail-qa0-f46.google.com with SMTP id c11so1882176qad.5 + for ; Tue, 13 Nov 2012 17:19:04 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=4Dl8rIjPeXIEpZym4Ickvc3s68lnR4Cgn4uRz7nBZHM=; + b=opqiENbOirhIvsW++iIcs5VljqP/v5zbGPTdYTV5yHP6ezt3pSvTzM+YsGOe37jHOm + WZ+mRwLGlXVlRigX6xptGN8hleJUszArpdYSD0F6szRJo5oAftHYjIuRaixOWwtieDPC + FiOyyPxQ273WdWdlxwTSAYNT0OnfOdJDZPArZ4naLaTG2gnU+XiYzZM5psSZdYnWM8dd + RUox8x+SVeAmN00jm37YJaD0ebwNMVnYvOm9OlcvT48fg8tHPjeXmVstiaZmlWpOVEiL + 15ihxk0vOytjWmpp7AZMhUMKbh/vtkpt8Uy5iKYawzv+NOEwUNQC5rok2DEya9helmMF + Bubw== +Received: by 10.224.19.74 with SMTP id z10mr24165125qaa.96.1352855944865; + Tue, 13 Nov 2012 17:19:04 -0800 (PST) +Received: from smtp.gmail.com (mca2d36d0.tmodns.net. [208.54.45.202]) + by mx.google.com with ESMTPS id jw1sm1214448qeb.13.2012.11.13.17.19.03 + (version=TLSv1/SSLv3 cipher=OTHER); + Tue, 13 Nov 2012 17:19:04 -0800 (PST) +From: Ethan Glasser-Camp +To: Damien Cassou , + notmuch mailing list +Subject: Re: emacs: Handling external dependencies +In-Reply-To: + +References: + +User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 13 Nov 2012 20:19:02 -0500 +Message-ID: <87pq3h56d5.fsf@betacantrips.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 14 Nov 2012 01:19:08 -0000 + +Damien Cassou 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 -- 2.26.2