Subject: bug#69305: outline-minor-mode for tabulated-list-mode

From: Ihor Radchenko <[email-masked]>
Date: Sat, 24 Feb 2024 18:36:23 +0000

Eli Zaretskii <[email-masked]> writes:

>> I am wondering if flexible grouping system from Adam's org-super-agenda
>> package may provide some inspiration.
>> Check out
>> https://github.com/alphapapa/org-super-agenda/?tab=readme-ov-file#usage
>
> What I had in mind was much simpler to use.  But I guess I'm the only
> one who wants to let users set up grouping in some easy way, because
> I'm being shown more and more complicated customizations, claiming
> they are suitable.

Don't be deceived by the length of org-super-agenda readme.
Most of the keywords listed there are an equivalent to column names in
tabulated-list-mode.

What might be relevant are the following group customizations:

    :face
    A face to apply to items in the group. If face is a plist containing
    :append t, it will be appended. See function add-face-text-property.
    
    :transformer
    Used to transform item strings before display. Either a function
    called with one argument, the item string, or a sexp, in which case
    the item string is bound to it.

and the following options to provide automatic grouping without a need
to write dedicated function:

    :and
    Group ITEMS that match all selectors in GROUP.
    
    :anything
    Select every item, no matter what. This is probably most useful with
    :discard, because it doesn’t actually test anything, so it’s faster
    than, e.g. ~:regexp “.”~, which has to get the entry text for every
    item.
    
    :discard
    Discard items that match selectors. Any groups processed after this one
    will not see discarded items. You might use this at the beginning or end
    of a list of groups, either to narrow down the list of items (used in
    combination with :not), or to exclude items you’re not interested in.
    
    :not
    Group ITEMS that match no selectors in GROUP.
    Note that the :not group selector creates a group with items it does not
    match; it can be combined with :discard to discard items that don’t
    match. For example, (:discard (:not (:priority "A"))) as the first
    selector would mean that only priority A items would appear in the
    agenda, while (:discard (:priority "C")) would mean that any priority C
    items would not appear in the agenda.
    
    :order
    A number setting the order sections will be displayed in the agenda,
    lowest number first. Defaults to 0.
    
    :order-multi
    Set the order of multiple groups at once, like (:order-multi (2 (groupA)
    (groupB) ...)) to set the order of these groups to 2.
    
    :take
    Take the first N items in GROUP. If N is negative, take the last N
    items. For example, (:take (-3 group)) will take the last 3 items from
    the group. The remainder of items are discarded. Note: The order of
    entries from GROUP is not guaranteed to be preserved, so :take may not
    always show expected entries.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>