0

I use, and love, tabs, using the following in my .emacs:

(require 'tabbar) (tabbar-mode 1) (global-set-key [(control shift iso-lefttab)] 'tabbar-backward-tab) (global-set-key [(control tab)] 'tabbar-forward-tab)

Since upgrading my distro a few months back (i'm sure it wasn't true before that), i've found that if i load several files with different extensions, then the tabs appear in different groups; e.g.,

emacs junk1.txt junk4.txx junk2.txt junk3.ttx junk9.txt

gives me one "screen" (if you see what i mean) that has tabs for junk1.txt, junk2.txt, and junk9.txt; and another with tabs for both junk4.txx and junk3.ttx (and yes, those two do have different extensions).

I can, of course, switch buffers to move between "screens" (and, err, between buffers); but what i want is to have tabs for ALL my files visible in a single "screen", so i can tab through all of them. Any ideas how to achieve that (or for that matter, why i don't currently get that behaviour)?

Fwiw:
GNU Emacs 26.2 (build 1, x86_64-mageia-linux-gnu, GTK+ Version 3.24.7) of 2019-04-12

Thanks, ian

ionh
  • 13
  • 4
  • How about trying out `(setq tabbar-buffer-groups-function (lambda () (list "All")))` from the Emacs tabbar wiki page? https://www.emacswiki.org/emacs/TabBarMode To try it out, just type: `M-x eval-expression RET` ... copy and then paste the code into the minibuffer and then press the `RET` key. If it works for you, then you can add that to your `.emacs` file underneath the `(require 'tabbar)` statement. The following link contains some additional tabbar configuration ideas you may want to check out: https://emacs.stackexchange.com/questions/10081/browser-style-tabs-for-emacs – lawlist May 01 '20 at 21:31
  • Oo, yes, that's pointed me in the right direction -- in my ignorance, i hadn't known of the "groups" function, which is clearly at the root of this issue. Thanks! – ionh May 01 '20 at 21:41
  • Umm, so how do i mark this is "solved"? – ionh May 01 '20 at 21:42
  • Inasmuch as my comment "pointed [you] in the right direction ...", it would appear that you had something slightly different in mind as the ultimate solution to your issue. Therefore, it may behoove you to write-up your own answer; and, if needed, revise the question to make your issue more clear for future people who visit this thread. I believe there is a 24 or 36 hour waiting period (or something like that) to accept your own answer, so check back when the waiting period has lapsed and then you can place a checkmark next to your answer to mark the issue as being solved. – lawlist May 01 '20 at 21:56
  • It was a pretty strong pointer! And thanks for the additional suggestions.... – ionh May 01 '20 at 22:20

1 Answers1

1

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 ()
  (list (cond ((string-equal "*" (substring (buffer-name) 0 1)) "emacs")
              ((eq major-mode 'dired-mode) "emacs")
              (t "user"))))
(setq tabbar-buffer-groups-function 'my-tabbar-buffer-groups)
ionh
  • 13
  • 4