GNU bug report logs - #52050
[PATCH] Make tab-line-switch-cycling work with buffer groups

Previous Next

Package: emacs;

Reported by: Matt Kramer <matt314159 <at> gmail.com>

Date: Tue, 23 Nov 2021 04:37:01 UTC

Severity: normal

Tags: patch

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matt Kramer <matt314159 <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 52050 <at> debbugs.gnu.org
Subject: bug#52050: [PATCH] Make tab-line-switch-cycling work with buffer groups
Date: Tue, 23 Nov 2021 01:41:59 -0800
[Message part 1 (text/plain, inline)]
>
> But it seems you also modified either tab-line-tabs-buffer-list-function,
> or tab-line-tabs-buffer-group-sort-function, or both of them.  Is this
> true?
>

Yes to tab-line-tabs-buffer-group-sort-function, no to
tab-line-tabs-buffer-list-function, yes also to
tab-line-tabs-buffer-group-function. Setup is below:

(defvar ++buffer-group-table
  (make-hash-table :test 'equal))

;; I manually populate ++buffer-group-table

(defun ++tab-line-buffer-group (buffer)
  (gethash (buffer-name buffer) ++buffer-group-table
           (with-current-buffer buffer
             (concat (symbol-name major-mode)
                     ":"
                     (and buffer-file-name
                          (file-name-directory buffer-file-name))))))

(defun ++buffer-name< (a b)
  (string< (buffer-name a) (buffer-name b)))

(setq tab-line-tabs-function #'tab-line-tabs-buffer-groups
      tab-line-tabs-buffer-group-function #'++tab-line-buffer-group
      tab-line-tabs-buffer-group-sort-function #'++buffer-name<
      tab-line-switch-cycling t)
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.