From: Michael Heerdegen <michael_heerdegen@web.de>
To: Juri Linkov <juri@linkov.net>
Cc: Alexandros Prekates <aprekates@posteo.net>,
Robert Pluim <rpluim@gmail.com>,
57848@debbugs.gnu.org
Subject: bug#57848: 29.0.50; Problems with private tab-line-tab-name-function
Date: Sun, 30 Oct 2022 13:02:50 +0100 [thread overview]
Message-ID: <87k04hldsl.fsf@web.de> (raw)
In-Reply-To: <868rkxretr.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 30 Oct 2022 09:24:00 +0200")
Juri Linkov <juri@linkov.net> writes:
> > #+begin_src emacs-lisp
> > (setq-local tab-line-tab-name-function
> > (lambda (_b &optional _bs) "%b"))
> > #+end_src
> All mode-line format sequences are valid, but only in the context
> of the right buffer. So you can use such tab-name function:
>
> #+begin_src emacs-lisp
> (setq tab-line-tab-name-function
> (lambda (b &optional _bs)
> (format-mode-line "%b" 'tab-line-tab nil b)))
> #+end_src
I didn't want to ask about `format-mode-line': my example (above)
returns a plain "%b" string - nonetheless a buffer name is being printed
as tab name. Mode-line format specifiers seem to be handled without
`format-mode-line'.
My question is what the semantics of the return value of
`tab-line-tab-name-function' are. Or is the above behavior a bug?
> A user-defined cache key function is a good idea.
> Please send an example of such function for Info,
> so I could test the implementation.
I guess something like
(lambda (b) (buffer-local-value 'mode-line-buffer-identification b))
should do it - a tab's name needs to be changed when the buffer local
binding of `mode-line-buffer-identification' has been modified.
Thanks so far,
Michael.
next prev parent reply other threads:[~2022-10-30 12:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 4:39 bug#57848: 29.0.50; Problems with private tab-line-tab-name-function Michael Heerdegen
2022-10-30 7:24 ` Juri Linkov
2022-10-30 12:02 ` Michael Heerdegen [this message]
2022-10-30 17:39 ` Juri Linkov
2022-10-31 8:58 ` Michael Heerdegen
2022-11-09 2:07 ` Michael Heerdegen
2022-11-09 7:41 ` Juri Linkov
2022-11-12 1:52 ` Michael Heerdegen
2022-11-12 18:19 ` Juri Linkov
2022-11-13 17:58 ` Juri Linkov
2022-11-14 3:49 ` Michael Heerdegen
2022-11-14 7:47 ` Juri Linkov
2022-11-15 3:43 ` Michael Heerdegen
2022-12-15 17:16 ` Juri Linkov
2022-12-17 7:35 ` Michael Heerdegen
2022-12-17 17:44 ` Juri Linkov
2022-12-18 1:16 ` Michael Heerdegen
2022-12-18 8:40 ` Juri Linkov
2023-01-10 14:06 ` Michael Heerdegen
2023-01-10 17:44 ` Juri Linkov
2022-11-18 11:49 ` Michael Heerdegen
2022-11-09 7:39 ` Juri Linkov
2022-11-09 23:30 ` Michael Heerdegen
2022-11-10 18:36 ` Juri Linkov
2022-11-12 2:44 ` 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=87k04hldsl.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=57848@debbugs.gnu.org \
--cc=aprekates@posteo.net \
--cc=juri@linkov.net \
--cc=rpluim@gmail.com \
/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.