Fix: (org-ql-query) Don't byte-compile compiled functions

This commit is contained in:
Adam Porter 2019-07-24 00:44:38 -05:00
parent 06c7f55b21
commit 3b9c474193

View file

@ -179,8 +179,13 @@ non-nil."
(user-error "Can't open file: %s" it))))))) (user-error "Can't open file: %s" it)))))))
((query preamble-re) (org-ql--query-preamble query)) ((query preamble-re) (org-ql--query-preamble query))
(predicate (org-ql--query-predicate query)) (predicate (org-ql--query-predicate query))
;; FIXME: Don't try to byte-compile already-compiled functions. (action (cl-etypecase action
(action (byte-compile action)) (symbol (unless (functionp action)
(user-error "Action not a function: %s" action))
action)
(function (byte-compile action))
(list (byte-compile `(lambda (&rest _ignore)
,action)))))
;; TODO: Figure out how to use or reimplement the org-scanner-tags feature. ;; TODO: Figure out how to use or reimplement the org-scanner-tags feature.
;; (org-use-tag-inheritance t) ;; (org-use-tag-inheritance t)
;; (org-trust-scanner-tags t) ;; (org-trust-scanner-tags t)