From dc32dcdaaac4a8a311e5b4f07faf748abbf1b674 Mon Sep 17 00:00:00 2001 From: savnkk_manjaro <39103342+natask@users.noreply.github.com> Date: Tue, 2 Feb 2021 19:25:29 -0800 Subject: [PATCH 1/2] Fix: (org-ql-select) Use -sort instead of sort Fixes #186. --- org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-ql.el b/org-ql.el index b46d458..48b823d 100644 --- a/org-ql.el +++ b/org-ql.el @@ -292,7 +292,7 @@ returns nil or non-nil." ;; Default sorting functions (org-ql--sort-by items (-list sort))) ;; 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"))))) ;;;###autoload From 628fce8f134b8a776043e820f4d782b609e5c105 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 8 Jun 2021 11:06:54 -0500 Subject: [PATCH 2/2] Docs: Update changelog --- README.org | 3 ++- org-ql.info | 53 +++++++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/README.org b/README.org index 9da0746..325840b 100644 --- a/README.org +++ b/README.org @@ -463,7 +463,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 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 diff --git a/org-ql.info b/org-ql.info index 7c8cd1c..dbfc6a9 100644 --- a/org-ql.info +++ b/org-ql.info @@ -859,7 +859,12 @@ File: README.info, Node: 051-pre, Next: 05, Up: Changelog 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 @@ -1373,29 +1378,29 @@ Node: Links29571 Node: Tips30258 Node: Changelog30576 Node: 051-pre31275 -Node: 0531382 -Node: 04932860 -Node: 04833134 -Node: 04733481 -Node: 04633876 -Node: 04534276 -Node: 04434635 -Node: 04334992 -Node: 04235187 -Node: 04135348 -Node: 0435589 -Node: 03239522 -Node: 03139901 -Node: 0340098 -Node: 02343073 -Node: 02243301 -Node: 02143569 -Node: 0243768 -Node: 0147803 -Node: Notes47904 -Node: Comparison with Org Agenda searches48066 -Node: org-sidebar48938 -Node: License49217 +Node: 0531692 +Node: 04933170 +Node: 04833444 +Node: 04733791 +Node: 04634186 +Node: 04534586 +Node: 04434945 +Node: 04335302 +Node: 04235497 +Node: 04135658 +Node: 0435899 +Node: 03239832 +Node: 03140211 +Node: 0340408 +Node: 02343383 +Node: 02243611 +Node: 02143879 +Node: 0244078 +Node: 0148113 +Node: Notes48214 +Node: Comparison with Org Agenda searches48376 +Node: org-sidebar49248 +Node: License49527  End Tag Table