From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 44594@debbugs.gnu.org, stephen.berman@gmx.net
Subject: bug#44594: tabulated-list-mode: column header needlessly truncated
Date: Fri, 27 Aug 2021 18:41:55 +0200 [thread overview]
Message-ID: <87r1een8ks.fsf@gnus.org> (raw)
In-Reply-To: <CADwFkmntvePnVor6sUY35jkvT0edB0WdJmnJbKE1xmU_9xp+0Q@mail.gmail.com> (Stefan Kangas's message of "Thu, 12 Nov 2020 10:27:31 -0500")
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
Stefan Kangas <stefan@marxist.se> writes:
> The column header in tabulated-list-mode is needlessly truncated.
>
> Steps to reproduce:
>
> 0. emacs -Q
> 1. M-x list-buffers RET
> 2. C-x o
> 3. C-4 C-f
> 4. C-1 C-4 {
>
> Result: The header is truncated to "Buff..." even though there is enough
> space to show it all.
>
> Expected result: The header is not truncated.
The issue is basically this:
(truncate-string-to-width "Buffer" 5 nil nil t)
=> "Buff…"
Or... Uhm... Oh! I've never noticed that the mode lets column overlap:
;; Truncate labels if necessary (except last column).
;; Don't truncate to `width' if the next column is align-right
;; and has some space left, truncate to `available-space' instead.
(when (and not-last-col
(> label-width available-space))
(setq label (truncate-string-to-width
label available-space nil nil t t)
label-width available-space))
[-- Attachment #2: Type: image/png, Size: 11110 bytes --]
[-- Attachment #3: Type: text/plain, Size: 284 bytes --]
So we allow column data to extend into the next column (if the next
column is right-aligned). But we don't do the same computation in the
header? Right.
Now fixed in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2021-08-27 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 15:27 bug#44594: tabulated-list-mode: column header needlessly truncated Stefan Kangas
2020-11-14 16:08 ` bug#44594: [PATCH v4] doc: add a note about relabling after upgrades to the Daniel Brooks
2020-11-14 16:36 ` Lars Ingebrigtsen
2020-11-14 16:48 ` Daniel Brooks
2021-08-27 16:41 ` Lars Ingebrigtsen [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1een8ks.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=44594@debbugs.gnu.org \
--cc=stefan@marxist.se \
--cc=stephen.berman@gmx.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.