GNU bug report logs -
#74409
30.0.92; customize buffer for bibtex-biblatex-entry-alist also shows unformatted variable value
Previous Next
Reported by: Roland Winkler <winkler <at> gnu.org>
Date: Sun, 17 Nov 2024 22:45:02 UTC
Severity: normal
Found in version 30.0.92
Done: Roland Winkler <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 74409 <at> debbugs.gnu.org (full text, mbox):
Roland Winkler <winkler <at> gnu.org> writes:
> On Fri, Jan 10 2025, Mauro Aranda wrote:
>> I tend to think that we should fix these problems by giving appropriate
>> tags to the widgets used for user options, and leaving the cus-edit.el
>> code as it is.
>
> I never understood in full glory how these widgets work with defcustom.
> What would be a minimal example what the missing tag could look like for
> bibtex-biblatex-entry-alist? (Is this documented in the elisp manual?)
>
> Thanks.
Since the variable says it's an alist, I'd say:
(define-widget 'bibtex-entry-alist 'lazy
"Format of `bibtex-BibTeX-entry-alist' and friends."
:tag "Alist"
:type '(repeat
(choice (group :tag "Alias"
(string :tag "Entry type")
(string :tag "Documentation")
(string :tag "Alias"))
(group :tag "Entry"
(string :tag "Entry type")
(string :tag "Documentation")
(repeat :tag "Required fields" bibtex-field-list)
(repeat :tag "Crossref fields" bibtex-field-list)
(repeat :tag "Optional fields"
bibtex-field-list)))))
And maybe it looks better if you do:
(define-widget 'bibtex-entry-alist 'lazy
"Format of `bibtex-BibTeX-entry-alist' and friends."
:tag "Alist"
:type '(repeat
:format "\n%v" ;; I think this looks better.
(choice (group :tag "Alias"
(string :tag "Entry type")
(string :tag "Documentation")
(string :tag "Alias"))
(group :tag "Entry"
(string :tag "Entry type")
(string :tag "Documentation")
(repeat :tag "Required fields" bibtex-field-list)
(repeat :tag "Crossref fields" bibtex-field-list)
(repeat :tag "Optional fields"
bibtex-field-list)))))
Both :format and :tag keywords are documented under:
15.4.4 Type Keywords
This bug report was last modified 128 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.