From: John Paul Wallington <jpw@gnu.org>
Subject: Re: swtching between buffers?
Date: Sat, 10 May 2003 19:22:48 +0100 [thread overview]
Message-ID: <87adduy83r.fsf@indigo.shootybangbang.com> (raw)
In-Reply-To: 5v9va.3476$kH.1029551@twister.nyc.rr.com
Miguel Ulloa <migu71@yahoo.com> wrote:
> I would like to know if there is a command to circularly navigate all
> opened buffers in emacs, thanks in advance.
There are `prev-buffer' and `next-buffer', bound to C-x <left> and
C-x <right> respectively, in the development sources:
(define-key global-map [?\C-x right] 'next-buffer)
(define-key global-map [?\C-x left] 'prev-buffer)
(defun next-buffer ()
"Switch to the next buffer in cyclic order."
(interactive)
(let ((buffer (current-buffer)))
(switch-to-buffer (other-buffer buffer))
(bury-buffer buffer)))
(defun prev-buffer ()
"Switch to the previous buffer in cyclic order."
(interactive)
(let ((list (nreverse (buffer-list)))
found)
(while (and (not found) list)
(let ((buffer (car list)))
(if (and (not (get-buffer-window buffer))
(not (string-match "\\` " (buffer-name buffer))))
(setq found buffer)))
(setq list (cdr list)))
(switch-to-buffer found)))
next prev parent reply other threads:[~2003-05-10 18:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-10 16:09 swtching between buffers? Miguel Ulloa
2003-05-10 16:49 ` Marco Parrone
2003-05-10 17:08 ` Kai Großjohann
2003-05-11 0:53 ` Yan Tang
2003-05-10 18:22 ` John Paul Wallington [this message]
2003-05-10 19:52 ` Miguel Ulloa
2003-05-10 19:04 ` Jiri Pejchal
2003-05-12 8:19 ` Stefan Kamphausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87adduy83r.fsf@indigo.shootybangbang.com \
--to=jpw@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.