Didier Verna <verna(a)inf.enst.fr> writes:
3/ After this, several problems arise:
- some variables can't be set with a just a toggle button in a menu.
- what do we consider part of the "xemacs environment" ? we can't
possibly
add an options menu item each time Joe Hacker writes an interesting
package and wish to give the user an easy way to set some variable.
And Custom was born. What's incredibly nice with custom (and the underlying
widget lib) is that you have information on the /type/ of the variable you
set, which means that you could potentially set *any* variable only with the
mouse and leave with a (sort of) empty .emacs. At least, this is the ultimate
situation you could reach. But .... Custom comes with its own and hermetic way
of _saving_ the variables too. :-(
That is a rather revisionist history.
Sometimes I'll find quicker to `set-variable' the option, or
`eval-region' a piece of code or whatever.
I always use set-variable or eval to set options temporary.
Going through customize buffers is only worth the bother when I want
to save the option as well.
* What can/should be something `savable' in XEmacs and the
packages. This is
already pretty well figured out.
Yes, using `defcustom' is the way to specify that something is
setable. Averything that is setable should also be savable, and we do
not need types for options that it makes no sense for the user to set.
* How can we specify that such or such variable is `savable'.
Currently,
regardless of any redundancy like the one introduced by defcustom and
friends, the star at the beginning of the doc strings does it more or less.
Wrong, the `*' is meant to specify that an option is something it is
likely that the the user will want set interactively during a normal
Emacs session. Complex or rarely set options should not have the `*',
neither should options that are only user for initialization or set
once.
The rule of thumb is: Would the user be likely to set this with
`set-variable'? If yes, add the star. If not, leave it out.
* How can we figure out when and how a variable has been modified
(different from the default value in its declaration). Maybe properties
saying "value from an init file", "value from X resources",
"value from user
input during an xemacs session" etc.
These properties (except X resources) are already maintained by
custom.
* Provide a SINGLE XEmacs generic way of saving stuff if modified.
Custom
or any other setting method shouldn't have anything to do with this.
XEmacs has basically switched to custom as the SINGLE generic way to
save stuff.
* If we have a powerfull setting method like Custom which needs type
information, very well. But this information shouldn't be regarded as a
'custom-type. It's really the 'type of the variable. We can imagine that
`set-variable' could also use this information for completion purpose or
whatever. I repeat, _it has nothing to do with the method for
setting_. It's a global information, potentially usefull for
different things.
It is already implemented. `customize-set-variable' is a replacement
for `set-variable' that use the customize type to add nifty things,
such as completion. It doesn't used the buffer based input.
I hope I'm not so far in the blue sky there, and I'd like
very much
to see the discussion oriented this way.
Basically everything you discuss is already implemented, and all the
proper distinctions are already in place.