--- /dev/null
+Return-Path: <damien.cassou@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id AE8BA431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:58:35 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id CD2ypcnvWsIw for <notmuch@notmuchmail.org>;\r
+ Sat, 10 Nov 2012 07:58:31 -0800 (PST)\r
+Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com\r
+ [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id CFB67431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:58:31 -0800 (PST)\r
+Received: by mail-vb0-f53.google.com with SMTP id fc21so5141576vbb.26\r
+ for <notmuch@notmuchmail.org>; Sat, 10 Nov 2012 07:58:31 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=mime-version:from:date:message-id:subject:to:content-type;\r
+ bh=dJka071jdD2ePwkysbcvOiNMlKDOh00iA7Ahxv1iCqE=;\r
+ b=zDLz49Gykr7bzYyqhD1ZP3IA59V4NPVvX2G8atH7fNPjt47nUBLW5fsJU+qcrnQqta\r
+ 4la28cicgAgBPdJQ+QvnInKV4pJtX9dmBqlKP7wWFMDnWUmsGjQ4HGACHQ29wejLV50N\r
+ yzT2yjDyHxpoSHIoNKYR2KNY8vkYw6+S0iDW7DcRccvytWskEzLvU2VyCqf6ZpThiply\r
+ V1UJ3M3+tH2m8O97I1KUOqQbyj+uKnrMbevcEDcAupDSeD6E/RziH63OSFrVYOQtT81c\r
+ Z4xtPuV2CsRTTlT462Phchx4R9LXagG3z2Ej3++lj+fEq0HWyMJdE5h3AZS9fJ4UX+lL\r
+ 65sQ==\r
+Received: by 10.58.2.71 with SMTP id 7mr10954957ves.42.1352563111123; Sat, 10\r
+ Nov 2012 07:58:31 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.58.143.51 with HTTP; Sat, 10 Nov 2012 07:58:10 -0800 (PST)\r
+From: Damien Cassou <damien.cassou@gmail.com>\r
+Date: Sat, 10 Nov 2012 16:58:10 +0100\r
+Message-ID:\r
+ <CA+y5ggiGrAcicQLeskaXFoxYyJQVVXZ1VRX=XS8zPFR9_mBFxA@mail.gmail.com>\r
+Subject: emacs: Handling external dependencies\r
+To: notmuch mailing list <notmuch@notmuchmail.org>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 10 Nov 2012 15:58:35 -0000\r
+\r
+Hi,\r
+\r
+I recently sent a patch for notmuch emacs that depends on a particular\r
+library. What is the best way to deal with such dependencies?\r
+\r
+I can see different solutions:\r
+\r
+1) distribute a rewritten version of the dependency so that the code\r
+now belongs to notmuch (e.g., replace the name of the library by\r
+'notmuch'). This has the disadvantage of requiring maintenance when a\r
+new version of the library is released and can also be considered\r
+'stealing' by some authors.\r
+\r
+2) use a package manager to load the library. This has the\r
+disadvantage that the now standard package manager is not in\r
+widespread use yet and is not compatible with other OS-based package\r
+managers (such as apt-get in Debian).\r
+\r
+3) distribute the dependency with the rest of notmuch and load this\r
+one. This has the disadvantage of possibly shadowing an already\r
+existing version of this library installed through a different means.\r
+\r
+4) distribute the dependency with the rest of notmuch (in a separate\r
+"fallback-libs/" directory) and load it only when requiring the\r
+library with the standard load-path does not work. Jonas Bernoulli\r
+gave me a way to do that:\r
+\r
+,----\r
+| (or (require 'THE-LIB nil t)\r
+| (let ((load-path\r
+| (cons (expand-file-name\r
+| "fallback-libs"\r
+| (file-name-directory (or load-file-name buffer-file-name)))\r
+| load-path)))\r
+| (require 'THE-LIB)))\r
+`----\r
+\r
+What do you think?\r
+\r
+--\r
+Damien Cassou\r
+http://damiencassou.seasidehosting.st\r
+\r
+"Success is the ability to go from one failure to another without\r
+losing enthusiasm."\r
+Winston Churchill\r