[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Community improvements to the Emacs Widget Library manual?
From: |
Michael Heerdegen |
Subject: |
Re: Community improvements to the Emacs Widget Library manual? |
Date: |
Wed, 12 Jul 2023 07:18:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Bryce <bovine@cyberscientist.ca> writes:
> > What keyword handling do you mean, exactly (example)? I ask because
> > AFAIR, `widget-create' works fine for user-defined widget types.
>
> Writing :widget-create functions works, but there are no examples in the
> manual.
I meant `widget-create', not :widget-create.
> Perhaps a new macro should be introduced into the library which
> facilitates accessing the nth argument _past the keyword-argument value
> pairs_ in a reproducible way. The function widget-convert loops over the
> arguments, assessing if they are keywords and makes them part of the
> value of the :args property of the widget being created (if it is using
> the default widget-convert functionality).
But normally it should also set all of the given keywords - in this
part:
;; Finally set the keyword args.
(while keys
(let ((next (nth 0 keys)))
(if (keywordp next)
(progn
(widget-put widget next (nth 1 keys))
(setq keys (nthcdr 2 keys)))
(setq keys nil))))
Maybe you just have found a case where this doesn't work correctly
(Bug)? After creating a widget with `widget-create' I expect that all
keywords are set and can be referred to using `widget-get'. The code
above seems to fail when the arguments don't start with a keyword.
Maybe this is not appropriate.
AFAIR there are some bugs hiding in the code. We must be careful not to
document bugs and unintended behavior. Not sure in this case (it's late
here), but what I understand from what you are describing doesn't
sound like desirable behavior.
Michael.
- Re: Community improvements to the Emacs Widget Library manual?, (continued)
- Re: Community improvements to the Emacs Widget Library manual?, Mauro Aranda, 2023/07/09
- Re: Community improvements to the Emacs Widget Library manual?, Bryce, 2023/07/12
- Re: Community improvements to the Emacs Widget Library manual?, Eli Zaretskii, 2023/07/12
- Re: Community improvements to the Emacs Widget Library manual?, Corwin Brust, 2023/07/12
- Re: Community improvements to the Emacs Widget Library manual?, Bryce Carson, 2023/07/13
- RE: [External] : Re: Community improvements to the Emacs Widget Library manual?, Drew Adams, 2023/07/13
- Re: [External] : Re: Community improvements to the Emacs Widget Library manual?, Bryce Carson, 2023/07/13
Re: Community improvements to the Emacs Widget Library manual?, Michael Heerdegen, 2023/07/09
Re: Community improvements to the Emacs Widget Library manual?, Kjartan Oli Agustsson, 2023/07/11
Re: Community improvements to the Emacs Widget Library manual?, Mauro Aranda, 2023/07/09