Re: [bug] Invalid function: notmuch-user-agent (was: notmuch release 0.33 now available)

Subject: Re: [bug] Invalid function: notmuch-user-agent (was: notmuch release 0.33 now available)

Date: Mon, 06 Sep 2021 10:00:15 -0700

To: Gregor Zattler,


From: David Bremner

Gregor Zattler <> writes:

> Hi David, notmuch developers,
> * David Bremner <> [2021-09-03; 13:29]:
>> Emacs
>> -----
>> `notmuch` no longer sets `mail-user-agent` on load. To restore the
>> previous behaviour of using notmuch to send mail by default, customize
>> `mail-user-agent` to `notmuch-user-agent`.
> While reading this news, I realized, that `mail-user-agent'
> is set to "message-user-agent" in my emacs instance.
> I therefore tried to change `mail-user-agent' via the customization
> interface (clicking the radio button "Other:" and providing
> "notmuch-user-agent" as value) but then I got an error
> message:
> custom-variable-mark-to-save: Saving mail-user-agent: Invalid function: notmuch-user-agent

This seems like a bug in the defcustom for mail-user-agent (i.e. a bug
in emacs). 
I think you will find that

   (setq mail-user-agent 'notmuch-user-agent)

works. My reading of the documentation (and either my reading or the
docs could be wrong) is that the symbol for a mail-user-agent need not
be a function.  Quoting the docstring for define-mail-user-agent

    SYMBOL can be any Lisp symbol.  Its function definition and/or
    value as a variable do not matter for this usage; we use only certain
    properties on its property list, to encode the rest of the arguments.

Other user agents, e.g. 'gnus-user-agent, 'message-user-agent, and
'sendmail-user-agent do not seem to have function definition. On the
other hand, it is a bit surprising that no-one noticed a problem with
"Other" mail-user-agent values before now.

notmuch mailing list --
To unsubscribe send an email to