From e5e9daab0757b485df14e10fc52c2ace2c1abd3b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 9 Mar 2023 03:37:52 -0600 Subject: [PATCH] Fix: Aliases One of them seems to break on Emacs 26.3 only... --- org-ql-search.el | 9 +++------ org-ql.el | 3 +-- tests/test-org-ql.el | 5 +---- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index f2fd9534..cedcadb9 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -44,20 +44,17 @@ (cond ((fboundp 'org-link--normalize-string) #'org-link--normalize-string) ((fboundp 'org-link-heading-search-string) #'org-link-heading-search-string) ((fboundp 'org-make-org-heading-search-string) #'org-make-org-heading-search-string) - (t (warn "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. This may affect links in dynamic blocks. Please report this as a bug.") - #'identity))) + (t (error "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. This may affect links in dynamic blocks. Please report this as a bug")))) (defalias 'org-ql-search--org-make-link-string (cond ((fboundp 'org-link-make-string) #'org-link-make-string) ((fboundp 'org-make-link-string) #'org-make-link-string) - (t (warn "org-ql: Unable to define alias `org-ql-search--org-make-link-string'. Please report this as a bug.") - #'identity))) + (t (error "org-ql: Unable to define alias `org-ql-search--org-make-link-string'. Please report this as a bug")))) (defalias 'org-ql-search--org-link-store-props (cond ((fboundp 'org-link-store-props) #'org-link-store-props) ((fboundp 'org-store-link-props) #'org-store-link-props) - (t (warn "org-ql: Unable to define alias `org-ql-search--org-link-store-props'. Please report this as a bug.") - #'identity))) + (t (error "org-ql: Unable to define alias `org-ql-search--org-link-store-props'. Please report this as a bug")))) ;;;; Variables diff --git a/org-ql.el b/org-ql.el index 9bb05fd6..3c70b34e 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1351,8 +1351,7 @@ result form." ;; TODO: Remove when compatibility with Org 9.0 is dropped. (cond ((fboundp 'org-duration-to-minutes) #'org-duration-to-minutes) ((fboundp 'org-duration-string-to-minutes) #'org-duration-string-to-minutes) - (t (warn "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. Please report this as a bug.") - #'identity)) + (t (error "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. Please report this as a bug"))) "Return DURATION string as a number of minutes. For compatibility, since Org 9.1 deprecated `org-duration-string-to-minutes', replacing it with diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 3af35371..e6fc9092 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -201,10 +201,7 @@ with keyword arg NOW in PLIST." (insert "* Heading 1") ;; FIXME: `--value-at' does not actually move point, so we do it here. (goto-char (point-min)) - (expect (org-ql--value-at (point-min) - ;; TODO: Just use org-get-tags when requiring Org 9.2+. - (cond ((fboundp 'org-get-tags) #'org-get-tags) - ((fboundp 'org-get-local-tags) #'org-get-local-tags))) + (expect (org-ql--value-at (point-min) #'ignore) :to-be nil)))) (describe "Query pre-processing"