emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Add a function for building sort predicates


From: Drew Adams
Subject: RE: [External] : Add a function for building sort predicates
Date: Thu, 1 Feb 2024 22:48:10 +0000

> This is hard to read and maintain, 0% user configurable, and it's not
> easy to add additional "layers", like, "sort packages with equal states
> first by archive name, and only then by name".
>
> I want to suggest to add a function for defining sort predicates for
> cases like these (especially having tabulated-list-mode in mind, but
> not only - sorting is a common task).

Yes.  Compose predicates to create new predicates:

First this test.  If it can't decide, then the next
test.  If it can't decide, then the next test...
(Similar to `run-hooks-with-args-until-* behavior.)

Let a given predicate decide true, false, or dunno.
Only if its result is `dunno' is the next predicate
tried.

There can be a little more to it.  See this for
something quite similar:

https://www.emacswiki.org/emacs/ApplesAndOranges

(Since 2009.)



reply via email to

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