Re: [PATCH 2/2] completion: generate notmuch-completion.zsh using doc/conf.py

Subject: Re: [PATCH 2/2] completion: generate notmuch-completion.zsh using doc/conf.py

Date: Sat, 03 Jan 2015 15:49:36 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Sat, Jan 03 2015, David Bremner <david@tethera.net> wrote:

> David Bremner <david@tethera.net> writes:
>
>> I noticed that the (out of date) list of subcommands was simply
>> repeating the summary lines from the manpage. Since those summary
>> lines are already kept in machine readable form in doc/conf.py,
>> it's easy to compute that part of the completion file.
>
> I meant to annotate this, but lost a fight with git-send-email.  I'm not
> sure if the change to notmuch-completions.zsh is worth the trouble (how
> often will we add subcommands?), but the configuration change should
> probably go in anyway, at least one person already mentioned this in a
> bug report.

I agree that 2/2 may be left out (I rather skip checking it for now ;)

The changes in 1/2 looks good, but you could have included the new python
definition in line ~454 in (new) configure, which originally is:

    if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage >/dev/null 2>&1 ; then

(actually, this could be like:

    if command -v sphinx-build >/dev/null && "$python" -m sphinx.writers.manpage >/dev/null 2>&1 ; then

    (add that 2>&1 to be consistent with other code, I did not include it
    as I think it is wrong to do so ;))


Tomi

Thread: