From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Assignment of misc packages for emacs Date: 20 May 2002 15:38:01 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200205050534.g455YfF01634@aztec.santafe.edu> <5xbsbumexh.fsf@kfs2.cua.dk> <200205141941.g4EJfud15293@aztec.santafe.edu> <5xvg9qmgzt.fsf@kfs2.cua.dk> <200205151927.g4FJRRW26103@rum.cs.yale.edu> <5x3cwr4q7m.fsf@kfs2.cua.dk> <87g00rd74y.fsf@tc-1-100.kawasaki.gol.ne.jp> <87sn4otknt.fsf@tc-1-100.kawasaki.gol.ne.jp> <200205191441.g4JEfMg23080@rum.cs.yale.edu> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021876749 4074 127.0.0.1 (20 May 2002 06:39:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 06:39:09 +0000 (UTC) Cc: storm@cua.dk (Kim F. Storm), "Stefan Monnier" , rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179gp3-00013b-00 for ; Mon, 20 May 2002 08:39:09 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179h2s-0006WJ-00 for ; Mon, 20 May 2002 08:53:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179gp9-0003kQ-00; Mon, 20 May 2002 02:39:16 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.214]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 179gof-0003js-00; Mon, 20 May 2002 02:38:45 -0400 Original-Received: from mailgate4.nec.co.jp ([10.7.69.195]) by TYO201.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id g4K6cBV06706; Mon, 20 May 2002 15:38:11 +0900 (JST) Original-Received: from mailsv4.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id g4K6cAL14541; Mon, 20 May 2002 15:38:10 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv4.nec.co.jp (8.11.6/3.7W-MAILSV4-NEC) with ESMTP id g4K6c9808989; Mon, 20 May 2002 15:38:10 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.10.2+Sun/3.7Wlsi_mx_6.0) with ESMTP id g4K6c5K01452; Mon, 20 May 2002 15:38:05 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 4D7173752; Mon, 20 May 2002 15:38:01 +0900 (JST) Original-To: "Stefan Monnier" System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <200205191441.g4JEfMg23080@rum.cs.yale.edu> Original-Lines: 84 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4158 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4158 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'