Tellumar Kampiva RC Impressum

mtorus

Introduction

This elisp-file lets you navigate buffers and buffer positions which may be grouped according to your needs. Please refer to the comments at the beginning of the file for details.

Motivation

A good while back I came across a piece of lisp code which I could use to cycle through the buffer list. I preferred this over using M-x list-buffers and I still do even since I also know M-x ibuffer. After a while we (business as usual: I worked together with Claus Brunzema on this) improved it a little and still it wasn't enough for my needs.

Lengthy Documentation

Describing what MTorus does is a bit complicated and I have written a long explanation in the elisp file. Please have a look there. Thanks.

Download and Installation

Download mtorus.el, save it somewhere in your load-path (e.g. ~/.xemacs/my/lisp) and put into your init file (e.g. ~/.emacs, ~/.xemacs/init.el):

     (require 'mtorus)
     (mtorus-init)
     (mtorus-install-suggested-bindings)
             

This initialises the default ring which is the list of all buffers (except those matching a customizable regexp). Actually this is the code for the buffer cycling I've been using all those years.

You can just use those old bindings if you don't like the full blown torus:

     (require 'mtorus)
     (global-set-key '[(shift right)] 'mtorus-cycle-blist-next)
     (global-set-key '[(shift left)]  'mtorus-cycle-blist-prev)
             

There is an alpha version of saving and restoring buffers which is described in the comments of the source file. Please read that if you want to use this.

Default Keybindings

The suggested keybindings are:

Shift left/rightCycle positions within current group
Shift up/down Cycle groups
F11Groups: new group
Shift F11Groups: delete current group
Control F11Groups: describe current group in minibuffer
F12Entry: new entry
Shift F12Entry: delete current entry
Control F12Entry update current entry to current cursor position

Emacs Version

This works in GNU Emacs and XEmacs.

I've developed it in XEmacs and used it for years there. Since 2007 I'm using it in GNU Emacs 22.x (although not all the features).

Intuitive?

MTorus tries to be a fast and intuitive mechanism for switching buffers and maintaining a list of positions. There are several intuition switches that hopefully enable everyone to fine-tune the behaviours. The default is the settings that I chose. Please see:

M-x customize-group mtorus

History And Ongoing

There are three totally different versions of mtorus: