GNU bug report logs - #44594
tabulated-list-mode: column header needlessly truncated

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 12 Nov 2020 15:28:01 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 44594 <at> debbugs.gnu.org, stephen.berman <at> gmx.net
Subject: bug#44594: tabulated-list-mode: column header needlessly truncated
Date: Fri, 27 Aug 2021 18:41:55 +0200
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefan <at> 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))

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
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

This bug report was last modified 3 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.