From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Assignment of misc packages for emacs Date: 15 May 2002 23:37:28 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5x1ycdqehz.fsf@kfs2.cua.dk> References: <200205050534.g455YfF01634@aztec.santafe.edu> <5xbsbumexh.fsf@kfs2.cua.dk> <200205141941.g4EJfud15293@aztec.santafe.edu> <5xvg9qmgzt.fsf@kfs2.cua.dk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021495174 32196 127.0.0.1 (15 May 2002 20:39:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 May 2002 20:39:34 +0000 (UTC) Cc: rms@gnu.org, assign@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 1785Yb-0008NB-00 for ; Wed, 15 May 2002 22:39:33 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1785kH-00062q-00 for ; Wed, 15 May 2002 22:51:38 +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 1785YI-0000lL-00; Wed, 15 May 2002 16:39:14 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 1785Vs-0000UK-00; Wed, 15 May 2002 16:36:44 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 8589C7C016; Wed, 15 May 2002 20:36:42 +0000 (GMT) Original-To: Miles Bader In-Reply-To: Original-Lines: 35 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 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:3977 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3977 Miles Bader writes: > no-spam@cua.dk (Kim F. Storm) writes: > > E.g. I have the following mini-menu bound to F8: > > > > QUERY: r)egexp s)tring t)ags ALL: R)egexp S)tring > > > > (defvar replace-mini-menu '(...)) > > So it's basically equivalent to > > (defun mini-menu (menu) > (message (mapconcat #'cadr menu " ")) > (call-interactively (or (nth 2 (assoc (read-char) menu)) > (error "Unknown key")))) Essentially, yes. There are a few more twists to it, but you got the essentials right! However, I was advocating for adding a very simple way for packages to query the user for "trivial" selections as an alternative to using keymaps and adding prompting at the same time... > I'm not sure this warrants a whole separate package... [does it do more?] No, it could be added to simple.el if people agree. However, there are a couple of functions using the mini-menu, two of which have already been mentioned here: F8 -> QUERY: r)egexp s)tring t)ags ALL: R)egexp S)tring C-x C-g -> EMACS file: .)emacs c)ustom l)isp s(i)te-lisp e(x)ec s)rc -- Kim F. Storm http://www.cua.dk