Tidy: Compatibility aliases for Org 9.6
This commit is contained in:
parent
b015b3b910
commit
09e7b60505
2 changed files with 19 additions and 3 deletions
|
|
@ -58,6 +58,16 @@
|
|||
((fboundp 'org-store-link-props) #'org-store-link-props)
|
||||
(t (error "org-ql: Unable to define alias `org-ql-search--org-link-store-props'. Please report this as a bug"))))
|
||||
|
||||
(defalias 'org-ql--org-hide-archived-subtrees
|
||||
(if (version<= "9.6" org-version)
|
||||
'org-fold-hide-archived-subtrees
|
||||
'org-hide-archived-subtrees))
|
||||
|
||||
(defalias 'org-ql--org-show-context
|
||||
(if (version<= "9.6" org-version)
|
||||
'org-fold-show-context
|
||||
'org-show-context))
|
||||
|
||||
;;;; Variables
|
||||
|
||||
(defvar org-ql-block-header nil
|
||||
|
|
@ -126,10 +136,10 @@ Runs `org-occur-hook' after making the sparse tree."
|
|||
query))))
|
||||
(org-ql-select buffer query
|
||||
:action (lambda ()
|
||||
(org-show-context 'occur-tree)
|
||||
(org-ql--org-show-context 'occur-tree)
|
||||
(cl-incf num-results)))
|
||||
(unless org-sparse-tree-open-archived-trees
|
||||
(org-hide-archived-subtrees (point-min) (point-max)))
|
||||
(org-ql--org-hide-archived-subtrees (point-min) (point-max)))
|
||||
(run-hooks 'org-occur-hook)
|
||||
(unless (get-buffer-window buffer)
|
||||
(pop-to-buffer buffer))
|
||||
|
|
|
|||
|
|
@ -96,6 +96,12 @@ Necessary because of backward-incompatible changes in Org
|
|||
`org-bracket-link-regexp' was marked as an obsolete alias for it,
|
||||
but the match groups were changed, so they are not compatible.")
|
||||
|
||||
;;;; Compatibility
|
||||
(defalias 'org-ql--org-timestamp-format
|
||||
(if (version<= "9.6" org-version)
|
||||
'org-format-timestamp
|
||||
'org-timestamp-format))
|
||||
|
||||
;;;; Variables
|
||||
|
||||
(defvar org-ql--today nil)
|
||||
|
|
@ -2478,7 +2484,7 @@ Deadline is considered before scheduled."
|
|||
A and B are Org timestamp elements."
|
||||
(cl-macrolet ((ts (ts)
|
||||
`(when ,ts
|
||||
(org-timestamp-format ,ts "%s"))))
|
||||
(org-ql--org-timestamp-format ,ts "%s"))))
|
||||
(let* ((a-ts (ts a))
|
||||
(b-ts (ts b)))
|
||||
(cond ((and a-ts b-ts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue