Skip to content

Commit f2eac64

Browse files
committed
Fix: Add autoloads
Fixes #36. Thanks to Akira Komamura (@akirak).
1 parent 42947aa commit f2eac64

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.org

+4
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
442442
/Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases.
443443

444444
** 0.2-pre
445+
:PROPERTIES:
446+
:ID: 67be09f9-e959-4333-9be2-93ad8f458fbe
447+
:END:
445448

446449
*Added*
447450
+ Function ~org-ql-query~, like ~org-ql-select~ but with arguments named more like a SQL query.
@@ -478,6 +481,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
478481
+ Don't search hidden/special buffers.
479482
+ Properly accept arbitrary sort functions in =org-ql-select=, etc. (Fixes [[https://github.com/alphapapa/org-ql/issues/37][#37]]. Thanks to [[https://github.com/mz-pdm][Milan Zamazal]].)
480483
+ Planning-line-related predicates searched too far into entries.
484+
+ Add autoloads. (Fixes [[https://github.com/alphapapa/org-ql/pull/36/files#][#36]]. Thanks to [[https://github.com/akirak][Akira Komamura]].)
481485

482486
*Compatibility*
483487
+ Fixes for compatibility with Org 9.2. (Thanks to [[https://github.com/ataias][Ataias Pereira Reis]] and [[https://github.com/dakra][Daniel Kraus]].)

org-ql-agenda.el

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ e.g. `org-ql-search' as desired."
120120

121121
;; TODO: DRY these two macros.
122122

123+
;;;###autoload
123124
(cl-defmacro org-ql-agenda (&rest args)
124125
"Display an agenda-like buffer of entries in FILES that match QUERY.
125126
@@ -286,11 +287,13 @@ TITLE: An optional string displayed in the header."
286287
(customize-set-variable 'org-ql-views org-ql-views)
287288
(customize-mark-to-save 'org-ql-views)))
288289

290+
;;;###autoload
289291
(defun org-ql-view (&optional view)
290292
"Choose and display a view stored in `org-ql-views'."
291293
(interactive (list (completing-read "View: " (mapcar #'car org-ql-views))))
292294
(call-interactively (alist-get view org-ql-views nil nil #'string=)))
293295

296+
;;;###autoload
294297
(cl-defun org-ql-view-recent-items
295298
(&key days type
296299
(files (org-agenda-files))
@@ -392,6 +395,7 @@ after the block."
392395
insert)
393396
(insert "\n")))
394397

398+
;;;###autoload
395399
(defalias 'org-ql-block 'org-ql-agenda-block)
396400

397401
(defun org-ql-agenda--header-line-format (buffers-files query &optional title)

org-ql.el

+3
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ match."
120120
(push (list :name ',pred-name :fn ',fn-name :docstring ,docstring :args ',args) org-ql-predicates)
121121
(cl-defun ,fn-name ,args ,docstring ,@body))))
122122

123+
;;;###autoload
123124
(cl-defmacro org-ql (buffers-or-files query &key sort narrow action)
124125
"Expands into a call to `org-ql-select' with the same arguments.
125126
For convenience, arguments should be unquoted."
@@ -135,6 +136,7 @@ For convenience, arguments should be unquoted."
135136
(define-hash-table-test 'org-ql-hash-test #'equal (lambda (args)
136137
(sxhash-equal (prin1-to-string args))))
137138

139+
;;;###autoload
138140
(cl-defun org-ql-select (buffers-or-files query &key action narrow sort)
139141
"Return items matching QUERY in BUFFERS-OR-FILES.
140142
@@ -226,6 +228,7 @@ returns nil or non-nil."
226228
((pred functionp) (sort items sort))
227229
(_ (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")))))
228230

231+
;;;###autoload
229232
(cl-defun org-ql-query (&key (select 'element-with-markers) from where narrow order-by)
230233
"Like `org-ql-select', but arguments are named more like a SQL query.
231234

0 commit comments

Comments
 (0)