diff options
author | http://smcv.pseudorandom.co.uk/ <http://smcv.pseudorandom.co.uk/@web> | 2010-03-24 17:11:17 +0000 |
---|---|---|
committer | Joey Hess <joey@finch.kitenet.net> | 2010-03-24 17:11:17 +0000 |
commit | 9d4bedf760fbbbdba28986c01c3e429f67386217 (patch) | |
tree | c0f8489809a65452d3c880f8930623fbd67a2ae4 /doc | |
parent | 8108a7f4ba315bf93fd2f5acb233ae9cc6a33393 (diff) |
relationship with [[plugins/contrib/report]]
Diffstat (limited to 'doc')
-rw-r--r-- | doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 99f256fbe..21800f4de 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -25,6 +25,21 @@ misunderstood the details of how the built-in function `sort` works when using `$a` and `$b`. The newer version has been tested, and has a regression test for its core functionality.) +This hook *isn't* (yet) sufficient to implement [[plugins/contrib/report]]'s +NIH'd sorting mechanisms: + +* `report` can sort by any [[plugins/contrib/field]], whereas this one has a + finite number of hooks: if the `field` plugin's functionality is desirable, + perhaps parameterized sort mechanisms similar to pagespec match functions + would be useful? Then the `field` plugin could register + `hook(type => "sort", id => "field")` and you could have + `\[[!inline ... sort="field(Mood)"]]` or something? + +* `report` can sort by multiple criteria, with independent direction-changing: + if this is desirable, perhaps `pagespec_match_list` could be enhanced to + interpret `sort="x -y z(w)"` as sorting by (pseudocode) + `{ $cmp_x->($a, $b) || (-$cmp_y->($a, $b)) || $cmp_z->($a, $b, "w") }`? + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) |