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

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

bug#44068: 28.0.50; Faulty uses of tabulated-list-format


From: Stephen Berman
Subject: bug#44068: 28.0.50; Faulty uses of tabulated-list-format
Date: Thu, 29 Oct 2020 23:48:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Thu, 29 Oct 2020 16:58:52 +0000 Stefan Kangas <stefankangas@gmail.com> wrote:

> Stephen Berman <stephen.berman@gmx.net> writes:
>
>> I was wrong that adjusting column widths in tabulated-list-format is
>> necessary: with the attached patch, when a non-final column whose label
>> is at least 3 characters long is selected, the label will get truncated
>> and a sort indicator added; but the final column label will never get
>> truncated and always get a sort indicator when selected.
>
> The behavior with your patch looks like an improvement to me.  How about
> the case when we narrow the column but there is no sort indicator,
> should we use the ellipsis then?  See for example `list-buffers' when
> using the narrowing commands without sorting on any of the headers.

Try the attached patch; does it do what you're suggesting well enough?

Attachment: txtJvL70Irsxz.txt
Description: tabulated-list-init-header patch

>> The question remains whether the truncated display in current
>> (non-adjusted) uses of tabulated-list-mode is acceptable: if so, the
>> patch below is all that's needed, if not, then the adjustments in my
>> first patch can be made as well.
>
> I'm not sure I understand what you mean here, could you elaborate?

I meant that in some uses of tabulated-list-mode there are columns whose
default width is so narrow that, when selected for sorting, they are
immediately truncated (using the patch in my previous post), e.g. the
"Status" column in list-processes.  And the issue is exacerbated with
the current patch implementing your new suggestion: with its default
width "Status" is now truncated whether selected or not.  In such cases
it may be better to make the default width of such columns wider, which
is what my first patch did.  Then with the current patch, it will still
be truncated when the column is sufficiently narrowed with `{'.

Steve Berman

reply via email to

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