Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DEBE2429E26 for ; Fri, 16 Dec 2011 04:32:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x63Ow2fpYrqK for ; Fri, 16 Dec 2011 04:32:04 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2D8B9431FD0 for ; Fri, 16 Dec 2011 04:32:04 -0800 (PST) Received: by wgbds13 with SMTP id ds13so4869443wgb.2 for ; Fri, 16 Dec 2011 04:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=/xNTS0sUlrSZtCZ9aDZcPCJrT8Vw3B+NqlacBn1Z7nU=; b=PIexlDeAZzupHiznaGO6X5F8l8VY7z7nW15DjC2UJWaqQFgFfmiOuNytfpwfy7q4rf rE8tL2HMrmYr583ysqObZRusSb4qR+0M/7YD1Xihl8Wu6SGO8GKX8j5qCtiHW59nJhyd c3oT7nOMalA3FYuLdjAX74j9UNH9oWA9lVO0A= Received: by 10.180.107.97 with SMTP id hb1mr12111802wib.18.1324038722954; Fri, 16 Dec 2011 04:32:02 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id b5sm14376217wbh.4.2011.12.16.04.32.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Dec 2011 04:32:02 -0800 (PST) From: Dmitry Kurochkin To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom In-Reply-To: <4f5151bf4b16ca977c6cfe7e4bf2bf909281675b.1316804530.git.jani@nikula.org> References: <864e58d004c991bcb823e0f61f33eb8cbbbb5b76.1316804530.git.jani@nikula.org> <4f5151bf4b16ca977c6cfe7e4bf2bf909281675b.1316804530.git.jani@nikula.org> User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 16 Dec 2011 16:31:22 +0400 Message-ID: <87iplgsnol.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 12:32:05 -0000 On Fri, 23 Sep 2011 22:03:42 +0300, Jani Nikula wrote: > The :options keyword is not meaningful for function type. Also, it was not > possible to enter nil value, contrary to the notmuch-mua-user-agent > defcustom documentation. Specify the alternatives using choice type, taking > nil into account. > I know little about the customize interface. But the patch makes sense to me. Perhaps I would give mode detailed description for the options, but before the change there was none at all, so this is definitely an improvement. Regards, Dmitry > Signed-off-by: Jani Nikula > --- > emacs/notmuch-mua.el | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el > index 8824b08..8b95bd4 100644 > --- a/emacs/notmuch-mua.el > +++ b/emacs/notmuch-mua.el > @@ -35,10 +35,12 @@ > "Function used to generate a `User-Agent:' string. If this is > `nil' then no `User-Agent:' will be generated." > :group 'notmuch > - :type 'function > - :options '(notmuch-mua-user-agent-full > - notmuch-mua-user-agent-notmuch > - notmuch-mua-user-agent-emacs)) > + :type '(choice (const :tag "No user agent string" nil) > + (const :tag "Full" notmuch-mua-user-agent-full) > + (const :tag "Notmuch" notmuch-mua-user-agent-notmuch) > + (const :tag "Emacs" notmuch-mua-user-agent-emacs) > + (function :tag "Custom user agent function" > + :value notmuch-mua-user-agent-full))) > > (defcustom notmuch-mua-hidden-headers '("^User-Agent:") > "Headers that are added to the `message-mode' hidden headers > -- > 1.7.4.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch