Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!apple!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: looking for feature Message-ID: <37704@bbn.COM> Date: 24 Mar 89 04:31:39 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 27 In-reply-to: wsd@cs.brown.edu (Wm. Scott `Spot' Draves) In article , wsd@cs (Wm. Scott `Spot' Draves) writes: >I like using M-p and M-n to skim through gnuemacs' command history. >What I'm looking for is some way to do the same thing in the >switch-to-buffer command. Specifically, the user types C-x b, and is >presented with > >Switch to Buffer: (default *scratch*) > >Then the user can either type the name of the buffer, or type return >as usual. Or the user can use M-p and M-n to change the default to >the next/previous buffer in the buffer list. > >Is there elisp code or a patch out there that does this? Is there >something like this slated for a future version? I know of no such package, but it is a nice idea. The minibuffer completing reader is handed a list of alternatives when it is invoked, which is the buffer list in the case of ^X b. The completing reader has its own keymap, and M-p and M-n could be bound to fns which move around through the provided list. This approach would make it pretty general for any function using the completing reader. The mechanism in simple.el that supports the command-history recall might be a model for how to do this. Anyone got the time for this? -- /jr jr@bbn.com or bbn!jr C'mon big money!