[Top][All Lists]

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

[BUG] Tab commands selecting by name

From: Ingo Lohmar
Subject: [BUG] Tab commands selecting by name
Date: Thu, 10 Oct 2019 20:25:01 +0200

I like the tab feature, it will make my separate `wconf' package
superfluous. :)

Currently, some interactive functions offer tabs by name
(tab-bar-switch-to-tab and tab-bar-close-tab-by-name, at least): They
directly use `(tab-bar-tabs)' to get the names to choose from.  However,
the current tab's name in the return value is *not* up-to-date if it has
changed since the last time the tab has been visited (eg, showing a
different buffer in one window when using the -all-windows name

I use this replacement for `tab-bar-tabs' instead:

(defun my/tab-bar-updated ()
  (let ((tabs (tab-bar-tabs)))
     (lambda (tab)
       (if (eq (car tab) 'current-tab)
           (tab-bar--current-tab)       ;or (tab-bar--tab) for full info

Obviously, this could be merged with other functions to a more elegant
form, maybe even into tab-tar-tabs itself.

reply via email to

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