all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: emacs-devel@gnu.org
Subject: Re: Bad value to a defcustom makes choices unavailable
Date: Tue, 02 Aug 2005 19:26:56 +0200	[thread overview]
Message-ID: <42EFACE0.6000106@student.lu.se> (raw)
In-Reply-To: <rjr7dcgw16.fsf@sheridan.dina.kvl.dk>

Per Abrahamsen wrote:

>>Let us say that someone writes a defcustom in a package he distributes. 
>>Later she/he for some reason changes the list of choices. If a user has 
>>saved a value through custom that now no longer exists he can not 
>>correct it through custom.
>>    
>>
>
>He can, unless that functionality has been changed.  Customize will
>present the invalid value in an sexp widget.  Which seems the most
>reasonable thing to in the general case.
>
>If he don't know what to do with an sexp, he can do a "Reset to
>standard value", and then use the structured editor.
>
>  
>
>>I think it would be good then if the list of choices were available.
>>    
>>
>
>You could special case the "choice" widget (most widget can have
>"invalid value", so the problem is general).  But I don't think the
>code complexity would outweigh the minor convenience of not having to
>do a "Reset to standard" first.
>  
>
I believe "Reset to standard value" has changed name to "Erase 
Customization". Yes, you can use that, but the list of choices does not 
appear until next time you run customize. Is not that quite a bit 
confusing? Are you saying that it would be hard to redraw the widget in 
those cases?

Here is some new test code for those who want to see what is going on:

(custom-set-variables '(test-choice "Bad choice"))
(setq test-choice "A very bad choice!")
(customize-option-other-window 'test-choice)

(defcustom test-choice "AAA"
 "Testing of bad choices."
 :type '(choice (const "AAA")
                (const "BBB")))

  reply	other threads:[~2005-08-02 17:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01 15:45 Bad value to a defcustom makes choices unavailable Lennart Borgman
2005-08-01 17:41 ` Luc Teirlinck
2005-08-01 17:50   ` Lennart Borgman
2005-08-01 17:58     ` Luc Teirlinck
     [not found]       ` <42EE665A.3060208@student.lu.se>
     [not found]         ` <200508011820.j71IKNr05302@raven.dms.auburn.edu>
2005-08-01 18:29           ` Lennart Borgman
2005-08-01 20:17             ` Luc Teirlinck
2005-08-01 20:38               ` Lennart Borgman
2005-08-02 16:09             ` Per Abrahamsen
2005-08-02 17:26               ` Lennart Borgman [this message]
2005-08-03 10:24                 ` Per Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42EFACE0.6000106@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.