GNU bug report logs - #23975
25.0.94: defcustom error message is wrong when :type field has a :match attribute

Previous Next

Package: emacs;

Reported by: rswgnu <at> gmail.com

Date: Wed, 13 Jul 2016 20:05:02 UTC

Severity: minor

Tags: fixed

Found in version 25.0.94

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 23975 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Robert Weiner <rsw <at> gnu.org>, rswgnu <at> gmail.com,
 Mauro Aranda <maurooaranda <at> gmail.com>, 23975 <at> debbugs.gnu.org
Subject: Re: bug#23975: 25.0.94: defcustom error message is wrong when :type
 field has a :match attribute
Date: Fri, 4 Sep 2020 09:48:01 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> I wonder if we could just document the :type-error property.  So
>> anybody that uses a custom :match function with additional checks can
>> put there the information they like to show the user when something goes
>> wrong.  So the defcustom posted would be something like:
>>
>> (defcustom bounded-num 999
>>   "Positive, bounded number"
>>   :type '(integer :match (lambda (widget value) (and (integerp value)
>>
          (> value 0)
>>
          (< value 1000)))
>>                         :type-error "Value should be an integer between
0 and 1000"))
>>
>> That's easy, and would solve the main problem here.  WDYT?
>
> I think that's a very good idea.

Great! Here's my attempt:
[Message part 2 (text/html, inline)]
[0001-Document-type-error-property-for-customization-types.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.