Commit graph

795 commits

Author SHA1 Message Date
Adam Porter
cc92fccb7f Test: Simplify with org-ql-expect macro 2019-08-08 17:07:25 -05:00
Adam Porter
00d9bbd85b Tests: Add makem.sh, update Makefile 2019-08-08 15:51:51 -05:00
Adam Porter
2dbe40d9ea Fix: (org-ql-select) Accept special forms and macros in action 2019-08-08 15:51:51 -05:00
Adam Porter
d9b7647f5b Meta: Add .gitignore 2019-08-08 15:51:51 -05:00
Adam Porter
4970d441cc Change: (org-ql-agenda--format-element) Return empty string if nil
This allows mapping the function across elements which may be nil,
helping to separate items in agenda views by inserting nil between
them.
2019-08-08 15:51:51 -05:00
Adam Porter
7829238988 Add: (org-ql-agenda--agenda) Optionally specify entries directly
Should probably refactor this a bit more, but this is useful now.
2019-08-08 15:51:51 -05:00
Adam Porter
43545482a4 Docs: Add example 2019-08-08 15:51:51 -05:00
Adam Porter
bd56652c66 Add: org-ql-block
Usable as an Org Agenda custom command block type.  Inspired by
@pestctrl's custom config:

84c557982a/config-org-new.org (my-own-agenda-renderer)
2019-08-08 15:51:51 -05:00
Adam Porter
d37f7c3eea Fix: (org-ql-agenda--agenda) Don't overwrite org-agenda-mode-map 2019-08-08 09:32:02 -05:00
Adam Porter
b7932063a0 Fix: (org-ql-agenda--format-element) Extra indentation 2019-08-08 08:30:53 -05:00
Adam Porter
c4531b25a4 Fix: Compound queries with preamble
Bug was introduced in b5ccc32.
2019-08-08 08:29:26 -05:00
Adam Porter
4db4e411a0 Tests: Fix function definer
Works correctly interactively now.
2019-08-08 08:28:40 -05:00
Adam Porter
7e5cb33031 Tests: Require buttercup
Makes it easier to run interactively by eval'ing the buffer.
2019-08-08 08:28:10 -05:00
Adam Porter
51af2a16a7 Tests: Turn on truncate-lines and add to comment 2019-07-26 16:39:29 -05:00
Adam Porter
f8a9ae75e2 Notes: Add MAYBE 2019-07-26 16:39:29 -05:00
Adam Porter
f8a5dc353d Comment: Add/improve some comments 2019-07-26 16:39:29 -05:00
Adam Porter
8a8b74f141 Add: (tags) Preamble and tests
Only enabled when org-use-tag-inheritance is enabled.
2019-07-26 16:39:29 -05:00
Adam Porter
5f60bed1ac Notes: Update bench macro 2019-07-26 16:39:29 -05:00
Adam Porter
cc5756d00d Add: (org-ql-agenda--header-line-format) Move code to new function 2019-07-26 16:39:29 -05:00
Adam Porter
b5ccc3294e Fix: (--select) Don't iterate over every heading with preamble
Oops, using "when" instead of "while" did outline-next-heading even
when re-search-forward found no more matches.  That unnecessarily
slowed down some searches, negating almost all of the gains.
2019-07-26 16:39:29 -05:00
Adam Porter
81ef7adbca Tests: Change description 2019-07-26 16:39:29 -05:00
Adam Porter
290e25509b Tests: Use org-ql-it in more tests 2019-07-26 16:39:29 -05:00
Adam Porter
3a9b32002e Docs: Clarify changelog entries 2019-07-26 16:39:27 -05:00
Adam Porter
70176d9c5f Add: Convert bare strings to (regexp) predicates 2019-07-26 16:38:54 -05:00
Adam Porter
7c4297b667 Add/Change: (org-ql-select, org-ql-query) Add/rename function
Also improve docstrings.
2019-07-26 16:38:53 -05:00
Adam Porter
3b9c474193 Fix: (org-ql-query) Don't byte-compile compiled functions 2019-07-24 00:47:43 -05:00
Adam Porter
06c7f55b21 Change: (--query-preamble) Simplify 2019-07-23 23:55:49 -05:00
Adam Porter
6728ddaaa7 Change: (--query-preamble) Simplify (todo) preamble 2019-07-23 23:55:49 -05:00
Adam Porter
76ba0afebd Comment: Add FIXME 2019-07-23 23:55:49 -05:00
Adam Porter
c19cc4d6d2 Docs: (README.org) Remove Predicates from ToC 2019-07-23 23:55:49 -05:00
Adam Porter
bdf473356d Change: Improve level predicate
Now accepts e.g. (level 2 4) to match headings from levels 2-4,
inclusive.

