Function: tabulated-list-groups

tabulated-list-groups is a byte-compiled function defined in tabulated-list.el.gz.

Signature

(tabulated-list-groups ENTRIES METADATA)

Documentation

Make a flat list of groups from list of ENTRIES.

Return the data structure suitable to be set to the variable tabulated-list-groups(var)/tabulated-list-groups(fun). METADATA is a property list with two keys: PATH-FUNCTION is a function to put an entry from ENTRIES to the tree
(see tabulated-list-groups-categorize for more information);
SORT-FUNCTION is a function to sort groups in the tree
(see tabulated-list-groups-sort for more information).

View in manual

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/tabulated-list.el.gz
;;; Tabulated list groups

(defun tabulated-list-groups (entries metadata)
  "Make a flat list of groups from list of ENTRIES.
Return the data structure suitable to be set to the variable
`tabulated-list-groups'.  METADATA is a property list with two keys:
PATH-FUNCTION is a function to put an entry from ENTRIES to the tree
\(see `tabulated-list-groups-categorize' for more information);
SORT-FUNCTION is a function to sort groups in the tree
\(see `tabulated-list-groups-sort' for more information)."
  (let* ((path-function (plist-get metadata :path-function))
         (sort-function (plist-get metadata :sort-function))
         (tree (tabulated-list-groups-categorize entries path-function)))
    (when sort-function
      (setq tree (tabulated-list-groups-sort tree sort-function)))
    (tabulated-list-groups-flatten tree)))