Re: emacs: Handling external dependencies
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Wed, 14 Nov 2012 01:32:07 +0000 (18:32 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:31 +0000 (09:50 -0800)
0f/2c0bb1aaeda86dd49a1d97f84edd2c76cc21b9 [new file with mode: 0644]

diff --git a/0f/2c0bb1aaeda86dd49a1d97f84edd2c76cc21b9 b/0f/2c0bb1aaeda86dd49a1d97f84edd2c76cc21b9
new file mode 100644 (file)
index 0000000..742b778
--- /dev/null
@@ -0,0 +1,127 @@
+Return-Path: <awg@xvx.ca>\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 28F4A431FBC\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Nov 2012 17:32:12 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 9j9wxiggbBaw for <notmuch@notmuchmail.org>;\r
+       Tue, 13 Nov 2012 17:32:10 -0800 (PST)\r
+Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com\r
+       [209.85.220.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EFA13431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Nov 2012 17:32:09 -0800 (PST)\r
+Received: by mail-vc0-f181.google.com with SMTP id n11so8726834vch.26\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Nov 2012 17:32:09 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :x-gm-message-state;\r
+       bh=mT1uRdNnU60xLNn1DLxzh18dE5d/I7SIQtH1ToZL0l4=;\r
+       b=nepm+ii5oY/av3VPNL6cLg3//2EQX41/h8tOOCY9z2wWCJ1TieWMHXf1J6sFTPl1Jd\r
+       T6/ny2DH+xd2YJmqqi76IeuSWQsf+eHk9sDeRRunuI2WtVaFfYUPSZxgqk54FkgK78j1\r
+       uIezzNOlmhLLNNuhDd5fDWga8ug3n1Z3ch7VrUnVYLhB8ToKY1HpbrwAOKw+rBoEdNjd\r
+       9Zr0LLQmkSyxZaIXwikeTutCNVPf0/j6jBbfh392gknovixOIH+r+dfkdllolltVcWMn\r
+       7eFOQuV7t46CRrtF7Z6U01bhfUk/yInW18bXlqA7itKokoojkGtpYB1/00pUF9Ac7WPJ\r
+       +QbQ==\r
+MIME-Version: 1.0\r
+Received: by 10.220.8.195 with SMTP id i3mr8955455vci.44.1352856727937; Tue,\r
+       13 Nov 2012 17:32:07 -0800 (PST)\r
+Sender: awg@xvx.ca\r
+Received: by 10.220.154.205 with HTTP; Tue, 13 Nov 2012 17:32:07 -0800 (PST)\r
+X-Originating-IP: [2001:470:b:2bb::2]\r
+In-Reply-To:\r
+ <CA+y5ggiGrAcicQLeskaXFoxYyJQVVXZ1VRX=XS8zPFR9_mBFxA@mail.gmail.com>\r
+References:\r
+ <CA+y5ggiGrAcicQLeskaXFoxYyJQVVXZ1VRX=XS8zPFR9_mBFxA@mail.gmail.com>\r
+Date: Tue, 13 Nov 2012 18:32:07 -0700\r
+X-Google-Sender-Auth: goF1VI5xbuUNQLdXQf7EUWJIZPw\r
+Message-ID:\r
+ <CAMoJFUt8hvVF4svNdgKNPrDTTRWFn9+AWbBWL6egwy7jYnOqZg@mail.gmail.com>\r
+Subject: Re: emacs: Handling external dependencies\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Damien Cassou <damien.cassou@gmail.com>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+X-Gm-Message-State:\r
+ ALoCoQlpcLorx081vLaz+ef7gikgg5jbGhcaFlD2W5R5eLlRv0Gefy61kiBp6m6Khp3c0OhhhC2P\r
+Cc: notmuch mailing list <notmuch@notmuchmail.org>\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: Wed, 14 Nov 2012 01:32:12 -0000\r
+\r
+Hi Damien,\r
+\r
+On Sat, Nov 10, 2012 at 8:58 AM, Damien Cassou <damien.cassou@gmail.com> wrote:\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
+First off, what's the library, and what is it used for?\r
+\r
+I believe that currently the notmuch emacs interface only depends on\r
+stuff that's included with emacs, which is a nice way to be. There are\r
+some packages that can improve the notmuch emacs experience if they\r
+are installed, like w3m. If possible, I'd encourage you to make the\r
+new library recommended, rather than required.\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
+I'm not big on any of these solutions. I'd suggest just using the\r
+package, documenting it as a dependency, and letting users install it\r
+however they like. This means adding it as a dependency to the\r
+distro-specific packaging (easy for Debian and friends, not sure about\r
+others).\r
+\r
+Just my thoughts - offering them mostly since no one else has replied.\r
+\r
+-- Adam\r