From: Juri Linkov <juri@linkov.net>
To: Ingo Lohmar <ingo.lohmar@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: [BUG] Tab commands selecting by name
Date: Sun, 13 Oct 2019 01:05:51 +0300 [thread overview]
Message-ID: <87wod962m8.fsf@mail.linkov.net> (raw)
In-Reply-To: <87zhi8sbk2.fsf@kenko.localhost.com> (Ingo Lohmar's message of "Thu, 10 Oct 2019 20:25:01 +0200")
> 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
> function).
Does this problem really exists? The current tab name get updated
in tab-bar-make-keymap-1 very often, it's called by the display engine
on every window configuration change. So when you type
M-x tab-bar-close-tab-by-name, the current tab name is already
up-to-date.
Please provide a test case that reproduces this problem.
> I use this replacement for `tab-bar-tabs' instead:
>
> (defun my/tab-bar-updated ()
> (let ((tabs (tab-bar-tabs)))
> (mapcar
> (lambda (tab)
> (if (eq (car tab) 'current-tab)
> (tab-bar--current-tab) ;or (tab-bar--tab) for full info
> tab))
> tabs)))
>
> Obviously, this could be merged with other functions to a more elegant
> form, maybe even into tab-tar-tabs itself.
I guess you're overriding it using tab-bar-tabs-function?
next prev parent reply other threads:[~2019-10-12 22:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 18:25 [BUG] Tab commands selecting by name Ingo Lohmar
2019-10-12 22:05 ` Juri Linkov [this message]
2019-10-13 5:46 ` Ingo Lohmar
2019-10-13 20:12 ` Juri Linkov
2019-10-13 20:38 ` Ingo Lohmar
2019-10-15 21:45 ` 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=87wod962m8.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--cc=ingo.lohmar@posteo.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).