emacs-devel
[Top][All Lists]
Advanced

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

Customization Types: Splicing into Lists


From: Daimrod
Subject: Customization Types: Splicing into Lists
Date: Mon, 01 Sep 2014 20:36:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Hi,

When I tried to use org-feed.el (an org-mode module used to follow
RSS/Atom feeds in org files) I found (I think) a weird bug.

It looks like it's impossible to use splicing as it is shown in the
manual.

(info "(elisp) Splicing into Lists") says:
> When the element-type is a ‘choice’, you use ‘:inline’ not in the
> ‘choice’ itself, but in (some of) the alternatives of the ‘choice’.  For
> example, to match a list which must start with a file name, followed
> either by the symbol ‘t’ or two strings, use this customization type:
> 
>      (list file
>            (choice (const t)
>                    (list :inline t string string)))
> 
> If the user chooses the first alternative in the choice, then the
> overall list has two elements and the second element is ‘t’.  If the
> user chooses the second alternative, then the overall list has three
> elements and the second and third must be strings.

To reproduce this "bug" I did:

1. evaluate
   (defcustom foo '("" t)
     "bar"
     :type '(list string (choice (const t)
                                 (list :inline t string string))))
2. M-x customize-variable RET foo RET
3. Change the "Choice" field by the "list" type.
4. Apply the change
5. M-x customize-variable RET foo RET -> error (mismatch)
   It looks like the structure isn't recognized by the Customize interface.

I encountered this "bug" on master, emacs24 and emacs23.


Am I crazy? Did I miss something?

Best,
-- 
Daimrod/Greg



reply via email to

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