Function: magit-repolist-make-sorter
magit-repolist-make-sorter is a byte-compiled function defined in
magit-repos.el.
Signature
(magit-repolist-make-sorter SORT-PREDICATE CONVERT-CELL COLUMN-IDX)
Documentation
Return a function suitable as a sorter for tabulated lists.
See tabulated-list--get-sorter. Given a more reasonable API
this would not be necessary and one could just use SORT-PREDICATE
directly. CONVERT-CELL can be used to turn the cell value, which
is always a string back into, e.g., a number. COLUMN-IDX has to
be the index of the column that uses the returned sorter function.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-repos.el
;;;; Columns
(defun magit-repolist-make-sorter (sort-predicate convert-cell column-idx)
"Return a function suitable as a sorter for tabulated lists.
See `tabulated-list--get-sorter'. Given a more reasonable API
this would not be necessary and one could just use SORT-PREDICATE
directly. CONVERT-CELL can be used to turn the cell value, which
is always a string back into, e.g., a number. COLUMN-IDX has to
be the index of the column that uses the returned sorter function."
(lambda (a b)
(funcall sort-predicate
(funcall convert-cell (aref (cadr a) column-idx))
(funcall convert-cell (aref (cadr b) column-idx)))))