Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!bloom-beacon!acevedo From: acevedo@navigator.bloom-beacon (Gabriel) Newsgroups: comp.emacs Subject: Re: Editing multiple buffers and rotating between them Message-ID: <1990Aug8.000839.15119@athena.mit.edu> Date: 8 Aug 90 03:07:54 GMT References: <236@jabberwock.shs.ohio-state.edu> Sender: daemon@athena.mit.edu (Mr Background) Distribution: usa Organization: /mit/acevedo/.organization Lines: 32 In-Reply-To: reiner@slithy-tove.shs.ohio-state.edu's message of 7 Aug 90 22:15:58 GMT >Rather, I'd like it to switch circularly through the whole list: >f5->f4->f3->f2->f1->f5->... >I wonder if this feature is not built in. >Does someone know how to program it as key binding, e.g. >via key board macro definition? The function `bury-buffer' makes the current buffer the last buffer in the buffer list. So if you bind a key to `bury-buffer' this will have the effect you want. If you also want to visit buffers in the reverse direction from `bury-buffer', this little function may be of use: (defun raise-buffer () (interactive) (let ((buffer-list (nreverse (buffer-list))) buffer) (while (string-match "\\` " (buffer-name (prog1 (setq buffer (car buffer-list)) (setq buffer-list (cdr buffer-list)))))) (switch-to-buffer buffer))) It takes the last buffer in the buffer list, and makes it the current buffer. (The little while loop is so that you don't select a buffer whose name starts with a space; those buffers are not meant to be selected. E.g., the name of the minibuffer is " *Minibuf-0*".) Raul -- Raul