From: Matt Kramer <matt314159@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 52050@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 [thread overview]
Message-ID: <CANGn5a4Eh=P+v+3L3pzaWtwH0y_SwvtkpYqf165XA_mp2vkqHw@mail.gmail.com> (raw)
In-Reply-To: <86sfvnpaie.fsf@mail.linkov.net>
[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]
>
> 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)
[-- Attachment #2: Type: text/html, Size: 1510 bytes --]
next prev parent reply other threads:[~2021-11-23 9:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 4:16 bug#52050: [PATCH] Make tab-line-switch-cycling work with buffer groups Matt Kramer
2021-11-23 8:06 ` Juri Linkov
2021-11-23 9:41 ` Matt Kramer [this message]
2021-11-24 19:43 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANGn5a4Eh=P+v+3L3pzaWtwH0y_SwvtkpYqf165XA_mp2vkqHw@mail.gmail.com' \
--to=matt314159@gmail.com \
--cc=52050@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).