emacs-devel
[Top][All Lists]
Advanced

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

Re: multiple queries to delete excess backup version w/ custom


From: Per Abrahamsen
Subject: Re: multiple queries to delete excess backup version w/ custom
Date: Sun, 6 Jan 2008 14:26:45 +0100

On Jan 6, 2008 11:09 AM, martin rudalics <address@hidden> wrote:
> Thank you for responding.  The doc-string of `Custom-save' says
>
>    "Set all edited settings, then save all settings that have been set."
>
> which inherently reduces to
>
>    (widget-apply child :custom-set)
>
> followed by
>
>    (custom-save-all)
>
> Can you recall why you needed
>
>    (widget-apply child :custom-save)
>
> here, that is, something like:
>
>    "Save all edited settings, then save all settings that have been set."

custom-save-all will only save options that are explicitly marked for saving.

:custom-set will set the option and mark it as set (customized), but
will not mark it for saving.

:custom-save  should mark the option for saving, without actually saving.

The bug is that :custom-save actually saves the option (and perhaps
that it is poorly named, should be :custom-mark-for-saving).

The problem is that the functions used for implementing the
:custom-save method, such as custom-variable-save, are also sometimes
used in contexts where you want to save the option immediately.  These
places the function should be split into one that marks only (and is
used as the :custom-save (or :custom-mark-for--saving) method), and
one that additionally calls custom-save-all.

PS: describe-text-properties (or Edit -> Text Properties -> Describe
Properties) is a great help when debugging various kind of forms, it
knows about both the button and widget abstractions on top of text
properties and overlays.




reply via email to

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