emacs-pretest-bug
[Top][All Lists]
Advanced

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

RE: customize options and faces are not in alphabetical order


From: Drew Adams
Subject: RE: customize options and faces are not in alphabetical order
Date: Fri, 22 Dec 2006 15:11:35 -0800

> From: martin rudalics
>  > emacs -Q
>  > M-x customize <some-group>
>  >
>  > The options and faces should be in alphabetical order. The actual
>  > order seems random.
>
> Should be possible:
>
> (defcustom custom-browse-sort-alphabetically nil
>    "If non-nil, sort members of each customization group alphabetically."
>    :type 'boolean
>    :group 'custom-browse)
>
> (defcustom custom-buffer-sort-alphabetically nil
>    "If non-nil, sort members of each customization group alphabetically."
>    :type 'boolean
>    :group 'custom-buffer)
>
> (defcustom custom-menu-sort-alphabetically nil
>    "If non-nil, sort members of each customization group alphabetically."
>    :type 'boolean
>    :group 'custom-menu)

Thx - I wasn't aware of those.

However:

- They are apparently not autoloaded, so `C-h v' doesn't recognize them
until customize has been loaded.

- None are mentioned in the Emacs manual (or the Elisp manual, for that
matter), so a user is unlikely to know about them.

- What is the difference between them, besides the fact that they are in
different subgroups of the Customize group? They have identical doc
strings - how is a user to understand their difference? What is the scope of
the sorting (where are the members sorted)? Why are there 3 separate options
for this, if they all do the same thing (same doc string)?

- Why would the default value of any of these be nil (off)? If the nil order
is (apparently) random, how does that benefit anyone as the default value?

I don't understand why we would even have such options - who would ever want
a random order?

A better idea, if really we want to allow users flexibility in the order, is
to use a sort function as the customizable value, and have `string-lessp' be
the default value. If you want to allow unsorted (random), then use this:

(defcustom custom-sort-alphabetically 'string-lessp
  "Sort function for Customize buffers.
Do not sort if the value is nil.
  :type '(choice (const :tag "None" nil) function))

I personally don't see why anyone would want an order other than alphabetic,
but at least that would be a reasonable way to give people a choice. The
current approach does not seem useful.





reply via email to

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