alphapapa / alphapapa/org-ql

custom sort predicates for org-ql--sort-by?

Offen
#366 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @alphapapa Auf GitHub ansehen
discussion enhancement priority:C
Vorherrschende Sprache
Emacs Lisp
Sterne
1.6k
Forks
120
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Apologies if it's a duplicate -- I searched over issues/prs and didn't find anything existing

I want to sort the results of `org-ql-search` by a "created" timestamp -- in my case it's either a `CREATED` property or just a first inactive timestamp in the outline (e.g. `* [#B] [2022-08-01 Mon 00:38] some note`).
I went through the source code
https://github.com/alphapapa/org-ql/blob/eb5377320fcfd38354d6e9e3e655969ae3c0e052/org-ql.el#L2400-L2436 , and seems that it only supports predefined sorting predicates at the moment?

I'm happy to try and contribute support for custom predicates, just want to double check first that would fit into the library. E.g. I imagine it might have some impact on caching?

I imagine as a workaround I could abuse existing `org-ql--date<` sorting key and override it to extract the `CREATED` property or something like that.
Thanks!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.