bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41372: 28.0.50; [PATCH] Wrong value of tab-bar-tab-name-ellipsis


From: Matthias Meulien
Subject: bug#41372: 28.0.50; [PATCH] Wrong value of tab-bar-tab-name-ellipsis
Date: Mon, 18 May 2020 00:35:55 +0200

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.

>From 6482236257c99dcd411d635360ce4c1d8144b3f0 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@gmail.com>
Date: Mon, 18 May 2020 00:32:47 +0200
Subject: [PATCH] Fix tab-bar-tab-name-ellipsis initialization

* lisp/tab-bar.el (tab-bar-tab-name-truncated): Evaluate displayable
character when generating tab name.
---
 lisp/tab-bar.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index ce6d8c33dd..c327ac0967 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -376,19 +376,16 @@ tab-bar-tab-name-truncated-max
   :group 'tab-bar
   :version "27.1")
 
-(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)
                   'help-echo tab-name))))
 

-- 
2.20.1



In GNU Emacs 28.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo 
version 1.16.0)
 of 2020-05-16 built on carbon
Repository revision: 1ba4e5b5eb7360338c5ed750c8e4a2b09835f78b
Repository branch: dev/mm
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
Creating customization setup...done
You can run the command ‘customize-group’ with M-x cu-g RET
Creating customization setup...done
Mark saved where search started
Show the value of this option.
Show or hide rest of the documentation.
Show the value of this option.
Choice: 2
To install your edits, invoke [State] and choose the Set operation
Set all values according to this buffer? (y or n) y

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Custom

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils seq byte-opt gv bytecomp byte-compile cconv mule-util
misearch multi-isearch cus-edit easymenu cus-start cus-load wid-edit
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 67053 5417)
 (symbols 48 7511 1)
 (strings 32 19027 1185)
 (string-bytes 1 596724)
 (vectors 16 11021)
 (vector-slots 8 133160 11144)
 (floats 8 32 63)
 (intervals 56 484 14)
 (buffers 992 14))

reply via email to

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