Fix: Aliases

One of them seems to break on Emacs 26.3 only...
This commit is contained in:
Adam Porter 2023-03-09 03:37:52 -06:00
parent d21da3682b
commit e5e9daab07
3 changed files with 5 additions and 12 deletions

View file

@ -44,20 +44,17 @@
(cond ((fboundp 'org-link--normalize-string) #'org-link--normalize-string) (cond ((fboundp 'org-link--normalize-string) #'org-link--normalize-string)
((fboundp 'org-link-heading-search-string) #'org-link-heading-search-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) ((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.") (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"))))
#'identity)))
(defalias 'org-ql-search--org-make-link-string (defalias 'org-ql-search--org-make-link-string
(cond ((fboundp 'org-link-make-string) #'org-link-make-string) (cond ((fboundp 'org-link-make-string) #'org-link-make-string)
((fboundp 'org-make-link-string) #'org-make-link-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.") (t (error "org-ql: Unable to define alias `org-ql-search--org-make-link-string'. Please report this as a bug"))))
#'identity)))
(defalias 'org-ql-search--org-link-store-props (defalias 'org-ql-search--org-link-store-props
(cond ((fboundp 'org-link-store-props) #'org-link-store-props) (cond ((fboundp 'org-link-store-props) #'org-link-store-props)
((fboundp 'org-store-link-props) #'org-store-link-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.") (t (error "org-ql: Unable to define alias `org-ql-search--org-link-store-props'. Please report this as a bug"))))
#'identity)))
;;;; Variables ;;;; Variables

View file

@ -1351,8 +1351,7 @@ result form."
;; TODO: Remove when compatibility with Org 9.0 is dropped. ;; TODO: Remove when compatibility with Org 9.0 is dropped.
(cond ((fboundp 'org-duration-to-minutes) #'org-duration-to-minutes) (cond ((fboundp 'org-duration-to-minutes) #'org-duration-to-minutes)
((fboundp 'org-duration-string-to-minutes) #'org-duration-string-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.") (t (error "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. Please report this as a bug")))
#'identity))
"Return DURATION string as a number of minutes. "Return DURATION string as a number of minutes.
For compatibility, since Org 9.1 deprecated For compatibility, since Org 9.1 deprecated
`org-duration-string-to-minutes', replacing it with `org-duration-string-to-minutes', replacing it with

View file

@ -201,10 +201,7 @@ with keyword arg NOW in PLIST."
(insert "* Heading 1") (insert "* Heading 1")
;; FIXME: `--value-at' does not actually move point, so we do it here. ;; FIXME: `--value-at' does not actually move point, so we do it here.
(goto-char (point-min)) (goto-char (point-min))
(expect (org-ql--value-at (point-min) (expect (org-ql--value-at (point-min) #'ignore)
;; 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)))
:to-be nil)))) :to-be nil))))
(describe "Query pre-processing" (describe "Query pre-processing"