Also add tests for (level) preamble conversion.
2019-07-23 23:55:49 -05:00
Adam Porter
99b38d131e Tests: Add org-ql-it macro
Tests with and without preamble, ensuring they give the same results.
Very important.  And macros make this so easy to do.
2019-07-23 19:03:33 -05:00
Adam Porter
dbb94ff3b8 Tests: Use xr to help format test results 2019-07-23 19:01:16 -05:00
Adam Porter
ad6624d9ae Comment: Add FIXME 2019-07-22 14:42:46 -05:00
Adam Porter
797798bd08 Change: (org-ql-query) Accept comparator function to :sort 2019-07-21 17:21:48 -05:00
Adam Porter
88ba3d3933 Docs: (org-ql) Improve docstring 2019-07-21 17:21:17 -05:00
Adam Porter
3133c4f33b Change: (org-ql-query) Simplify 2019-07-20 23:20:06 -05:00
Adam Porter
ac402e33c7 Add/Change: (--query-predicate) Move code to new function 2019-07-20 23:11:17 -05:00
Adam Porter
2b0730d53b Comment: Add FIXME 2019-07-20 23:11:07 -05:00
Adam Porter
a56d173eb5 Change: (--query-preamble) Use pcase for clarity 2019-07-20 22:57:58 -05:00
Adam Porter
0fdfa65bef Change: (--query-preamble) Add (level) preamble 2019-07-20 18:17:17 -05:00
Adam Porter
b1b04b3f19 Docs: Add badges 2019-07-20 17:42:56 -05:00
Adam Porter
f6d2d1e537 Fix: Use org-timestamp-to-time everywhere
These changes should have been in adcb96c.

Thanks to Chris Rayner (@riscy) for noticing this omission.
2019-07-20 10:16:16 -05:00
Adam Porter
c31f873625 Fix: Define own get-tags function for compatibility
In Org <9.2, both org-get-tags and org-get-tags-at are functions, and
we must not clobber org-get-tags.  In Org 9.2+, org-get-tags replaces
org-get-tags-at, but org-get-tags-at remains defined as an obsolete
alias.

Thanks to Chris Rayner (@riscy).
2019-07-18 01:20:25 -05:00
Adam Porter
25f964dfcb Fix: (--date-type-p) Handle ranges
I meant to do this in c5599a6, but I omitted the range type symbol
when I rewrote the selector and functions.  This should work now.

Thanks to @codygman, @swflint, and @vikasrawal.
2019-07-17 12:08:58 -05:00
Adam Porter
25ed67a37d Change: (--date-type-p) More detailed error for unknown date types 2019-07-17 11:53:51 -05:00
Adam Porter
f39e752db3 Tidy: http->https 2019-07-17 09:23:41 -05:00
Adam Porter
2a40b18007 Fix: (org-ql-search) Space ending prompt string 2019-07-17 09:22:08 -05:00
Adam Porter
3e9f3276c0 Fix: Sharp-quote alias targets 2019-07-17 09:22:01 -05:00
Adam Porter
8a8f78408c Fix: Declare org-super-agenda as ext 2019-07-17 09:20:53 -05:00