Subject: bug#56345: 29.0.50; [PATCH] Add column hiding to tabulated-list

From: Jean Louis <[email-masked]>
Date: Thu, 8 Sep 2022 21:14:00 +0300

* Michael Heerdegen <[email-masked]> [2022-09-08 08:59]:
> Thuna <[email-masked]> writes:
> 
> > I don't know how `proced' and `ibuffer' specifically handles views, but
> > I don't think it is a good idea to put the burden on external packages
> > when tabulated-list is right there.  Especially since this leads to a
> > lot of (what I imagine to be) duplicated code across packages.
> 
> Exactly.  tabulated-list should implement this feature.
> 
> > I don't exactly understand what you mean by "interface".  Are you
> > referring to the package which should be responsible for managing
> > which columns are visible?
> 
> No, I mean, how should column hiding happen?  Should the user select
> single columns interactively, or should we provide a way to define
> restricted views?  Maybe we can have both?

It seems to me complex to hide columns as one would need to manipulated:

- tabulated-list-format

and

- tabulated-list-entries

One way to go would be:

1. Remember original format

2. Generate new format with column hidden

3. Remember original tabulated-list-entries

4. Modify tabulated-list-entries to remove the column

5. Refresh buffer

6. Revealing columns should restore original variables

Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/