Subject: Re: [bug#49457] [PATCH v2] gnu: Add emacs-consult-notmuch.

From: Andrew Tropin <[email-masked]>
Date: Thu, 08 Jul 2021 13:14:34 +0300

zimoun <[email-masked]> writes:

> Hi,
>
> (Sorry for this naive question.)
>
> On Thu, 08 Jul 2021 at 09:41, Nicolas Goaziou <[email-masked]> wrote:
>> Andrew Tropin <[email-masked]> writes:
>>> Nicolas Goaziou <[email-masked]> writes:
>>
>>>> Thank you. However, notmuch should be an input, there's no reason to
>>>> propagate it into user's profile.
>>>
>>> There is a (require 'notmuch) in consult-notmuch code, so we need
>>> notmuch.el on the load-path, sadly, but we don't have a separate
>>> emacs-notmuch package for it and therefore we have to propagate the
>>> whole notmuch package here :(
>>
>> Duh! You're right, of course.
>
> For my personal understanding because I am not familiar with Emacs
> packages and package propagation.  The package ’emacs-magit’ has ’git’
> as inputs and AFAIK it does not work without Git installed in the
> profile.  Why is it different?

The magit package itself will be loaded correctly, because its emacs
package requirements are satisfied and even some functions will work,
for example magit-dispatch will show a transient interface.  Other
functions that rely on git binary will throw an error and there are two
solutions for that: make a git a propagated input or set
`magit-git-executable` to a path to the git binary inside store, which
will make magit work with git as a regular input.

notmuch in contrast to git provides not only notmuch binary, but also
notmuch.el.  consult-notmuch requires only notmuch.el, which have to be
propagated and doesn't depend on notmuch binary, but because notmuch.el
is a part of notmuch package the binary will be propagated too.  The
possible solution here is to split notmuch into two packages: notmuch and
emacs-notmuch, so we will be able to set `notmuch-command` variable for
notmuch.el and have notmuch as an input, but not installed in the profile.