Tidy: Compilation warnings
This commit is contained in:
parent
d86a402ba5
commit
d21da3682b
9 changed files with 68 additions and 47 deletions
|
|
@ -559,6 +559,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
|
||||||
*Fixed*
|
*Fixed*
|
||||||
+ Predicate ~src~'s matching of begin/end block lines, normalization of arguments, and handling in non-sexp queries. (Thanks to [[https://github.com/akirak][Akira Komamura]] for reporting.)
|
+ Predicate ~src~'s matching of begin/end block lines, normalization of arguments, and handling in non-sexp queries. (Thanks to [[https://github.com/akirak][Akira Komamura]] for reporting.)
|
||||||
+ Predicate ~src~'s behavior with various arguments.
|
+ Predicate ~src~'s behavior with various arguments.
|
||||||
|
+ Various compilation warnings.
|
||||||
|
|
||||||
*Internal*
|
*Internal*
|
||||||
+ Certain query predicates, when called multiple times in an ~and~ sub-expression, are optimized to a single call.
|
+ Certain query predicates, when called multiple times in an ~and~ sub-expression, are optimized to a single call.
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ Based on `helm-map'.")
|
||||||
Interactively, search the current buffer. Note that this command
|
Interactively, search the current buffer. Note that this command
|
||||||
only accepts non-sexp, \"plain\" queries.
|
only accepts non-sexp, \"plain\" queries.
|
||||||
|
|
||||||
|
NAME is passed to `helm-org-ql-source', which see.
|
||||||
|
|
||||||
NOTE: Atoms in the query are turned into strings where
|
NOTE: Atoms in the query are turned into strings where
|
||||||
appropriate, which makes it unnecessary to type quotation marks
|
appropriate, which makes it unnecessary to type quotation marks
|
||||||
around words that are intended to be searched for as indepenent
|
around words that are intended to be searched for as indepenent
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ For an experience like `org-rifle', use a newline."
|
||||||
(cl-defun org-ql-completing-read (buffers-files &key query-prefix query-filter
|
(cl-defun org-ql-completing-read (buffers-files &key query-prefix query-filter
|
||||||
(prompt "Find entry: "))
|
(prompt "Find entry: "))
|
||||||
"Return marker at Org entry in BUFFERS-FILES selected with `org-ql'.
|
"Return marker at Org entry in BUFFERS-FILES selected with `org-ql'.
|
||||||
|
PROMPT is shown to the user.
|
||||||
|
|
||||||
QUERY-PREFIX may be a string to prepend to the query entered by
|
QUERY-PREFIX may be a string to prepend to the query entered by
|
||||||
the user (e.g. use \"heading:\" to only search headings, easily
|
the user (e.g. use \"heading:\" to only search headings, easily
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ See function `display-buffer'."
|
||||||
(prompt "Find entry: "))
|
(prompt "Find entry: "))
|
||||||
"Go to an Org entry in BUFFERS-FILES selected by searching entries with `org-ql'.
|
"Go to an Org entry in BUFFERS-FILES selected by searching entries with `org-ql'.
|
||||||
Interactively, with universal prefix, select multiple buffers to
|
Interactively, with universal prefix, select multiple buffers to
|
||||||
search with completion.
|
search with completion and PROMPT.
|
||||||
|
|
||||||
QUERY-PREFIX may be a string to prepend to the query (e.g. use
|
QUERY-PREFIX may be a string to prepend to the query (e.g. use
|
||||||
\"heading:\" to only search headings, easily creating a custom
|
\"heading:\" to only search headings, easily creating a custom
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,18 @@
|
||||||
(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 (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)))
|
#'identity)))
|
||||||
|
|
||||||
|
(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)))
|
||||||
|
|
||||||
|
(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)))
|
||||||
|
|
||||||
;;;; Variables
|
;;;; Variables
|
||||||
|
|
||||||
(defvar org-ql-block-header nil
|
(defvar org-ql-block-header nil
|
||||||
|
|
@ -138,7 +150,7 @@ SUPER-GROUPS: An `org-super-agenda' group set. See variable
|
||||||
selectors'.
|
selectors'.
|
||||||
|
|
||||||
NARROW: When non-nil, don't widen buffers before
|
NARROW: When non-nil, don't widen buffers before
|
||||||
searching. Interactively, with prefix, leave narrowed.
|
searching. Interactively, with prefix, leave narrowed.
|
||||||
|
|
||||||
SORT: One or a list of `org-ql' sorting functions, like `date' or
|
SORT: One or a list of `org-ql' sorting functions, like `date' or
|
||||||
`priority' (see Info node `(org-ql)Listing / acting-on results').
|
`priority' (see Info node `(org-ql)Listing / acting-on results').
|
||||||
|
|
@ -299,7 +311,7 @@ this (must be a single line in the Org buffer):
|
||||||
(cons 'heading (lambda (element)
|
(cons 'heading (lambda (element)
|
||||||
(let ((normalized-heading
|
(let ((normalized-heading
|
||||||
(org-ql-search--link-heading-search-string (org-element-property :raw-value element))))
|
(org-ql-search--link-heading-search-string (org-element-property :raw-value element))))
|
||||||
(org-make-link-string normalized-heading (org-link-display-format normalized-heading)))))
|
(org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading)))))
|
||||||
(cons 'priority (lambda (element)
|
(cons 'priority (lambda (element)
|
||||||
(--when-let (org-element-property :priority element)
|
(--when-let (org-element-property :priority element)
|
||||||
(char-to-string it))))
|
(char-to-string it))))
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
;; clearly is. It seems to not handle cl-defun, even though its code
|
;; clearly is. It seems to not handle cl-defun, even though its code
|
||||||
;; appears to account for it.
|
;; appears to account for it.
|
||||||
(declare-function org-ql-search "org-ql-search" t)
|
(declare-function org-ql-search "org-ql-search" t)
|
||||||
|
(declare-function org-ql-search--org-link-store-props "org-ql-search" t)
|
||||||
|
|
||||||
(require 'dash)
|
(require 'dash)
|
||||||
(require 's)
|
(require 's)
|
||||||
|
|
@ -288,7 +289,8 @@ TYPE may be `ts', `ts-active', `ts-inactive', `clocked', or
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(cl-defun org-ql-view-sidebar (&key (slot org-ql-view-list-slot))
|
(cl-defun org-ql-view-sidebar (&key (slot org-ql-view-list-slot))
|
||||||
"Show `org-ql-view' view list sidebar."
|
"Show `org-ql-view' view list sidebar.
|
||||||
|
SLOT is passed to `display-buffer-in-side-window', which see."
|
||||||
;; TODO: Update sidebar when `org-ql-views' changes.
|
;; TODO: Update sidebar when `org-ql-views' changes.
|
||||||
(interactive)
|
(interactive)
|
||||||
(select-window
|
(select-window
|
||||||
|
|
@ -688,8 +690,7 @@ When opened, the link searches the buffer it's opened from."
|
||||||
"?" (url-build-query-string (delete nil params))))
|
"?" (url-build-query-string (delete nil params))))
|
||||||
(url (url-recreate-url (url-parse-make-urlobj "org-ql-search" nil nil nil nil
|
(url (url-recreate-url (url-parse-make-urlobj "org-ql-search" nil nil nil nil
|
||||||
filename))))
|
filename))))
|
||||||
;; FIXME: "Warning: ‘org-store-link-props’ is an obsolete function (as of Org 9.3); use ‘org-link-store-props’ instead"
|
(org-ql-search--org-link-store-props
|
||||||
(org-store-link-props
|
|
||||||
:type "org-ql-search"
|
:type "org-ql-search"
|
||||||
:link url
|
:link url
|
||||||
:description (concat "org-ql-search: " org-ql-view-title))))
|
:description (concat "org-ql-search: " org-ql-view-title))))
|
||||||
|
|
|
||||||
21
org-ql.el
21
org-ql.el
|
|
@ -75,10 +75,10 @@ That is, \"CLOSED:\", \"DEADLINE:\", or \"SCHEDULED:\".")
|
||||||
Tags are stored in match group 1. Match group 2 stores the tags
|
Tags are stored in match group 1. Match group 2 stores the tags
|
||||||
without the enclosing colons.")
|
without the enclosing colons.")
|
||||||
|
|
||||||
(defconst org-ql-link-regexp
|
(defvaralias 'org-ql-link-regexp
|
||||||
(if (bound-and-true-p org-link-bracket-re)
|
(if (bound-and-true-p org-link-bracket-re)
|
||||||
org-link-bracket-re
|
'org-link-bracket-re
|
||||||
org-bracket-link-regexp)
|
'org-bracket-link-regexp)
|
||||||
"Regexp used to match Org bracket links.
|
"Regexp used to match Org bracket links.
|
||||||
Necessary because of changes in Org 9.something.")
|
Necessary because of changes in Org 9.something.")
|
||||||
|
|
||||||
|
|
@ -1347,18 +1347,17 @@ result form."
|
||||||
;; NOTE: This was a defsubst before being defined with the macro. Might be good to make it a defsubst again.
|
;; NOTE: This was a defsubst before being defined with the macro. Might be good to make it a defsubst again.
|
||||||
:body (or (apply #'org-ql--predicate-todo org-done-keywords)))
|
:body (or (apply #'org-ql--predicate-todo org-done-keywords)))
|
||||||
|
|
||||||
(defun org-ql--duration-to-minutes (duration)
|
(defalias 'org-ql--duration-to-minutes
|
||||||
|
;; 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))
|
||||||
"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
|
||||||
`org-duration-to-minutes', which seems to return floats instead
|
`org-duration-to-minutes', which seems to return floats instead
|
||||||
of integers."
|
of integers.")
|
||||||
;; FIXME: Define this as an alias instead.
|
|
||||||
;; MAYBE: Remove if compatibility with Org 9.0 is dropped.
|
|
||||||
(funcall (if (fboundp 'org-duration-to-minutes)
|
|
||||||
#'org-duration-to-minutes
|
|
||||||
#'org-duration-string-to-minutes)
|
|
||||||
duration))
|
|
||||||
|
|
||||||
(org-ql-defpred effort (&optional effort-or-comparator effort)
|
(org-ql-defpred effort (&optional effort-or-comparator effort)
|
||||||
"Return non-nil if current heading's effort property matches arguments.
|
"Return non-nil if current heading's effort property matches arguments.
|
||||||
|
|
|
||||||
59
org-ql.info
59
org-ql.info
|
|
@ -1052,6 +1052,7 @@ File: README.info, Node: 07-pre, Next: 063, Up: Changelog
|
||||||
of arguments, and handling in non-sexp queries. (Thanks to Akira
|
of arguments, and handling in non-sexp queries. (Thanks to Akira
|
||||||
Komamura (https://github.com/akirak) for reporting.)
|
Komamura (https://github.com/akirak) for reporting.)
|
||||||
• Predicate ‘src’’s behavior with various arguments.
|
• Predicate ‘src’’s behavior with various arguments.
|
||||||
|
• Various compilation warnings.
|
||||||
|
|
||||||
*Internal*
|
*Internal*
|
||||||
• Certain query predicates, when called multiple times in an ‘and’
|
• Certain query predicates, when called multiple times in an ‘and’
|
||||||
|
|
@ -1727,35 +1728,35 @@ Node: Links37140
|
||||||
Node: Tips37827
|
Node: Tips37827
|
||||||
Node: Changelog38151
|
Node: Changelog38151
|
||||||
Node: 07-pre38934
|
Node: 07-pre38934
|
||||||
Node: 06341399
|
Node: 06341436
|
||||||
Node: 06241934
|
Node: 06241971
|
||||||
Node: 06142239
|
Node: 06142276
|
||||||
Node: 0642807
|
Node: 0642844
|
||||||
Node: 05245861
|
Node: 05245898
|
||||||
Node: 05146161
|
Node: 05146198
|
||||||
Node: 0546584
|
Node: 0546621
|
||||||
Node: 04948113
|
Node: 04948150
|
||||||
Node: 04848393
|
Node: 04848430
|
||||||
Node: 04748742
|
Node: 04748779
|
||||||
Node: 04649151
|
Node: 04649188
|
||||||
Node: 04549559
|
Node: 04549596
|
||||||
Node: 04449920
|
Node: 04449957
|
||||||
Node: 04350279
|
Node: 04350316
|
||||||
Node: 04250482
|
Node: 04250519
|
||||||
Node: 04150643
|
Node: 04150680
|
||||||
Node: 0450890
|
Node: 0450927
|
||||||
Node: 03254991
|
Node: 03255028
|
||||||
Node: 03155394
|
Node: 03155431
|
||||||
Node: 0355591
|
Node: 0355628
|
||||||
Node: 02358891
|
Node: 02358928
|
||||||
Node: 02259125
|
Node: 02259162
|
||||||
Node: 02159405
|
Node: 02159442
|
||||||
Node: 0259610
|
Node: 0259647
|
||||||
Node: 0163688
|
Node: 0163725
|
||||||
Node: Notes63789
|
Node: Notes63826
|
||||||
Node: Comparison with Org Agenda searches63951
|
Node: Comparison with Org Agenda searches63988
|
||||||
Node: org-sidebar64840
|
Node: org-sidebar64877
|
||||||
Node: License65119
|
Node: License65156
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
(require 'with-simulated-input)
|
(require 'with-simulated-input)
|
||||||
|
|
||||||
(require 'org-ql)
|
(require 'org-ql)
|
||||||
|
(require 'org-ql-search)
|
||||||
(require 'org-ql-view)
|
(require 'org-ql-view)
|
||||||
|
|
||||||
;;;; Variables
|
;;;; Variables
|
||||||
|
|
@ -200,7 +201,10 @@ 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) #'org-get-local-tags)
|
(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)))
|
||||||
:to-be nil))))
|
:to-be nil))))
|
||||||
|
|
||||||
(describe "Query pre-processing"
|
(describe "Query pre-processing"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue