From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#57848: 29.0.50; Problems with private tab-line-tab-name-function Date: Fri, 16 Sep 2022 06:39:56 +0200 Message-ID: <8735cs53vn.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15365"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alexandros Prekates , Robert Pluim , Juri Linkov To: 57848@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 16 06:41:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZ3A7-0003pn-Mt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 06:41:11 +0200 Original-Received: from localhost ([::1]:35132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZ3A6-00013G-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 00:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZ39z-000137-KN for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 00:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZ39z-0008Ty-Al for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 00:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZ39y-0007Dw-IY for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 00:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2022 04:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57848 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166330321527686 (code B ref -1); Fri, 16 Sep 2022 04:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Sep 2022 04:40:15 +0000 Original-Received: from localhost ([127.0.0.1]:41151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZ39C-0007CT-OZ for submit@debbugs.gnu.org; Fri, 16 Sep 2022 00:40:15 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZ399-0007CH-Hx for submit@debbugs.gnu.org; Fri, 16 Sep 2022 00:40:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZ395-0000dr-WF for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 00:40:09 -0400 Original-Received: from mout.web.de ([212.227.15.14]:59845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZ390-000885-K5 for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 00:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1663303197; bh=NXuwN/Ef8nLU43ypOjmK4mSWHCcKQFk93Q2vQmWZHYk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=NP3SRp/+O4mYOli0a7IzdCPrZMtoJYywpHdYUR5Do2RECWfnrLvOHJ8522vGS6mbP DV2Y2CXHyjgbfluUlZpCyvkMRb1VvuQDchJ9jWgVu9NQLHm6/QOQ7ySxeBfBxse3eM fvsKlaC1Wuix6HtYzI0bSihNkRgQkNWNY70Vo2/YaI/vByko69dPK4SNX9JvSMIU7+ r5EzYUZ03uwjF/8rxd/GNm+R5KhhvqAj6K0YyOyPkXr5XcGagAxlLWdAc1+YlHWliU 6pg2yF6tF9z3bf27n4e15VAqxz34PAG9YP4TQkD7C4kLwUYbX+qyKnjpDfPcB8weBk 2dwcQFMnVlkBA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.208.190.67]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mkmvj-1p1jnO0s7b-00lzQ1; Fri, 16 Sep 2022 06:39:57 +0200 X-Provags-ID: V03:K1:nDzzcUeV9p8EspEsMBvlq+Knx8mbk5+GvrjmrIOCyUw3AcrMK8e PjkzVZbXcX9DTFWOsUVUBOSeCcV/LRcOGlPVP0TR6EuLlBGJnfzJZkEf5XG01MqMUJkSAw6 1S3LdeV/n+KvmB3xGNXmPYGpjmB+he3Jv+yiOBIK82lEHrSpYy5nOaY5ByHnG/gYMtY4YHy pQN6/FHq0/hzzPsmlE3Yg== X-UI-Out-Filterresults: notjunk:1;V03:K0:QBxMLB4iOGw=:NsbqH882tT8MzaIKIe3ybO QSXyMC8Kee/Yep8UoFnkQP2SNejmo+DPrMav+/qe/fxBcQNFt7St5cfT+yfAH3kiTa0KjMo8l ePlptw67y6XAaePlvJ6g2QrS3D3915CPavLS9dvs0ctuBDFYfU05aTd3nUyxbdsARibMWusdm sy+L86X0eXhwimzwy7VccIw7PQNb+bra0i/3f+rWVprU4PVM+PP924kuntQaWgeCGQhgbrst8 B9Mjt1ByQTG9/4Bnr3w19+RKLR4hftHqb9Aajzf4ej9YU4PdOlWs8YYIpxNVRUVvVwQuxtQt8 f52V/xmvnniyPBpsBfNnQ9TFr9nHLnsz6Kx58X5COfjHxS2369XM5uPBWMLiVi6wCttgiRoTC +FYRmc9KIGxozljKTV/L4QNhznEFhX59wfsbwll0L34yw8OtrzTlK8m87h3BOTYMaVlwXaESZ 5Skfqx1/CAGlk31IGcpWINn91rvU+rMxpJT4u/DgTgvy0hW1sWq8boKyXms5MegGHNTOZF8tX B4LNQliEs0hELKdtpVaayDBpY5AZF3VH1kXxVBox7cB6RJ8/Pc8EUxj5zyhEt/GoJCSUxhqZe 2oitOlqK0A7k4r+sMfGJ6LNr9NfHlnOdxuKrDpzD+DN/GjLvimjBEm82ZLaYH5E1dyxt79aMG RnSyK2+v4wIVcZLVvMFtKNBgdXXlYcF4fi6iUmU1wDFf6SyDuAza/5o17ZrANfRilCRSxoqMM ldV/znDneU75IoiwJdD/V3poui6dTrWKseVNnRIYiCFsBbAGIf6N2A/XIwYKQcHOaUhp8d/b Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242682 Archived-At: Hello, (1) When using `tab-line-mode' together with #+begin_src emacs-lisp (setq-local tab-line-tab-name-function (lambda (_b &optional _bs) "%b")) #+end_src I get tabs that are all named equally - all named after the currently active tab's buffer. I didn't know that mode-line format sequences are valid. Are they? If they are (would be nice), could we document this, fix the behavior (I guess the interpretation is done in the context of a wrong current buffer), and maybe allow all kinds of mode-line-format values, like lists? If the interpretation of mode-line format specs is not intended, the above example should just lead to a literal "%b" tab name. We would need to add according escape characters then. (2) What I actually had tried was to get nicely named tabs for Info buffers (including the clones created with M-n). I tried with something like this: #+begin_src emacs-lisp (add-hook 'Info-mode-hook (defun my-setup-tab-line-for-Info-mode () (tab-line-mode +1) (setq-local tab-line-tab-name-function (lambda (b &optional _bs) (with-current-buffer b (apply #'concat (cdr mode-line-buffer-identification))))))) #+end_src but with that the tab names are not updated while browsing Info pages. The problem here seems to be related to the caching mechanism that doesn't recognize the need to update; invalidating the cache explicitly like with this very ugly hack: #+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 makes it work. It would be nice to provide a way to get cases like this work , e.g. by allowing to specify buffer-local cache key returning functions. I didn't try the above stuff with the tab bar, but I guess similar improvements could be implemented for that as well. TIA, Michael. In GNU Emacs 29.0.50 (build 12, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2022-09-16 built on drachen Repository revision: 833e80a0ef115a3fdc20a9d9a3190caab3b56621 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye)