From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Display info nodes names in tabs.
Date: Thu, 15 Sep 2022 15:20:58 +0200 [thread overview]
Message-ID: <87k0646af9.fsf@web.de> (raw)
In-Reply-To: 87k064kdnf.fsf@gmail.com
Robert Pluim <rpluim@gmail.com> writes:
> Michael> Would be nice, yes. Do you use the tab-bar or the tab-line?
>
> See `tab-bar-tab-name-function' and `tab-line-tab-name-function', both
> of which allow you to write custom functions.
The problem with `tab-line-tab-name-function' (I guess with
`tab-bar-tab-name-function' too, but I didn't check) is that it is not
called often enough - because of the tab-line cache. The tab-line-cache
key never changes/ gets invalid for Info buffers (no tracked parameter
ever changes while you browse), so the tab name is never refreshed. I
need to invalidate the cache explicitly to make it work, e.g. with a
very ugly hack like this:
#+begin_src emacs-lisp
(add-variable-watcher
'mode-line-buffer-identification
(defun my-Info-mode-line-buffer-identification-watcher
(_symbol _newval _operation where)
(when (and (eq where (current-buffer))
(derived-mode-p 'Info-mode))
(set-window-parameter nil 'tab-line-cache nil))))
#+end_src
Michael.
next prev parent reply other threads:[~2022-09-15 13:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 7:33 Display info nodes names in tabs Alexandros Prekates
2022-09-15 5:01 ` Michael Heerdegen
2022-09-15 12:47 ` Robert Pluim
2022-09-15 13:20 ` Michael Heerdegen [this message]
2022-09-15 14:45 ` Robert Pluim
2022-09-16 4:51 ` Michael Heerdegen
2022-09-16 18:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-17 8:13 ` Michael Heerdegen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0646af9.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.