emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some ideas to improve Tab Bar


From: Juri Linkov
Subject: Re: Some ideas to improve Tab Bar
Date: Wed, 25 Nov 2020 09:47:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Some little ideas on how Tab Bar can be further improved:

Thanks for the ideas.

> 1. Options to disable `tab-bar-back-button' and
> `tab-bar-forward-button' when `tab-bar-history-mode' is on.  This will
> be similar to what option `tab-bar-close-button-show' is to
> `tab-bar-close-button'.

The most difficult part is to choose a good option name.
Maybe, `tab-bar-history-buttons-show' is not too bad.

> 2. Trim spaces of tab bar name. The tab bar name can have additional spaces 
> on the right:
>     2.1. When tab bar name name is set explicitly with `tab-bar-rename-tab';
>     2.2. When `tab-bar-tab-hints' is true and `tab-bar-tab-name-function' 
> returns an empty string;

Sorry, I don't understand what is the problem.
When the user intentionally adds spaces in case 2.1.,
then why there is a need to trim spaces?

> 3. An easier way to add more items to Tab Bar to make it act more like
> a general Bar.  The following example was shared in Emacs Devel
> mailing list on how to add a simple clock to the right of Tab Bar:
> =========================================
>   (advice-add 'tab-bar-make-keymap-1 :around
>               (lambda (orig-fun)
>                 (append (funcall orig-fun)
>                         `((display-time menu-item
>                                         ,(concat
>                                           (propertize " " 'display '(space 
> :align-to (- right 5)))
>                                           (format-time-string "%H:%M"))
>                                         ignore))))
>               '((name . tab-bar-display-time)))
> =========================================

Do you propose to add functions that would allow doing this more easily?
Maybe using some hooks?

> 4. Maybe deprecate `winner-mode' in favor to `tab-bar-history-mode',
> since these two modes have similar functions.
> Using `tab-bar-history-mode' with only one Tab is like using
> `winner-mode'.

`winner-mode' should not be deprecated because it's still useful
for users who don't use tabs with `tab-bar-mode'.  So `winner-mode'
works fine when tabs are not used.  OTOH, `winner-mode' breaks tabs
when used with `tab-bar-mode', so `tab-bar-history-mode' is needed
to do the same when tabs are used.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]