GNU bug report logs - #75950
[PATCH] Add new variable tab-bar-format-tab-help-text-function

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Thu, 30 Jan 2025 18:17:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 75950 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 75950 <at> debbugs.gnu.org
Subject: Re: bug#75950: [PATCH] Add new variable
 tab-bar-format-tab-help-text-function
Date: Thu, 30 Jan 2025 21:07:46 +0200
> This variable may be overridden with a user-provided function to
> customize help text for tabs displayed on the tab-bar. Help text
> is normally shown in the echo area or via tooltips. See the
> variable's docstring for arguments passed to a help-text function.
>
> My current implementation, which fully overrides 'tab-bar--format-tab',
> uses a function that returns the buffer-list for current tabs, and wc-bl
> for others.
>
> Others might find this useful if they depend on help text.

Thanks.

> +(defun tab-bar-format-tab-help-text-default (tab _i current-p)

Is the argument 'current-p' really necessary?
It's easy to check if the argument 'tab' is current
with (eq (car tab) 'current-tab).

The argument 'current-p' was required for group-related functions since
it's harder to get the current group.  But for non-group it's simpler.

> +  (concat (alist-get 'name tab)
> +          (if current-p " (current tab)"
> +            " (click to visit tab)")))

This suffix would be nice only for demonstration purposes,
but in real use this extra text only adds visual clutter.




This bug report was last modified 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.