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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41372 in the body.
You can then email your comments to 41372 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Sun, 17 May 2020 22:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Matthias Meulien <orontee <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 17 May 2020 22:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[0001-Fix-tab-bar-tab-name-ellipsis-initialization.patch (text/x-diff, inline)]
From 6482236257c99dcd411d635360ce4c1d8144b3f0 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee <at> 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
[Message part 3 (text/plain, inline)]
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))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Tue, 19 May 2020 22:47:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 41372 <at> debbugs.gnu.org (full text, mbox):
> 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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Sat, 23 May 2020 19:55:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 41372 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> linkov.net> writes:
> 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.
You're right. Here's un updated patch:
[0001-Fix-tab-bar-tab-name-ellipsis-initialization.patch (text/x-diff, inline)]
From d607000155a21340aebd101ee5dc4a12037088d7 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee <at> 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, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index ce6d8c33dd..d24d59cb7e 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -376,19 +376,22 @@ tab-bar-tab-name-truncated-max
:group 'tab-bar
:version "27.1")
-(defvar tab-bar-tab-name-ellipsis
- (if (char-displayable-p ?…) "…" "..."))
+(defvar tab-bar-tab-name-ellipsis nil)
(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)))))
+ (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))
+ (ellipsis (cond
+ (tab-bar-tab-name-ellipsis)
+ ((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
[Message part 3 (text/plain, inline)]
--
Matthias
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Sat, 23 May 2020 22:57:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 41372 <at> debbugs.gnu.org (full text, mbox):
>> 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.
>
> You're right. Here's un updated patch:
Eli, this patch should go to emacs-27?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Sun, 24 May 2020 02:34:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 41372 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sun, 24 May 2020 01:28:12 +0300
> Cc: 41372 <at> debbugs.gnu.org
>
> >> 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.
> >
> > You're right. Here's un updated patch:
>
> Eli, this patch should go to emacs-27?
I'm okay with doing that on emacs-27, yes.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41372
; Package
emacs
.
(Sun, 24 May 2020 22:11:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 41372 <at> debbugs.gnu.org (full text, mbox):
tags 41372 fixed
close 41372 27.1
thanks
>> >> 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.
>> >
>> > You're right. Here's un updated patch:
>>
>> Eli, this patch should go to emacs-27?
>
> I'm okay with doing that on emacs-27, yes.
Now pushed to emacs-27.
Added tag(s) fixed.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Sun, 24 May 2020 22:11:04 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
41372 <at> debbugs.gnu.org and Matthias Meulien <orontee <at> gmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Sun, 24 May 2020 22:11:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 22 Jun 2020 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.