From 610b1179c67cc3e7d113492117f52e3ef19bae0a Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 22 Jan 2020 17:01:03 -0600 Subject: [PATCH] Add: (org-ql-view-sidebar-sort-views) --- README.org | 1 + org-ql-view.el | 8 +++++++- org-ql.info | 25 +++++++++++++------------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/README.org b/README.org index 31c820c..958ec15 100644 --- a/README.org +++ b/README.org @@ -399,6 +399,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience + Function ~helm-org-ql-source~, which returns a Helm source that searches given buffers/files with ~helm-org-ql~. It can be used for custom Helm commands that search certain files. + Display a message when views are refreshed. (Thanks to [[https://github.com/xeijin][xeijin]].) + Respect Org Agenda restriction in =org-ql-block=. (Thanks to [[https://github.com/yantar92][Ihor Radchenko]] for reporting.) ++ Option =org-ql-view-sidebar-sort-views=. *Fixed* + Inherit file tags when =org-tag-inheritance= is enabled. (Fixes [[https://github.com/alphapapa/org-ql/issues/55][#55]]. Thanks to [[https://github.com/mskorzhinskiy][Mikhail Skorzhinskiy]].) diff --git a/org-ql-view.el b/org-ql-view.el index c0a8207..54cde9b 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -115,6 +115,10 @@ See info node `(elisp)Cyclic Window Ordering'." "Side-window slot for Org QL Views list buffer." :type 'integer) +(defcustom org-ql-view-sidebar-sort-views nil + "Sort `org-ql-views' in `org-ql-view-sidebar'." + :type 'boolean) + (defcustom org-ql-views (list (cons "Recent entries" #'org-ql-view-recent-items) (cons "Review (to-do keyword without timestamp in past 2 weeks)" @@ -338,7 +342,9 @@ update search arguments." (erase-buffer) (->> org-ql-views (-map #'car) - (-sort #'string<) + (-sort (if org-ql-view-sidebar-sort-views + #'string< + #'ignore)) (s-join "\n") insert)) (current-buffer))) diff --git a/org-ql.info b/org-ql.info index fe8dacc..0e6f41f 100644 --- a/org-ql.info +++ b/org-ql.info @@ -725,6 +725,7 @@ File: README.info, Node: 04-pre, Next: 032, Up: Changelog (https://github.com/xeijin).) • Respect Org Agenda restriction in org-ql-block. (Thanks to Ihor Radchenko (https://github.com/yantar92) for reporting.) + • Option org-ql-view-sidebar-sort-views. *Fixed* • Inherit file tags when org-tag-inheritance is enabled. (Fixes #55 @@ -1033,18 +1034,18 @@ Node: Agenda-like views18025 Node: Listing / acting-on results19430 Node: Changelog24032 Node: 04-pre24569 -Node: 03226977 -Node: 03127358 -Node: 0327553 -Node: 02330526 -Node: 02230752 -Node: 02131018 -Node: 0231215 -Node: 0135248 -Node: Notes35347 -Node: Comparison with Org Agenda searches35509 -Node: org-sidebar36380 -Node: License36659 +Node: 03227023 +Node: 03127404 +Node: 0327599 +Node: 02330572 +Node: 02230798 +Node: 02131064 +Node: 0231261 +Node: 0135294 +Node: Notes35393 +Node: Comparison with Org Agenda searches35555 +Node: org-sidebar36426 +Node: License36705  End Tag Table