Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A function to cycle through opened directories only

Tags:

emacs

elisp

I would like to implement a function that would let me cycle only through directory buffers that are open, and skip files or scratch buffers. How would I go about that?

like image 280
SFbay007 Avatar asked May 28 '26 16:05

SFbay007


1 Answers

Take a look at tabbar mode -- you can define the groups to anything you want (e.g., dired), and cycle between groups with tabbar-backward-group and tabbar-forward-group:

http://www.emacswiki.org/emacs/TabBarMode

tabbar-buffer-list-function can be used to further define whether certain files are displayed (or hidden).

tabbar-buffer-groups is the default group which can be modified with setq to whatever you want. If you want to create alternative methods of grouping, you can use tabbar-buffer-groups-function.

If dired is a group, then you can switch between those buffers by using (setq tabbar-cycle-scope 'tabs) with tabbar-backward and tabbar-forward.

like image 165
lawlist Avatar answered May 31 '26 06:05

lawlist