org-ql icon indicating copy to clipboard operation
org-ql copied to clipboard

Add :limit keyword support

Open alhassy opened this issue 6 months ago • 0 comments

Add a :limit parameter to the org-ql-select, org-ql-query, and org-ql-search family of functions, along with persistence and UI support in org-ql-view.

An example use case:

  ;; Use “g” to refresh and see 5 (new) random entries;
  ;; or press “v l 30 RET r” to view 30 entries.
  (org-ql-search 
    org-agenda-files
    '(tags "ConsumeContent")
    :title "Consume content that will make me happy"
    :limit 5
    :sort (lambda (x y) (pcase (random 3)
                     (0 nil)
                     (1 1)
                     (2 -1))))

This resolves https://github.com/alphapapa/org-ql/issues/326

alhassy avatar Jun 12 '25 00:06 alhassy