From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 18:58:19 2024 Received: (at submit) by debbugs.gnu.org; 16 Jun 2024 22:58:19 +0000 Received: from localhost ([127.0.0.1]:56549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIypH-0004Bg-CZ for submit@debbugs.gnu.org; Sun, 16 Jun 2024 18:58:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:41544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIypF-0004BY-4F for submit@debbugs.gnu.org; Sun, 16 Jun 2024 18:58:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIypD-0007Ie-8O for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2024 18:58:15 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIypB-0003s7-GS for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2024 18:58:15 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-35f22d3abf1so3479430f8f.1 for ; Sun, 16 Jun 2024 15:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718578691; x=1719183491; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=rpMQZJ08VnjWjGCcHUVGwT/UxQBYRLvuVToUrBOgRTc=; b=OypNhWx8mrYIeQBuQ/QbCdqeP5cmAfwAeLqNpAwx2AvNNocLYiFIt+tOK5CzlE6mJv /LuI/1GOV++ksTzQGFZR1+NLUsMyQfDdRrUVUsbB66nJMcXHzUx1jl4HQY/ob62Md9Hx 4HracAB2qnWj6eqnsreUwpFIlNG4BNvkdksKXZdDsn/ap8W5dIYyi+gOOVkfhMyyrQwG 1Kl3YRyPoq/Q3KBDwS2F0q9UMMpfBeQWfXgxiN8eqLJlD4r1bLhMCTsTeXfJQkhf7UAh jl7EYar8lKppjCdZ4wi5WJD3vlr3njWUVQ7CZZfEyTUx6P3dWkWkUgjteArAZijehv/e 9V/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718578691; x=1719183491; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rpMQZJ08VnjWjGCcHUVGwT/UxQBYRLvuVToUrBOgRTc=; b=NeJj7gJjCu6YfpyHaDXAEz6M6OygeLvoFBFZaO1aE9x9NQzJ3tIuS0az3mk928GrXu 3q3cMrlOvhRQnGadotjpyW5hLbV2wmkSASS1KqObodODNYdEm2Xu5ZJgUrDbToBw1rVm G8Ql3fgkMadbKJRLdF+qgyuEDhN5wPYc3CE5KdgPxrDFtG5zfXinEKJVuOaIBmTF30pD UjF68hb0AG3W3fAwLL4CLmaF6W9M2QhtLNNdXOM2bHc+LlpbWZ0HXzA3KGnIQQEoghzg 4y3MHW8b5w66qGNiffqGGEBuIoWMNblmCPWdQdpMPK0FsPxa6eZHhgC4GGgJB0HcXX2/ hVfg== X-Gm-Message-State: AOJu0YyWKq7LGEs/fxeEVkrzECf6SMTKG6JNEzHmdeGphEu5/Pn/PxuT xICqc5GRt6b71QS2OColdjdIWC97M7PDPz5dvfcH03FwGecnh49Q0oSATQ== X-Google-Smtp-Source: AGHT+IE+y/Tx748Tw+JR864/jKaXNbmUuzVvoh9kjvkYHHpDgCvoIgTWX7TzMbD02CbSciaUaQruBA== X-Received: by 2002:adf:e503:0:b0:360:6e47:ce8a with SMTP id ffacd0b85a97d-3607a768386mr5682176f8f.32.1718578691079; Sun, 16 Jun 2024 15:58:11 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f2716sm10636696f8f.70.2024.06.16.15.58.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 15:58:10 -0700 (PDT) From: Al Haji-Ali To: bug-gnu-emacs@gnu.org Subject: 29.1; force-mode-line-update does not refresh names of tab-lines Date: Sun, 16 Jun 2024 23:58:02 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) In an `emacs -Q`, I tried the following code: (progn (tab-line-mode) (setq-local tab-line-tab-name-function (defun my/tab-name(tab &optional _) (with-current-buffer tab (concat (buffer-name) " " (format-time-string "%S")))))) This works fine and I get the seconds after the buffer-name. However, I seem to have no way of updating the tab-line to cause the names to be refreshed (except to add or remove a tab). The documentation of `force-mode-line-update` and the `:set` code of `tab-line-tab-name-function` suggest that calling `(force-mode-line-update t)` would do the trick, but on my Emacs, this does not work. Is this a bug or am I misunderstanding the documentation? I apologize that I am unable to test this on Emacs 30. -- Al In GNU Emacs 29.1 (build 1, aarch64-apple-darwin22.5.0, Carbon Version 169 AppKit 2299.6) of 2023-09-09 built on m2air.local Windowing system distributor 'Apple Inc.', version 14.1.2 System Description: macOS 14.1.2 Configured using: 'configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-mac/emacs-29.1-mac-10.0/share/info --mandir=/opt/homebrew/Cellar/emacs-mac/emacs-29.1-mac-10.0/share/man --prefix=/opt/homebrew/Cellar/emacs-mac/emacs-29.1-mac-10.0 --with-mac --enable-mac-app=/opt/homebrew/Cellar/emacs-mac/emacs-29.1-mac-10.0 --with-gnutls --with-modules --with-mac-metal --with-native-compilation --with-tree-sitter 'CFLAGS=-I/opt/homebrew/opt/gcc/include -I/opt/homebrew/opt/libgccjit/include' 'LDFLAGS=-L/opt/homebrew/lib/gcc/13 -I/opt/homebrew/opt/gcc/include -I/opt/homebrew/opt/libgccjit/include'' Configured features: ACL GLIB GMP GNUTLS JSON LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE PDUMPER RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XIM ZLIB Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tab-line-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mac-mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print byte-opt debug backtrace find-func tab-line time-date cl-loaddefs comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile cl-lib jka-compr info rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/mac-win mac-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue mac multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 96353 12870) (symbols 48 8005 0) (strings 32 24415 2462) (string-bytes 1 758586) (vectors 16 19730) (vector-slots 8 372131 16557) (floats 8 35 184) (intervals 56 535 0) (buffers 984 17)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 02:17:45 2024 Received: (at 71601) by debbugs.gnu.org; 17 Jun 2024 06:17:45 +0000 Received: from localhost ([127.0.0.1]:59314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ5gX-0007fb-7k for submit@debbugs.gnu.org; Mon, 17 Jun 2024 02:17:45 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ5gV-0007fM-Lq for 71601@debbugs.gnu.org; Mon, 17 Jun 2024 02:17:44 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4278640004; Mon, 17 Jun 2024 06:17:33 +0000 (UTC) From: Juri Linkov To: Al Haji-Ali Subject: Re: bug#71601: 29.1; force-mode-line-update does not refresh names of tab-lines In-Reply-To: (Al Haji-Ali's message of "Sun, 16 Jun 2024 23:58:02 +0100") Organization: LINKOV.NET References: Date: Mon, 17 Jun 2024 09:11:01 +0300 Message-ID: <868qz4152a.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71601 Cc: 71601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > (progn > (tab-line-mode) > (setq-local tab-line-tab-name-function > (defun my/tab-name(tab &optional _) > (with-current-buffer tab > (concat (buffer-name) " " (format-time-string "%S")))))) > > This works fine and I get the seconds after the buffer-name. However, > I seem to have no way of updating the tab-line to cause the names to > be refreshed (except to add or remove a tab). > The documentation of `force-mode-line-update` and the `:set` code of > `tab-line-tab-name-function` suggest that calling > `(force-mode-line-update t)` would do the trick, but on my Emacs, this > does not work. Is this a bug or am I misunderstanding the > documentation? Please try to set `tab-line-cache-key-function` to a function that is a copy of `tab-line-cache-key-default` but where at the end there is appended your addition of (format-time-string "%S"): (setq tab-line-cache-key-function (lambda (tabs) (list tabs ;; handle buffer renames (buffer-name (window-buffer)) ;; handle tab-line scrolling (window-parameter nil 'tab-line-hscroll) ;; for setting face 'tab-line-tab-current' (mode-line-window-selected-p) ;; for `tab-line-tab-face-modified' (and (memq 'tab-line-tab-face-modified tab-line-tab-face-functions) (buffer-file-name) (buffer-modified-p)) ;; Added key: (format-time-string "%S")))) This will clear the cache every time when (format-time-string "%S") changes, i.e. every second. If this works, please suggest where would you expect to find this information. Should the documentation be updated for 'tab-line-tab-name-function'? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 04:35:08 2024 Received: (at 71601) by debbugs.gnu.org; 17 Jun 2024 08:35:08 +0000 Received: from localhost ([127.0.0.1]:59533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ7pU-00031l-Ej for submit@debbugs.gnu.org; Mon, 17 Jun 2024 04:35:08 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:56508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ7pS-000315-Ak for 71601@debbugs.gnu.org; Mon, 17 Jun 2024 04:35:07 -0400 Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-52caebc6137so1826995e87.0 for <71601@debbugs.gnu.org>; Mon, 17 Jun 2024 01:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718613238; x=1719218038; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=vuoJqUCfvyN5xSO8ioHzSQAky4OZUUAL6JLqnzj9JhY=; b=K1wDRRSJd6stn3Dgs3AnILn5wLoGRUKsr54uvN5pxBvopT09e+k0x8c61r7uNl0LuL gZISEblnZlXTYWmjyGLF1andPxJGaDEGXaKhIKydddwqg9rzHIwSHGJQECKFYKHLK1h1 8mk2wqtiJvfYD7tR1GUVqJOdwyb6QeKDfp1jcewJMbphZpnJ1qWfYlbFF5U9+sn0Nl2Y Z9OI+lMUhInNKN7FEtMdVNiyh74lzROpCugeLvHyBepLR8EUxpLb89e1waZup+UG7V6p +2xB16brU3L+lM8nybYycupp9JArgsGoaTKYgCkqzOBHFJtgO+Ygz2VflFQw172wVdKB POiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718613238; x=1719218038; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vuoJqUCfvyN5xSO8ioHzSQAky4OZUUAL6JLqnzj9JhY=; b=u171lujvspAVGdm+1McLo4/MakCm1w1oIxZED9bHm6e3r1esDWJ9Sh8DGTyvHc+NVS jsLdpDu2+f36Lc+CHEJE7snIn6VOJcijj+WjDLzzx8sSaO4cpq7qvcAzrWNZooECChai UR6/E252C4+NX7HgcWJFeK5AxGDHJcXJ2PV2AApiutVm/RjfA5bmr167RdM3gLobOuuB QV9Yn/D2BjEEvDk2hlpLYxAxaEbVHhrtMHNoXL4tdvGk1dvk3o0m5hhJB4opUDaVDTnF gsRaKzAlWCIT8qSjZMCy4jQjjR56J4/1pg+zsYKMYVuP3F8IGKilPi4FdKeY64nQa7cK Jmkg== X-Gm-Message-State: AOJu0Yze3uNL+nPL2KNZeW20ExcG6rTBiXa+BZDXoDTXazg55Koydi6j itbpS+RgOehK7Yb8pAbmMmyhcONpdxH+8hDkjw6JxYq62smzqs2pXA+olw== X-Google-Smtp-Source: AGHT+IFIIl3Lhr2Xp02y/Wbcyhx+mislgjndI4ITsjstSSXigEkQzc5zY3pQIuUIgeLnYSezET+1cg== X-Received: by 2002:a19:5e06:0:b0:52c:98df:f496 with SMTP id 2adb3069b0e04-52ca6e6d582mr5478326e87.40.1718613238044; Mon, 17 Jun 2024 01:33:58 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f2716sm11486566f8f.70.2024.06.17.01.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 01:33:57 -0700 (PDT) From: Al Haji-Ali To: Juri Linkov Subject: Re: bug#71601: 29.1; force-mode-line-update does not refresh names of tab-lines In-Reply-To: <868qz4152a.fsf@mail.linkov.net> References: <868qz4152a.fsf@mail.linkov.net> Date: Mon, 17 Jun 2024 09:31:53 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71601 Cc: 71601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 17/06/2024, Juri Linkov wrote: > > Please try to set `tab-line-cache-key-function` to a function > that is a copy of `tab-line-cache-key-default` but where > at the end there is appended your addition of (format-time-string "%S"): Indeed, the tab caching seems to be the issue. I resolved it slightly differently by clearing the cache before calling `force-mode-line-update`. (set-window-parameter nil 'tab-line-cache nil) (force-mode-line-update) whenever I want to update the tab names. I would suggest that a solution for forcing name updates is included in the documentation for `tab-line-tab-name-format-function`, possibly defining a new function like `tab-line-force-update`. Also, shouldn't the cache be cleared in the `:set` code of `tab-line-tab-name-format-function`? (That's where I actually figured out that I needed to call `force-mode-line-update`). -- Al From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 12:51:15 2024 Received: (at 71601) by debbugs.gnu.org; 17 Jun 2024 16:51:15 +0000 Received: from localhost ([127.0.0.1]:35245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJFZa-0002wE-Oo for submit@debbugs.gnu.org; Mon, 17 Jun 2024 12:51:15 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJFZX-0002vw-Rv; Mon, 17 Jun 2024 12:51:12 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id C10A7240004; Mon, 17 Jun 2024 16:50:40 +0000 (UTC) From: Juri Linkov To: Al Haji-Ali Subject: Re: bug#71601: 29.1; force-mode-line-update does not refresh names of tab-lines In-Reply-To: (Al Haji-Ali's message of "Mon, 17 Jun 2024 09:31:53 +0100") Organization: LINKOV.NET References: <868qz4152a.fsf@mail.linkov.net> Date: Mon, 17 Jun 2024 19:49:23 +0300 Message-ID: <86le33y0oc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71601 Cc: 71601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 71601 30.0.50 thanks >> Please try to set `tab-line-cache-key-function` to a function >> that is a copy of `tab-line-cache-key-default` but where >> at the end there is appended your addition of (format-time-string "%S"): > > Indeed, the tab caching seems to be the issue. I resolved it slightly > differently by clearing the cache before calling > `force-mode-line-update`. > > (set-window-parameter nil 'tab-line-cache nil) > (force-mode-line-update) > > whenever I want to update the tab names. > > I would suggest that a solution for forcing name updates is included > in the documentation for `tab-line-tab-name-format-function`, possibly > defining a new function like > `tab-line-force-update`. > Also, shouldn't the cache be cleared in the `:set` code of > `tab-line-tab-name-format-function`? (That's where I actually figured > out that I needed to call `force-mode-line-update`). Thanks for the suggestion. So the function `tab-line-force-update` for the `:set` code is pushed now. From unknown Tue Aug 19 21:02:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Jul 2024 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator