bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57848: 29.0.50; Problems with private tab-line-tab-name-function


From: Michael Heerdegen
Subject: bug#57848: 29.0.50; Problems with private tab-line-tab-name-function
Date: Fri, 18 Nov 2022 12:49:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:

> We need more opinions, so that based on popular demand we could add
> more available functions to choose from in the customizable option
> `tab-line-tabs-function'.

I'm currently trying this setting in `Info-mode-hook':

#+begin_src emacs-lisp
(setq-local
 tab-line-tabs-function
 (let ((buf-create-times (make-hash-table :weakness t)))
   (lambda ()
     (seq-sort-by
      (lambda (b)
        (or (gethash b buf-create-times)
            (setf (gethash b buf-create-times)
                  (time-to-seconds (current-time)))))
      #'<
      (seq-filter (lambda (b) (with-current-buffer b
                                (derived-mode-p 'Info-mode)))
                  (funcall tab-line-tabs-buffer-list-function))))))
#+end_src

This works as intended most of the time, but sometimes, rarely, tabs
just "jump around".  I don't yet understand why this happens.

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]