unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>,
	Damien Cassou <damien.cassou@gmail.com>
Cc: notmuch mailing list <notmuch@notmuchmail.org>
Subject: Re: emacs: Handling external dependencies
Date: Wed, 14 Nov 2012 11:48:23 +0200	[thread overview]
Message-ID: <m2lie4347s.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <CAMoJFUt8hvVF4svNdgKNPrDTTRWFn9+AWbBWL6egwy7jYnOqZg@mail.gmail.com>

On Wed, Nov 14 2012, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:

> Hi Damien,
>
> On Sat, Nov 10, 2012 at 8:58 AM, Damien Cassou <damien.cassou@gmail.com> wrote:
>> I recently sent a patch for notmuch emacs that depends on a particular
>> library. What is the best way to deal with such dependencies?
>
> First off, what's the library, and what is it used for?
>
> I believe that currently the notmuch emacs interface only depends on
> stuff that's included with emacs, which is a nice way to be. There are
> some packages that can improve the notmuch emacs experience if they
> are installed, like w3m. If possible, I'd encourage you to make the
> new library recommended, rather than required.
>
>> I can see different solutions:
>>
>> 1) distribute a rewritten version of the dependency so that the code
>> now belongs to notmuch (e.g., replace the name of the library by
>> 'notmuch'). This has the disadvantage of requiring maintenance when a
>> new version of the library is released and can also be considered
>> 'stealing' by some authors.
>>
>> 2) use a package manager to load the library. This has the
>> disadvantage that the now standard package manager is not in
>> widespread use yet and is not compatible with other OS-based package
>> managers (such as apt-get in Debian).
>>
>> 3) distribute the dependency with the rest of notmuch and load this
>> one. This has the disadvantage of possibly shadowing an already
>> existing version of this library installed through a different means.
>>
>> 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?
>
> I'm not big on any of these solutions. I'd suggest just using the
> package, documenting it as a dependency, and letting users install it
> however they like. This means adding it as a dependency to the
> distro-specific packaging (easy for Debian and friends, not sure about
> others).

Now that Adam said it I have to agree. IMO design the feature so that it
is disabled unless `header-button` is available. 

> Just my thoughts - offering them mostly since no one else has replied.
>
> -- Adam

Tomi

  reply	other threads:[~2012-11-14  9:48 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
2012-11-14  9:43   ` Tomi Ollila
2012-11-14  1:32 ` Adam Wolfe Gordon
2012-11-14  9:48   ` Tomi Ollila [this message]
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=m2lie4347s.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=awg+notmuch@xvx.ca \
    --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).