[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widgets with dynamic-choice

From: Ted Zlatanov
Subject: Re: widgets with dynamic-choice
Date: Mon, 18 Jul 2016 14:25:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

On Mon, 18 Jul 2016 13:26:44 -0400 Stefan Monnier <address@hidden> wrote: 

>> * what should it look like? Just a callable symbol or a form or
>> something else?

SM> As you may know I abhor `eval`, so I'd rather not have a "form" there,
SM> but a function instead.

I didn't know that, but OK :)

>> * when should the widget get updated?

SM> When we need to display it?

That means potentially a long delay on display. With customization UIs
that can be really frustrating. Can we agree on a timeout at least?

>> * how do we deal with outliers like a dynamic 100000 element list?

SM> The widget probably shouldn't try to do anything special for that.
SM> The same problem already exists with `choice` after all.


>> * how are errors handled? do we empty the list or go back to the last
>> good version?

SM> I wouldn't try to be clever here either.  Just let the signal percolate.

So presumably a novice user will get a strange error that they don't
know how to handle or report? It's a practical solution but maybe a bit

>> * should this just be a way to provide 'choice and 'radio, or do we want
>> a more generic facility that can handle the other composite types?

SM> I think we should start with a dynamic version of `choice` and see from
SM> there if it can be easily generalized or not.

OK, so this is the simple way:

(defcustom myvar nil "Whatever" :type '(dynamic-choice 

Simple and easy to understand, but not extensible.

Could we leave room for future extension? The following will be a bit
friendlier if other types are supported.

(defcustom myvar nil "Whatever" :type '(choice :dynamic 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]