Split buffers in groups
It is possible with tabbar. You can add rules to group buffers in groups. Here's a basic snippet:
(defun tabbar-buffer-groups ()
"Returns the list of group names the current buffer belongs to."
;; ADD RULES TO SPLIT BUFFERS IN GROUPS HERE!
;; if buffer is not grouped by the rules you would add above
ATTRIBUTE: The grouping of buffers on a per frame basis is a direct implementation of the concepts and select portions of code developed / written by Alp Aker in the library frame-bufs: https://github.com/alpaker/Frame-Bufs
The following is an example of how to use the library tabbar.el and group tabs/buffers dynamically on a per-frame basis by either ...
Consider checking out elscreen, though it doesn't actually group buffers.
What it does do is group windows and provide access to multiple layouts (tabs) that you can move between quickly. My workflow often has some Ruby code and associated tests in one screen, while my todo and Org notes are in another, and perhaps a scratch buffer for drafting SQL queries ...
Conveniently enough, sorting dired buffers alphabetically (by full
path) results in exactly the behaviour you describe. So it turns out
to be quite achievable.
Simply add the following snippet to your init file and everything should work.
(defun tabbar-add-tab (tabset object &optional append)
"Add to TABSET a tab with value OBJECT ...
How about my plugin, centaur-tabs? It has a lot of configuration options, it's really functional, it is supported by very popular themes like Kaolin Themes and overall is a really nice looking and aesthetic package (according to user's feedback). It's available in MELPA and it looks like this:
(add-hook 'help-mode-hook 'tabbar-local-mode)
Toggle local display of the tab bar.
With prefix argument ARG, turn on if positive, otherwise off.
Returns non-nil if the new state is enabled.
When turned on, if a local header line is shown, it is hidden to show
the tab bar. The tab bar is locally hidden otherwise. When turned
off, if a ...
After going around, I found that david holm (https://github.com/dholm/tabbar) version is the latest and also both el-get and Melpa are pointing to this repository.
So I suggest using that version. I just installed with el-get with out a problem. Though I seems to have different behavior than I expected (bug?).
There is display-buffer-in-new-tab. Its doc string says:
display-buffer-in-new-tab is a compiled Lisp function in ‘tab-bar.el’.
(display-buffer-in-new-tab BUFFER ALIST)
Display BUFFER in a new tab.
ALIST is an association list of action symbols and values. See
Info node ‘(elisp) Buffer Display Action Alists’ for details of
Having just read on the Emacs Stack Exchange Make display-buffer open buffer in new tab and applying it to your situation, I suggest you put in your .emacs file:
(setq display-buffer-base-action '(display-buffer-in-tab))
save it and then call from the command line without any additional flag:
$ emacs --some-flag file1.txt file2.txt file3.txt
Thanks to lawlist's enlightening suggestions, and a bit of subsequent googling, i was able to figure out the fix, defining my tabbing groups as needed by adding this into my .emacs:
(defun my-tabbar-buffer-groups (buffer)
(list (cond ((string-equal "*" (substring (buffer-name) 0 1)) "emacs")
((eq major-mode 'dired-mode) "emacs")
The tabbar disappears because the major mode of diary and Packages (and completion, and ...) buffers use the header-line. You can view the tabbar with M-x tabbar-local-mode.
A solution for putting these buffers in another group:
(defun tabbar-buffer-groups ()
((or (string-equal "diary" (buffer-name)) (string-equal "*Packages*" (buffer-...
If you like tabs, have a look at elscreen. Here is Github link. I like it better than tabbar, once upone a time when I was still using tabs.
Here is a random screenshot of Elscreen, taken from this SO question.