![[Home]](https://www.emacswiki.org/images/logo218x38.png)
MTorus provides functionality for switching buffers quickly and general navigation issues within emacs.
MTorus is not working with recent versions of GNU Emacs. Help in getting it working again would be most welcome!
Let me express this as a mathematician ;)
So, now you know it, ‘ight? ;)
‘kay for those who do not:
Q: Is this nearly a depiction of your model? http://www.satriani.com/2004/discography/Time_Machine/
Thus now you have 2 dimensional navigation:
The project page is at SourceForge now.
All text hereafter only refers to the current, advanced version.
MTorus is available via sourceforge.net.
Note that repository contains a very alpha version of mtorus. Both StefanKamphausen and me (SebastianFreundt) have very little spare time to fiddle around with it.
'load-path and put(require 'mtorus)
in your .emacs Now you have a useless element on your torus called mtorus-universe.
M-x mtorus-create-ring RET
Enter some appropriate name for that ring. Go to a buffer which should be part of the ring created and enter
M-x mtorus-create-element RET
When asked for a type just enter buffer or marker. These are the only types predefined by default.
mtorus-next-element
mtorus-prev-element
mtorus-parent-element
mtorus-child-elementTo treat your command history with care, bind these commands to some keys.
mtorus-uncle-element
mtorus-aunt-element
mtorus-nephew-element
mtorus-niece-elementSuggested Keybindings:
H-kp-6, H-kp-4, H-kp-8 and H-kp-2 keys bound to mtorus-next-element, mtorus-prev-element, mtorus-parent-element and mtorus-child-element respectively – hroptatyrshift -left/right/up/down – StefanKamphausenMTorus does look like another useful library/Thanks. So. What version of Emacs and OS are you using? On Emacs-21.3, Win98 I get errors/fixes like this after adding mtorus to load-path and requiring ‘mtorus.
Fixed now, I hope. 😊 – SebastianFreundt
When I dump a torus to disk, it is dumped with the names of the buffers in the torus, not the names of the files that the buffers are linked to, or whatnot. What I’m wondering is, has anyone written any modifications to MTorus to support a “file” type? As it is, MTorus only references buffers/marks/rings and I have to load all the files before I can reference them in MTorus, which kind of defeats the purpose of saving a torus to disk… anyone have any suggestions?
Currently I (SebastianFreundt) use following snippet to read in a bunch of files from a directory:
(defun mtorus-elcoll-create-directory-ring (directory file-name-regexp) "" (interactive "DDirectory: \nsMatch files: ") (let ((dir-elem (define-mtorus-element (make-mtorus-element :type 'ring :name (mtorus-utils-replace-regexp-in-string ".+/\\(.+?\\)/?" "\\1" directory) :value directory :description "Directory ring")))) (setq mtorus-current-ring dir-elem) (mapc #'(lambda (file) (let* ((buf (or (get-file-buffer file) (find-file file)))) (define-mtorus-element (make-mtorus-element :type 'buffer :name (file-name-nondirectory file) :value buf :description "Directory file buffer.")))) (directory-files directory t file-name-regexp nil t))))
This will soon show up in CVS HEAD as mtorus-element-collection.el (or something similar). On the other I have to notice that this is not yet GNUmacs compatible since it uses ‘directory-files’ so adapt it to your needs.
Actually this snippet should demonstrate how to create rings and ring elements non-interactively. – SebastianFreundt
‘directory-files’ by default. That is all I know. Thanks for the snippet; I’ll have to look it over later. -Patrick