GNU bug report logs -
#41372
28.0.50; [PATCH] Wrong value of tab-bar-tab-name-ellipsis
Previous Next
Reported by: Matthias Meulien <orontee <at> gmail.com>
Date: Sun, 17 May 2020 22:37:02 UTC
Severity: minor
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 27.1
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> When I evaluate (char-displayable-p ?…) from current frame (under X) it
> evaluates to a valid font but, after I customized
> `tab-bar-tab-name-function` to equal `tab-bar-tab-name-truncated`, tab
> names are truncated using three dots characters.
Thanks for the patch. One problem is that the patch hard-codes the ellipsis,
so that the user loses the ability to configure it.
A better way would be to leave defvar tab-bar-tab-name-ellipsis,
but by default set its value to nil. So when it's non-nil,
then use its value, otherwise use "…"/"..." by default.
> -(defvar tab-bar-tab-name-ellipsis
> - (if (char-displayable-p ?…) "…" "..."))
> -
> (defun tab-bar-tab-name-truncated ()
> "Generate tab name from the buffer of the selected window.
> -Truncate it to the length specified by `tab-bar-tab-name-truncated-max'.
> -Append ellipsis `tab-bar-tab-name-ellipsis' in this case."
> - (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window)))))
> +Truncate it to the length specified by `tab-bar-tab-name-truncated-max'."
> + (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))
> + (ellipsis (if (char-displayable-p ?…) "…" "...")))
> (if (< (length tab-name) tab-bar-tab-name-truncated-max)
> tab-name
> (propertize (truncate-string-to-width
> tab-name tab-bar-tab-name-truncated-max nil nil
> - tab-bar-tab-name-ellipsis)
> + ellipsis)
This bug report was last modified 4 years and 360 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.