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

[FR] Limit or filter number of results from org-ql-search

Open SterlingHooten opened this issue 2 years ago • 2 comments

Is there a way to limit or "take" a number of results in org-ql-search? I see you can do this with an org-ql-block but I don't see this in the standard org-ql-search. I'm imagining a key like ":take".

I'm trying to implement the notion of "search for headings edited around the same time". All of my headings have a MODIFIED property which contains a timestamp. I want to be able to return a list (or org-sidebar buffer etc) with the 10 or 15 headings that were edited the closest in time before, and then also those closest and were edited after.

I can implement "all headings within some time delta" of a heading, which is useful, but not the same.

Thanks!

SterlingHooten avatar Jan 23 '23 19:01 SterlingHooten

This seems like a useful idea, and it wouldn't take much code to implement. Patches welcome, or I'll get around to it eventually. Thanks.

alphapapa avatar Jan 28 '23 16:01 alphapapa

Would this apply to the items in org ql views? I also recently thought it would be nice to limit these to have 10 items each to give a good overview. Plus I sort by (todo reverse) so any items with NEXT float to the top anyway.

ParetoOptimalDev avatar Mar 14 '24 17:03 ParetoOptimalDev