Re: emacs: Handling external dependencies
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 14 Nov 2012 09:48:23 +0000 (11:48 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:33 +0000 (09:50 -0800)
68/f0d67fb29803a67cbfdcb45714310bafa7c74f [new file with mode: 0644]

diff --git a/68/f0d67fb29803a67cbfdcb45714310bafa7c74f b/68/f0d67fb29803a67cbfdcb45714310bafa7c74f
new file mode 100644 (file)
index 0000000..b44b0cb
--- /dev/null
@@ -0,0 +1,119 @@
+Return-Path: <tomi.ollila@iki.fi>\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 65AF9431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 14 Nov 2012 01:48:24 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 7Qiht1yZ7aBS for <notmuch@notmuchmail.org>;\r
+       Wed, 14 Nov 2012 01:48:23 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 54436431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 14 Nov 2012 01:48:23 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id 1948D1000E2;\r
+       Wed, 14 Nov 2012 11:48:23 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>,\r
+       Damien Cassou <damien.cassou@gmail.com>\r
+Subject: Re: emacs: Handling external dependencies\r
+In-Reply-To:\r
+ <CAMoJFUt8hvVF4svNdgKNPrDTTRWFn9+AWbBWL6egwy7jYnOqZg@mail.gmail.com>\r
+References:\r
+ <CA+y5ggiGrAcicQLeskaXFoxYyJQVVXZ1VRX=XS8zPFR9_mBFxA@mail.gmail.com>\r
+       <CAMoJFUt8hvVF4svNdgKNPrDTTRWFn9+AWbBWL6egwy7jYnOqZg@mail.gmail.com>\r
+User-Agent: Notmuch/0.14+84~g8a199bf (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 14 Nov 2012 11:48:23 +0200\r
+Message-ID: <m2lie4347s.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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 09:48:24 -0000\r
+\r
+On Wed, Nov 14 2012, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\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
+Now that Adam said it I have to agree. IMO design the feature so that it\r
+is disabled unless `header-button` is available. \r
+\r
+> Just my thoughts - offering them mostly since no one else has replied.\r
+>\r
+> -- Adam\r
+\r
+Tomi\r