emacs-devel
[Top][All Lists]
Advanced

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

Re: Assignment of misc packages for emacs


From: Miles Bader
Subject: Re: Assignment of misc packages for emacs
Date: 20 May 2002 15:38:01 +0900

Ok, now that I've updated from CVS, I tried out hierarkey menus.  While
idea seems cool, the visual presentation is currently quite confusing.

Part of this is the one-line-at-a-time thing, which I guess is a
historical misfeature, and can just be fixed.

Part of it is that the way the menus are presented is just wierd,
e.g. using my previous example:

  (progn
    (defvar menu-map)
    (setq menu-map (make-sparse-keymap "This is a prompt"))
    (local-set-key "&" menu-map)
    (define-key menu-map "1" '(menu-item "Insert 1" (lambda () (interactive) 
(insert "1"))))
    (define-key menu-map "2" '(menu-item "Insert 2" (lambda () (interactive) 
(insert "2"))))
    (define-key menu-map "f" '(menu-item "foo" (lambda () (interactive) (insert 
"foo"))))
    (define-key menu-map "b" '(menu-item "Bar" (lambda () (interactive) (insert 
"Bar"))))
    )

I get the following two lines if I type `&':

  This is a prompt: Bar  (& b), foo  (& f), 2 = Insert 2  (& 2)...
  This is a prompt: 1 = Insert 1  (& 1)

The output is really `busy,' and hard to read.

I see the following problems:

  * The main question people are probably asking when they see this
    menu displayed is `what key do I hit to get my function'.

    With the current display format, it's not at all obvious.  Not only
    is the key to hit listed _after_ the description, which makes it
    harder to find, but I think Kim was right -- including the prefix
    key (`&' in this case) is not just superfluous, but actually makes
    it harder to understand the menu.

  * For keys where the selection key isn't the first letter of the menu
    entry string, it actually lists the binding _twice_ (but for those
    where it's not, it's only listed once).  Again, this sort of
    inconsistency makes it hard to see the answer to the main
    question, `what do I hit'.

I would suggest changing the formatting to remove these problems, by

(1) listing the `key to hit' _before_ each entry, and making it
    visually noticable,
(2) Only listing it once for each entry, and
(3) Not including the menu prefix, which is both unnecessary and confusing.

So the above example menu might become [alternative 1]:

  This is a prompt: b = Bar,  f = foo,  2 = Insert 2
  This is a prompt: 1 = Insert 1

Here's an another alternative that acts a bit more clever if the menu
string begins with the same letter as the associated binding
[altnernative 2]:

  This is a prompt: (B)ar,  (f)oo,  (2) Insert 2
  This is a prompt: (1) Insert 1

I find this style even easier to understand; this is the one I prefer.

What do people think?


Here's a real world example -- the `d' (diff) menu from pcl-cvs:

Current look:
   Diff: vendor  (d v), head  (d h), backup  (d b), diff  (=)
   Diff: 2 = other  (d 2), e = idiff  (d e), E = imerge  (d E)

[alternative 1]:
   Diff: v = vendor,  h = head,  b = backup,  = = diff
   Diff: 2 = other,  e = idiff,  E = imerge

[alternative 2]:
   Diff: (v)endor,  (h)ead,  (b)ackup,  (=) diff
   Diff: (2) other,  (e) idiff,  (E) imerge

-Miles
-- 
`Life is a boundless sea of bitterness'



reply via email to

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