Merge: Fix custom sorting functions

This commit is contained in:
Adam Porter 2021-06-08 11:09:22 -05:00
commit 832adfee20
3 changed files with 32 additions and 26 deletions

View file

@ -463,7 +463,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
** 0.5.1-pre ** 0.5.1-pre
Nothing yet. *Fixed*
+ Custom sorting functions could corrupt the cache, causing items to disappear after refreshing an =org-ql-search= buffer. ([[https://github.com/alphapapa/org-ql/issues/186][#186]], [[https://github.com/alphapapa/org-ql/issues/187][#187]]. Thanks to [[https://github.com/natask][Nathanael kinfe]].)
** 0.5 ** 0.5

View file

@ -292,7 +292,7 @@ returns nil or non-nil."
;; Default sorting functions ;; Default sorting functions
(org-ql--sort-by items (-list sort))) (org-ql--sort-by items (-list sort)))
;; Sort by user-given comparator. ;; Sort by user-given comparator.
((pred functionp) (sort items sort)) ((pred functionp) (-sort sort items))
(_ (user-error "SORT must be either nil, one or a list of the defined sorting methods (see documentation), or a comparison function of two arguments"))))) (_ (user-error "SORT must be either nil, one or a list of the defined sorting methods (see documentation), or a comparison function of two arguments")))))
;;;###autoload ;;;###autoload

View file

@ -859,7 +859,12 @@ File: README.info, Node: 051-pre, Next: 05, Up: Changelog
5.1 0.5.1-pre 5.1 0.5.1-pre
============= =============
Nothing yet. *Fixed*
• Custom sorting functions could corrupt the cache, causing items to
disappear after refreshing an org-ql-search buffer. (#186
(https://github.com/alphapapa/org-ql/issues/186), #187
(https://github.com/alphapapa/org-ql/issues/187). Thanks to
Nathanael kinfe (https://github.com/natask).)
 
File: README.info, Node: 05, Next: 049, Prev: 051-pre, Up: Changelog File: README.info, Node: 05, Next: 049, Prev: 051-pre, Up: Changelog
@ -1373,29 +1378,29 @@ Node: Links29571
Node: Tips30258 Node: Tips30258
Node: Changelog30576 Node: Changelog30576
Node: 051-pre31275 Node: 051-pre31275
Node: 0531382 Node: 0531692
Node: 04932860 Node: 04933170
Node: 04833134 Node: 04833444
Node: 04733481 Node: 04733791
Node: 04633876 Node: 04634186
Node: 04534276 Node: 04534586
Node: 04434635 Node: 04434945
Node: 04334992 Node: 04335302
Node: 04235187 Node: 04235497
Node: 04135348 Node: 04135658
Node: 0435589 Node: 0435899
Node: 03239522 Node: 03239832
Node: 03139901 Node: 03140211
Node: 0340098 Node: 0340408
Node: 02343073 Node: 02343383
Node: 02243301 Node: 02243611
Node: 02143569 Node: 02143879
Node: 0243768 Node: 0244078
Node: 0147803 Node: 0148113
Node: Notes47904 Node: Notes48214
Node: Comparison with Org Agenda searches48066 Node: Comparison with Org Agenda searches48376
Node: org-sidebar48938 Node: org-sidebar49248
Node: License49217 Node: License49527
 
End Tag Table End Tag Table