unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Matthias Meulien <orontee@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Fix width tabs
Date: Tue, 22 Feb 2022 19:18:35 +0200	[thread overview]
Message-ID: <86ee3uoox0.fsf@mail.linkov.net> (raw)
In-Reply-To: <87wnho9yyb.fsf@gmail.com> (Matthias Meulien's message of "Mon, 21 Feb 2022 13:38:36 +0100")

> I tried the following (not trying to dynamically compute the tabs width
> to start with and disabling support for close buttons):
>
> (defun my-tab-bar-tab-name-format (tab i)
>   (propertize
>    (truncate-string-to-width
>     (format
>      (concat "%-" (number-to-string tab-bar-tab-name-truncated-max) "s")
>      (alist-get 'name tab))
>     tab-bar-tab-name-truncated-max 0 ?m t)
>    'face (funcall tab-bar-tab-face-function tab)))
>
> (setq tab-bar-tab-name-format-function 'my-tab-bar-tab-name-format)
>
> Unfortunately it doesn't play well with variable pitch font, and the
> display property "min-width" isn't honored in tab-bar. I guess my naive
> approach won't be sufficient...

I don't remember if we already have pixel-level space padding for
variable pitch fonts.  Probably not, because variable pitch fonts
can't be used on the mode-line where the problem is that the
coding-system indicator can't take the fixed amount of space.
One of the threads where this was recently discussed:
https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00343.html



  reply	other threads:[~2022-02-22 17:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 21:31 Fix width tabs Matthias Meulien
2022-02-18  7:49 ` Juri Linkov
2022-02-18 14:45   ` Matthias Meulien
2022-02-19 17:05     ` Juri Linkov
2022-02-21  8:30       ` Juri Linkov
2022-02-21 12:38         ` Matthias Meulien
2022-02-22 17:18           ` Juri Linkov [this message]
2022-10-27  7:40         ` Juri Linkov
2022-10-30 19:50           ` Matthias Meulien
2022-11-02 18:01             ` Juri Linkov
2022-11-04  7:48               ` Juri Linkov
2022-11-04  8:07                 ` Eli Zaretskii
2022-11-05 17:12                   ` Juri Linkov
2022-11-05 17:28                     ` Eli Zaretskii
2022-11-05 18:20                       ` Juri Linkov
2022-11-05 17:56                     ` tomas
2022-11-05 18:17                       ` Juri Linkov
2022-11-06 10:59                     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ee3uoox0.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=orontee@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).