* bug#9660: 24.0.90; completion-category-overrides defcustom
@ 2011-10-03 11:22 Stephen Berman
2011-10-03 14:50 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2011-10-03 11:22 UTC (permalink / raw)
To: 9660
In GNU Emacs 24.0.90.2 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of
2011-10-03 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure '--without-toolkit-scroll-bars' 'CFLAGS=-g''
1. emacs -Q
2. M-x customize-option RET completion-category-overrides RET
=> The state says: "STANDARD. (mismatch)". In addition, the only widget
is an editable field, containing the default value as a Lisp sexp; but
according to the defcustom code there should be an alist widget
containing various other widgets to support customization.
These problems are due to a typo and an oversight, corrected in the
patches below.
Aside from the bugs, I think the Customize interface here can be
improved from the point of view of a user ignorant of Lisp by using
helpful tags instead of the default widget labels "Set", "Cons-cell" and
so on. The second patch below is an attempt to do this. (This patch
also incorporates the fixes of the first patch, so if you like the tags,
only this patch should be applied, and if you don't, only the first
patch.)
Here's the straight bugfix:
*** /data/steve/bzr/emacs/trunk/lisp/minibuffer.el 2011-09-30 20:41:50.000000000 +0200
--- /data/steve/bzr/emacs/quickfixes/lisp/minibuffer.el 2011-10-03 12:38:27.000000000 +0200
***************
*** 503,511 ****
symbol)
:value-type
(set
! (cons (const style)
! (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
! completion-styles-alist)))
(cons (const cycle)
(choice (const :tag "No cycling" nil)
(const :tag "Always cycle" t)
--- 503,511 ----
symbol)
:value-type
(set
! (cons (const styles)
! (repeat (choice ,@(mapcar (lambda (x) (list 'const (car x)))
! completion-styles-alist))))
(cons (const cycle)
(choice (const :tag "No cycling" nil)
(const :tag "Always cycle" t)
And here's the alternative patch with bugfixes + tags:
*** /data/steve/bzr/emacs/trunk/lisp/minibuffer.el 2011-09-30 20:41:50.000000000 +0200
--- /data/steve/bzr/emacs/quickfixes/lisp/minibuffer.el 2011-10-03 12:46:59.000000000 +0200
***************
*** 498,512 ****
an association list that can specify properties such as:
- `styles': the list of `completion-styles' to use for that category.
- `cycle': the `completion-cycle-threshold' to use for that category."
! :type `(alist :key-type (choice (const buffer)
(const file)
symbol)
:value-type
! (set
! (cons (const style)
! (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
! completion-styles-alist)))
! (cons (const cycle)
(choice (const :tag "No cycling" nil)
(const :tag "Always cycle" t)
(integer :tag "Threshold"))))))
--- 498,516 ----
an association list that can specify properties such as:
- `styles': the list of `completion-styles' to use for that category.
- `cycle': the `completion-cycle-threshold' to use for that category."
! :type `(alist :key-type (choice :tag "Category"
! (const buffer)
(const file)
symbol)
:value-type
! (set :tag "Properties to override"
! (cons :tag "Completion Styles"
! (const :tag "Select a style from the menu;" styles)
! (repeat :tag "insert a new menu to add more styles"
! (choice ,@(mapcar (lambda (x) (list 'const (car x)))
! completion-styles-alist))))
! (cons :tag "Completion Cycling"
! (const :tag "Select one value from the menu." cycle)
(choice (const :tag "No cycling" nil)
(const :tag "Always cycle" t)
(integer :tag "Threshold"))))))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#9660: 24.0.90; completion-category-overrides defcustom
2011-10-03 11:22 bug#9660: 24.0.90; completion-category-overrides defcustom Stephen Berman
@ 2011-10-03 14:50 ` Stefan Monnier
2011-10-04 7:32 ` Stephen Berman
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2011-10-03 14:50 UTC (permalink / raw)
To: Stephen Berman; +Cc: 9660-done
> 2. M-x customize-option RET completion-category-overrides RET
> => The state says: "STANDARD. (mismatch)". In addition, the only widget
Oops, indeed, I didn't copy&paste properly :-(
> Aside from the bugs, I think the Customize interface here can be
> improved from the point of view of a user ignorant of Lisp by using
> helpful tags instead of the default widget labels "Set", "Cons-cell" and
> so on. The second patch below is an attempt to do this. (This patch
I've installed this second patch, thank you.
I don't like much the "Select a foo from the menu" thingies, but left
them there. I'll let someone more knowledgeable about Customize (and/or
with stronger UI tastes) figure out whether they need to be changed
and how.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#9660: 24.0.90; completion-category-overrides defcustom
2011-10-03 14:50 ` Stefan Monnier
@ 2011-10-04 7:32 ` Stephen Berman
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2011-10-04 7:32 UTC (permalink / raw)
To: 9660
On Mon, 03 Oct 2011 10:50:41 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I've installed this second patch, thank you.
Thanks.
> I don't like much the "Select a foo from the menu" thingies, but left
> them there. I'll let someone more knowledgeable about Customize (and/or
> with stronger UI tastes) figure out whether they need to be changed
> and how.
I agree there's plenty of room for improvement.
Steve Berman
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-04 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 11:22 bug#9660: 24.0.90; completion-category-overrides defcustom Stephen Berman
2011-10-03 14:50 ` Stefan Monnier
2011-10-04 7:32 ` Stephen Berman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).