Compare commits

...
Sign in to create a new pull request.

41 commits

Author SHA1 Message Date
Jiri Jakes
ed23480e4b Apply #459
Some checks failed
CI / build (27.1) (push) Has been cancelled
CI / build (27.2) (push) Has been cancelled
CI / build (28.1) (push) Has been cancelled
CI / build (28.2) (push) Has been cancelled
CI / build (29.1) (push) Has been cancelled
CI / build (29.2) (push) Has been cancelled
CI / build (29.3) (push) Has been cancelled
CI / build (29.4) (push) Has been cancelled
CI / build (snapshot) (push) Has been cancelled
2026-08-17 19:55:50 +08:00
Adam Porter
4b8330a683
Merge pull request #491 from alhassy/master
Docs: Remove grammatical typo from “org-ql-search-block”
2025-04-20 20:33:00 -05:00
Musa Al-hassy
9946299bec Docs: Remove grammatical typo from “org-ql-search-block” 2025-04-20 07:50:43 -04:00
Adam Porter
98c62ab0a6 Docs: Fix some predicate arguments
Reported-by: Trevoke <https://github.com/Trevoke>
2024-11-25 17:49:54 -06:00
Adam Porter
a5650e2be8 Merge: v0.8.10 2024-11-06 21:45:09 -06:00
Adam Porter
b6f8a315e9 Fix: (org-ql-view--format-element) Font-lock Org syntax
Not sure why I overlooked this for so long (links already worked,
which is probably why).
2024-09-16 18:25:02 -05:00
Adam Porter
fff110acde Fix: (org-ql-refile) Use base buffer
Should probably release this in a v0.8.10.

See #466.
2024-09-16 13:42:17 -05:00
Adam Porter
d574b60551 Add: (defface org-ql-view-query) 2024-09-11 01:50:16 -05:00
Adam Porter
82f762e31c Add: (org-ql-view-relative-deadline-prefix) 2024-09-11 01:01:30 -05:00
Adam Porter
a3c0205a68 Fix: (defface org-ql-view-due-date) Customization group 2024-09-10 22:38:19 -05:00
Adam Porter
1c8c89f264 Add: (defface org-ql-view-title) Use in -view--header-line-format
Note that we also add a safety check in ORG-QL-VIEW--LINK-FOLLOW,
because the addition of a call to PROPERTIZE in
ORG-QL-VIEW--HEADER-LINE-FORMAT effectively removes what was
functioning as a safety check there (as CONCAT had been signaling an
error for the unsafe argument, whereas PROPERTIZE, which is called to
apply the new face, does not).  We also change the expected error in
the tests accordingly.
2024-09-10 22:37:19 -05:00
Adam Porter
c3519fb4a0 Merge: v0.8.9 2024-09-05 18:58:13 -05:00
Adam Porter
831a1d4736 Tests: Fix filenames for CI (better)
This is much simpler.
2024-09-04 21:47:53 -05:00
Adam Porter
f72feb8018 Revert "Tests: Fix filename tests for CI"
This reverts commit 611198155d.
2024-09-04 21:40:36 -05:00
Adam Porter
fcb4e3ee62 Merge: v0.8.8 2024-08-29 16:38:58 -05:00
Adam Porter
b0cb7618e9 Merge: Respect narrowing in org-ql-find 2024-08-26 07:19:18 -05:00
Adam Porter
cfe5300987 Docs: Update changelog 2024-08-26 07:19:09 -05:00
Adam Porter
ba49d0e3c7 Change: Respect narrowing in org-ql-find
This allows searching within a narrowed buffer with org-ql-find.
Using "C-u" searches the widened buffer, while "C-u C-u" prompts to
select the buffers to search (which previously worked with just
"C-u").
2024-08-26 07:14:31 -05:00
Adam Porter
b7d4856f92 Fix: (org-ql--define-query-preamble-fn) Pcase pattern for Emacs 30
Now all tests and lints pass on Emacs versions 27.1-29.4.  But on the
current Emacs snapshot build used in CI, Buttercup is hanging
indefinitely, which may be the same problem that led Guix to disable
the tests in
<https://git.savannah.gnu.org/cgit/guix.git/commit/gnu/packages/emacs-xyz.scm?id=3add97c7761e6c58a1d7405f417a49dda5f0a742>.
But I've no way of knowing whether that's a problem in org-ql (seems
unlikely), Emacs snapshot, or Buttercup.  It would be nice to solve
this before Emacs 30.1 is released, but I don't know how to peer
inside Buttercup to find out what it's hanging on.

Fixes #433.

Reported-by: Akira Komamura <akira.komamura@gmail.com>
Co-developed-by: Stefan Monnier <monnier@iro.umontreal.ca>
2024-06-27 09:32:34 -05:00
Adam Porter
611198155d Tests: Fix filename tests for CI
As the comment says, in CI the filenames are being abbreviated, which
I can't explain (it has not always been this way).  So we compare them
in abbreviated form.
2024-06-27 08:03:04 -05:00
Adam Porter
a8608f408b Fix/Meta: (makem.sh) Update to v0.7.1
This omits the obsolete Org ELPA repository, which apparently was
causing a very old version of Org to be installed, which appeared to
be causing Buttercup to inexplicably hang (sometimes, on some systems,
in some circumstances...?).

I don't know if this is related to Guix commit
<https://git.savannah.gnu.org/cgit/guix.git/commit/gnu/packages/emacs-xyz.scm?id=3add97c7761e6c58a1d7405f417a49dda5f0a742>,
which disables the tests due to Buttercup hanging, because Guix is not
running the tests through makem.sh.
2024-06-27 07:44:10 -05:00
Adam Porter
bfb0fbeec1 Tests: Declare requirement on xr
This was overlooked because makem.sh gets run with --install-linters,
which installs relint, which depends on xr.
2024-06-27 07:41:16 -05:00
Adam Porter
ccbd5b4594 Meta: (test.yml) Also test on Emacs 29.1-29.4 2024-06-27 07:02:09 -05:00
Adam Porter
d4faa21640 Fix: (data-ts.org) French day-of-week abbreviation
The test data in v0.8.7 was accidentally changed to the English
abbreviation (the perils of working on systems with differing
locales), but the feature works as intended.

See <ffc3477013 (r143566834)>.
2024-06-26 12:01:32 -05:00
Adam Porter
f24d93f038 Merge: v0.8.7 2024-06-26 11:32:45 -05:00
Adam Porter
5ef4364d0a Tidy: Compiler warnings 2024-06-22 05:00:03 -05:00
Adam Porter
d5269bb5e2 Comment: Add FIXME 2024-06-12 23:45:43 -05:00
Adam Porter
e9d08ca344 Tidy: (org-ql-defpred) Docstring
This does not solve the compilation warning, because that's caused by
the Pcase patterns at the end of the docstring, which the linter
falsely identifies as incorrect.
2024-06-12 23:33:36 -05:00
Adam Porter
f7c3a61e32 Fix: (helm-org-ql [v0.6.2]) Compilation warnings 2024-06-12 22:55:29 -05:00
Adam Porter
0f01f0a9d8 Tidy: Compilation warnings 2024-06-12 22:47:33 -05:00
Adam Porter
c9370982bf Merge: v0.8.6 2024-04-03 15:27:29 -05:00
Adam Porter
e41fe9018a Docs: Add development section 2024-02-21 20:00:39 -06:00
Adam Porter
f5cda3d127 Merge: v0.8.5 2024-02-21 05:47:17 -06:00
Adam Porter
8d3c93b883 Tidy: Compiler warning
I've no explanation for why this isn't caught by makem.sh's linting
compilation and declarations, but somehow it shows up at installation
time.
2024-01-13 00:47:47 -06:00
Adam Porter
9c63a45821 Meta: Update makem.sh 2024-01-13 00:47:35 -06:00
Adam Porter
a305862d7e Merge: v0.8.4 2024-01-13 00:04:27 -06:00
Adam Porter
6679bdea00 Merge: v0.8.3 2024-01-10 01:56:57 -06:00
Adam Porter
5b0026260a Merge: v0.8.2 2024-01-09 02:28:19 -06:00
Adam Porter
39394c831a Merge: v0.8.1 2024-01-03 18:49:09 -06:00
Adam Porter
a4bf5b0a92 Tidy: (org-ql-view--display) Take STRINGS instead of STRING
No need to allocate one large string just to insert it into the
buffer.
2023-12-24 01:10:27 -06:00
Adam Porter
0e39372146 Meta: v0.9-pre 2023-12-24 01:09:49 -06:00
11 changed files with 445 additions and 211 deletions

View file

@ -19,6 +19,7 @@ It includes three libraries: The =org-ql= library is flexible and may be used as
- [[#installation][Installation]] - [[#installation][Installation]]
- [[#usage][Usage]] - [[#usage][Usage]]
- [[#changelog][Changelog]] - [[#changelog][Changelog]]
- [[#development][Development]]
:END: :END:
@ -232,7 +233,7 @@ Note that the =effort=, =level=, and =priority= predicates do not support compar
Arguments are listed next to predicate names, where applicable. Arguments are listed next to predicate names, where applicable.
+ =blocked= :: Return non-nil if current heading is blocked. Calls ~org-entry-blocked-p~, which see. + =blocked= :: Return non-nil if current heading is blocked. Calls ~org-entry-blocked-p~, which see.
+ =category (&optional categories)= :: Return non-nil if current heading is in one or more of ~CATEGORIES~ (a list of strings). + =category (&rest categories)= :: Return non-nil if current heading is in one or more of ~CATEGORIES~ (a list of strings).
+ =done= :: Return non-nil if entry's ~TODO~ keyword is in ~org-done-keywords~. + =done= :: Return non-nil if entry's ~TODO~ keyword is in ~org-done-keywords~.
+ =effort (&optional effort-or-comparator effort)= :: Return non-nil if current heading's effort property matches arguments. The following forms are accepted: ~(effort DURATION)~: Matches if effort is ~DURATION~. ~(effort DURATION DURATION)~: Matches if effort is between DURATIONs, inclusive. ~(effort COMPARATOR DURATION)~: Matches if effort compares to ~DURATION~ with ~COMPARATOR~. ~COMPARATOR~ may be ~<~, ~<=~, ~>~, or ~>=~. ~DURATION~ should be an Org effort string, like =5= or =0:05=. + =effort (&optional effort-or-comparator effort)= :: Return non-nil if current heading's effort property matches arguments. The following forms are accepted: ~(effort DURATION)~: Matches if effort is ~DURATION~. ~(effort DURATION DURATION)~: Matches if effort is between DURATIONs, inclusive. ~(effort COMPARATOR DURATION)~: Matches if effort compares to ~DURATION~ with ~COMPARATOR~. ~COMPARATOR~ may be ~<~, ~<=~, ~>~, or ~>=~. ~DURATION~ should be an Org effort string, like =5= or =0:05=.
+ =habit= :: Return non-nil if entry is a habit. + =habit= :: Return non-nil if entry is a habit.
@ -255,16 +256,16 @@ Arguments are listed next to predicate names, where applicable.
- Aliases: ~smart~. - Aliases: ~smart~.
- *Note:* By default, this is the default predicate used for plain-string query tokens (i.e. given without a specified predicate). This can be customized with the option ~org-ql-default-predicate~. - *Note:* By default, this is the default predicate used for plain-string query tokens (i.e. given without a specified predicate). This can be customized with the option ~org-ql-default-predicate~.
+ ~src (&key lang regexps)~ :: Return non-nil if current entry contains an Org Babel source block. If ~LANG~ is non-nil, match blocks of that language. If ~REGEXPS~ is non-nil, require that block's contents match all regexps. Matching is done case-insensitively. + ~src (&key lang regexps)~ :: Return non-nil if current entry contains an Org Babel source block. If ~LANG~ is non-nil, match blocks of that language. If ~REGEXPS~ is non-nil, require that block's contents match all regexps. Matching is done case-insensitively.
+ =tags (&optional tags)= :: Return non-nil if current heading has one or more of ~TAGS~ (a list of strings). Tests both inherited and local tags. + =tags (&rest tags)= :: Return non-nil if current heading has one or more of ~TAGS~ (a list of strings). Tests both inherited and local tags.
+ =tags-inherited (&optional tags)= :: Return non-nil if current heading's inherited tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any inherited tags. + =tags-inherited (&rest tags)= :: Return non-nil if current heading's inherited tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any inherited tags.
- Aliases: ~inherited-tags~, ~tags-i~, ~itags~. - Aliases: ~inherited-tags~, ~tags-i~, ~itags~.
+ =tags-local (&optional tags)= :: Return non-nil if current heading's local tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any local tags. + =tags-local (&rest tags)= :: Return non-nil if current heading's local tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any local tags.
- Aliases: ~local-tags~, ~tags-l~, ~ltags~. - Aliases: ~local-tags~, ~tags-l~, ~ltags~.
+ =tags-all (tags)= :: Return non-nil if current heading includes all of ~TAGS~. Tests both inherited and local tags. + =tags-all (&rest tags)= :: Return non-nil if current heading includes all of ~TAGS~. Tests both inherited and local tags.
- Aliases: ~tags&~. - Aliases: ~tags&~.
+ =tags-regexp (&rest regexps)= :: Return non-nil if current heading has tags matching one or more of ~REGEXPS~. Tests both inherited and local tags. + =tags-regexp (&rest regexps)= :: Return non-nil if current heading has tags matching one or more of ~REGEXPS~. Tests both inherited and local tags.
- Aliases: ~tags*~. - Aliases: ~tags*~.
+ =todo (&optional keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~). + =todo (&rest keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~).
*** Ancestor/descendant predicates *** Ancestor/descendant predicates
@ -553,6 +554,25 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
/Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases.
** 0.9-pre
*Additions*
+ Face ~org-ql-view-query~, applied to view queries in header line.
+ Face ~org-ql-view-title~, applied to view titles in header line.
+ Option ~org-ql-view-relative-deadline-prefix~.
*Changes*
+ Command ~org-ql-find~ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ~C-u~ argument widens the current buffer, and using two ~C-u~ arguments prompts for the buffers to search.)
+ Function ~org-ql-completing-read~ accepts a new ~NARROWP~ argument, which is passed to ~org-ql-select~.
*Fixes*
+ Customization group for face ~org-ql-view-due-date~.
+ Apply Org syntax font-locking to items in ~org-ql-view~ buffers.
*** helm-org-ql
Tagged v0.6.2, fixing a compilation warning.
** 0.8.10 ** 0.8.10
*Fixes* *Fixes*
@ -983,6 +1003,14 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
First tagged release. First tagged release.
* Development
Bug reports, feature requests, and suggestions are welcome. For patches, see below.
** Copyright assignment
While Org QL is currently distributed in MELPA, it's [[https://github.com/alphapapa/org-ql/issues/409][intended]] to merge Org QL into Org mode. When that happens, it will become a part of Emacs and Org, and therefore cumulative contributions of more than 15 lines of code will require that the author assign copyright of such contributions to the FSF. Authors who are interested in doing so may contact [[mailto:assign@gnu.org][assign@gnu.org]] to request the appropriate form.
* Notes * Notes
:PROPERTIES: :PROPERTIES:
:TOC: :ignore this :TOC: :ignore this

View file

@ -2,8 +2,8 @@
;; Author: Adam Porter <adam@alphapapa.net> ;; Author: Adam Porter <adam@alphapapa.net>
;; URL: https://github.com/alphapapa/org-ql ;; URL: https://github.com/alphapapa/org-ql
;; Version: 0.6.1 ;; Version: 0.6.2
;; Package-Requires: ((emacs "26.1") (dash "2.18.1") (s "1.12.0") (helm-org "1.0") (org-ql "0.6-pre")) ;; Package-Requires: ((emacs "26.1") (compat "29.1.4.5") (dash "2.18.1") (s "1.12.0") (helm-org "1.0") (org-ql "0.6-pre"))
;;; Commentary: ;;; Commentary:
@ -35,6 +35,7 @@
(require 'cl-lib) (require 'cl-lib)
(require 'org) (require 'org)
(require 'compat)
(require 'dash) (require 'dash)
(require 's) (require 's)
@ -44,6 +45,15 @@
(require 'org-ql) (require 'org-ql)
(require 'org-ql-search) (require 'org-ql-search)
(declare-function org-ql--normalize-query "org-ql" t t)
;;;; Compatibility
(defalias 'helm-org-ql--show-entry
(if (version< org-version "9.6")
'org-show-entry
'org-fold-show-entry))
;;;; Variables ;;;; Variables
(defvar helm-org-ql-map (defvar helm-org-ql-map
@ -102,7 +112,7 @@ 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 independent
strings. strings.
All query tokens are wrapped in the operator BOOLEAN (default All query tokens are wrapped in the operator BOOLEAN (default
@ -151,7 +161,7 @@ Is transformed into this query:
;; it to go to the previous heading. I don't know why it does that. ;; it to go to the previous heading. I don't know why it does that.
(switch-to-buffer (marker-buffer marker)) (switch-to-buffer (marker-buffer marker))
(goto-char marker) (goto-char marker)
(org-show-entry)) (helm-org-ql--show-entry))
(defun helm-org-ql-show-marker-indirect (marker) (defun helm-org-ql-show-marker-indirect (marker)
"Show heading at MARKER with `org-tree-to-indirect-buffer'." "Show heading at MARKER with `org-tree-to-indirect-buffer'."
@ -177,7 +187,7 @@ Is transformed into this query:
;;;###autoload ;;;###autoload
(cl-defun helm-org-ql-source (buffers-files &key (name "helm-org-ql")) (cl-defun helm-org-ql-source (buffers-files &key (name "helm-org-ql"))
"Return Helm source named NAME that searches BUFFERS-FILES with `helm-org-ql'." "Return Helm source named NAME to search BUFFERS-FILES with `helm-org-ql'."
;; Expansion of `helm-build-sync-source' macro. ;; Expansion of `helm-build-sync-source' macro.
(helm-make-source name 'helm-source-sync (helm-make-source name 'helm-source-sync
:candidates (lambda () :candidates (lambda ()
@ -201,7 +211,7 @@ Is transformed into this query:
(defun helm-org-ql--heading (window-width) (defun helm-org-ql--heading (window-width)
"Return string for Helm for heading at point. "Return string for Helm for heading at point.
WINDOW-WIDTH should be the width of the Helm window." WINDOW-WIDTH should be the width of the Helm window."
(font-lock-ensure (point-at-bol) (point-at-eol)) (font-lock-ensure (pos-bol) (pos-eol))
;; TODO: It would be better to avoid calculating the prefix and width ;; TODO: It would be better to avoid calculating the prefix and width
;; at each heading, but there's no easy way to do that once in each ;; at each heading, but there's no easy way to do that once in each
;; buffer, unless we manually called `org-ql' in each buffer, which ;; buffer, unless we manually called `org-ql' in each buffer, which

View file

@ -3,7 +3,7 @@
# * makem.sh --- Script to aid building and testing Emacs Lisp packages # * makem.sh --- Script to aid building and testing Emacs Lisp packages
# URL: https://github.com/alphapapa/makem.sh # URL: https://github.com/alphapapa/makem.sh
# Version: 0.6-pre # Version: 0.7.1
# * Commentary: # * Commentary:
@ -112,6 +112,12 @@ Source files are automatically discovered from git, or may be
specified with options. Package dependencies are discovered from specified with options. Package dependencies are discovered from
"Package-Requires" headers in source files, from -pkg.el files, and "Package-Requires" headers in source files, from -pkg.el files, and
from a Cask file. from a Cask file.
Checkdoc's spell checker may not recognize some words, causing the
`lint-checkdoc' rule to fail. Custom words can be added in file-local
or directory-local variables using the variable
`ispell-buffer-session-localwords', which should be set to a list of
strings.
EOF EOF
} }
@ -177,6 +183,7 @@ function elisp-checkdoc-file {
(setq makem-checkdoc-errors-p t) (setq makem-checkdoc-errors-p t)
;; Return nil because we *are* generating a buffered list of errors. ;; Return nil because we *are* generating a buffered list of errors.
nil)))) nil))))
(put 'ispell-buffer-session-localwords 'safe-local-variable #'list-of-strings-p)
(mapcar #'checkdoc-file files) (mapcar #'checkdoc-file files)
(when makem-checkdoc-errors-p (when makem-checkdoc-errors-p
(kill-emacs 1)))) (kill-emacs 1))))
@ -300,7 +307,6 @@ function elisp-package-initialize-file {
(setq package-archives (list (cons "gnu" "https://elpa.gnu.org/packages/") (setq package-archives (list (cons "gnu" "https://elpa.gnu.org/packages/")
(cons "melpa" "https://melpa.org/packages/") (cons "melpa" "https://melpa.org/packages/")
(cons "melpa-stable" "https://stable.melpa.org/packages/"))) (cons "melpa-stable" "https://stable.melpa.org/packages/")))
$elisp_org_package_archive
(package-initialize) (package-initialize)
EOF EOF
echo $file echo $file
@ -379,6 +385,36 @@ function byte-compile-file {
# ** Files # ** Files
function submodules {
# Echo a list of submodules's paths relative to the repo root.
# TODO: Parse with bash regexp instead of cut.
git submodule status | awk '{print $2}'
}
function project-root {
# Echo the root of the project (or superproject, if running from
# within a submodule).
root_dir=$(git rev-parse --show-superproject-working-tree)
[[ $root_dir ]] || root_dir=$(git rev-parse --show-toplevel)
[[ $root_dir ]] || error "Can't find repo root."
echo "$root_dir"
}
function files-project {
# Echo a list of files in project; or with $1, files in it
# matching that pattern with "git ls-files". Excludes submodules.
[[ $1 ]] && pattern="/$1" || pattern="."
local excludes
for submodule in $(submodules)
do
excludes+=(":!:$submodule")
done
git ls-files -- "$pattern" "${excludes[@]}"
}
function dirs-project { function dirs-project {
# Echo list of directories to be used in load path. # Echo list of directories to be used in load path.
files-project-feature | dirnames files-project-feature | dirnames
@ -387,7 +423,7 @@ function dirs-project {
function files-project-elisp { function files-project-elisp {
# Echo list of Elisp files in project. # Echo list of Elisp files in project.
git ls-files 2>/dev/null \ files-project 2>/dev/null \
| egrep "\.el$" \ | egrep "\.el$" \
| filter-files-exclude-default \ | filter-files-exclude-default \
| filter-files-exclude-args | filter-files-exclude-args
@ -396,13 +432,13 @@ function files-project-elisp {
function files-project-feature { function files-project-feature {
# Echo list of Elisp files that are not tests and provide a feature. # Echo list of Elisp files that are not tests and provide a feature.
files-project-elisp \ files-project-elisp \
| egrep -v "$test_files_regexp" \ | grep -E -v "$test_files_regexp" \
| filter-files-feature | filter-files-feature
} }
function files-project-test { function files-project-test {
# Echo list of Elisp test files. # Echo list of Elisp test files.
files-project-elisp | egrep "$test_files_regexp" files-project-elisp | grep -E "$test_files_regexp"
} }
function dirnames { function dirnames {
@ -415,7 +451,7 @@ function dirnames {
function filter-files-exclude-default { function filter-files-exclude-default {
# Filter out paths (STDIN) which should be excluded by default. # Filter out paths (STDIN) which should be excluded by default.
egrep -v "(/\.cask/|-autoloads.el|.dir-locals)" grep -E -v "(/\.cask/|-autoloads\.el|\.dir-locals)"
} }
function filter-files-exclude-args { function filter-files-exclude-args {
@ -441,7 +477,7 @@ function filter-files-feature {
# Read paths on STDIN and echo ones that (provide 'a-feature). # Read paths on STDIN and echo ones that (provide 'a-feature).
while read path while read path
do do
egrep "^\\(provide '" "$path" &>/dev/null \ grep -E "^\\(provide '" "$path" &>/dev/null \
&& echo "$path" && echo "$path"
done done
} }
@ -489,7 +525,7 @@ function ert-tests-p {
function package-main-file { function package-main-file {
# Echo the package's main file. # Echo the package's main file.
file_pkg=$(git ls-files ./*-pkg.el 2>/dev/null) file_pkg=$(files-project "*-pkg.el" 2>/dev/null)
if [[ $file_pkg ]] if [[ $file_pkg ]]
then then
@ -512,23 +548,23 @@ function dependencies {
# Search package headers. Use -a so grep won't think that an Elisp file containing # Search package headers. Use -a so grep won't think that an Elisp file containing
# control characters (rare, but sometimes necessary) is binary and refuse to search it. # control characters (rare, but sometimes necessary) is binary and refuse to search it.
egrep -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \ grep -E -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \
| egrep -o '\([^([:space:]][^)]*\)' \ | grep -E -o '\([^([:space:]][^)]*\)' \
| egrep -o '^[^[:space:])]+' \ | grep -E -o '^[^[:space:])]+' \
| sed -r 's/\(//g' \ | sed -r 's/\(//g' \
| egrep -v '^emacs$' # Ignore Emacs version requirement. | grep -E -v '^emacs$' # Ignore Emacs version requirement.
# Search Cask file. # Search Cask file.
if [[ -r Cask ]] if [[ -r Cask ]]
then then
egrep '\(depends-on "[^"]+"' Cask \ grep -E '\(depends-on "[^"]+"' Cask \
| sed -r -e 's/\(depends-on "([^"]+)".*/\1/g' | sed -r -e 's/\(depends-on "([^"]+)".*/\1/g'
fi fi
# Search -pkg.el file. # Search -pkg.el file.
if [[ $(git ls-files ./*-pkg.el 2>/dev/null) ]] if [[ $(files-project "*-pkg.el" 2>/dev/null) ]]
then then
sed -nr 's/.*\(([-[:alnum:]]+)[[:blank:]]+"[.[:digit:]]+"\).*/\1/p' $(git ls-files ./*-pkg.el 2>/dev/null) sed -nr 's/.*\(([-[:alnum:]]+)[[:blank:]]+"[.[:digit:]]+"\).*/\1/p' $(files-project- -- -pkg.el 2>/dev/null)
fi fi
} }
@ -581,6 +617,9 @@ function sandbox {
local deps=($(dependencies)) local deps=($(dependencies))
debug "Installing dependencies: ${deps[@]}" debug "Installing dependencies: ${deps[@]}"
# Ensure built-in packages get upgraded to newer versions from ELPA.
args_sandbox_package_install+=(--eval "(setq package-install-upgrade-built-in t)")
for package in "${deps[@]}" for package in "${deps[@]}"
do do
args_sandbox_package_install+=(--eval "(package-install '$package)") args_sandbox_package_install+=(--eval "(package-install '$package)")
@ -1084,21 +1123,15 @@ args_package_archives=(
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)"
) )
args_org_package_archives=(
--eval "(add-to-list 'package-archives '(\"org\" . \"https://orgmode.org/elpa/\") t)"
)
args_package_init=( args_package_init=(
--eval "(package-initialize)" --eval "(package-initialize)"
) )
elisp_org_package_archive="(add-to-list 'package-archives '(\"org\" . \"https://orgmode.org/elpa/\") t)"
# * Args # * Args
args=$(getopt -n "$0" \ args=$(getopt -n "$0" \
-o dhce:E:i:s::vf:CO \ -o dhce:E:i:s::vf:C \
-l compile-batch,exclude:,emacs:,install-deps,install-linters,debug,debug-load-path,help,install:,verbose,file:,no-color,no-compile,no-org-repo,sandbox:: \ -l compile-batch,exclude:,emacs:,install-deps,install-linters,debug,debug-load-path,help,install:,verbose,file:,no-color,no-compile,sandbox:: \
-- "$@") \ -- "$@") \
|| { usage; exit 1; } || { usage; exit 1; }
eval set -- "$args" eval set -- "$args"
@ -1162,9 +1195,6 @@ do
shift shift
args_files+=("$1") args_files+=("$1")
;; ;;
-O|--no-org-repo)
unset elisp_org_package_archive
;;
--no-color) --no-color)
unset color unset color
;; ;;
@ -1193,6 +1223,9 @@ paths_temp+=("$package_initialize_file")
trap cleanup EXIT INT TERM trap cleanup EXIT INT TERM
# Change to project root directory first.
cd "$(project-root)"
# Discover project files. # Discover project files.
files_project_feature=($(files-project-feature)) files_project_feature=($(files-project-feature))
files_project_test=($(files-project-test)) files_project_test=($(files-project-test))

View file

@ -26,6 +26,9 @@
(require 'org-ql) (require 'org-ql)
(declare-function org-ql-search "org-ql-search")
(declare-function org-ql--normalize-query "org-ql" t t)
;;;; Variables ;;;; Variables
(defvar-keymap org-ql-completing-read-map (defvar-keymap org-ql-completing-read-map
@ -131,7 +134,7 @@ value, or nil."
;;;###autoload ;;;###autoload
(cl-defun org-ql-completing-read (cl-defun org-ql-completing-read
(buffers-files &key query-prefix query-filter (buffers-files &key query-prefix query-filter narrowp
(action #'org-ql-completing-read-action) (action #'org-ql-completing-read-action)
;; FIXME: Unused argument. ;; FIXME: Unused argument.
;; (annotate #'org-ql-completing-read-snippet) ;; (annotate #'org-ql-completing-read-snippet)
@ -142,6 +145,8 @@ value, or nil."
"Return marker at entry in BUFFERS-FILES selected with `org-ql'. "Return marker at entry in BUFFERS-FILES selected with `org-ql'.
PROMPT is shown to the user. PROMPT is shown to the user.
NARROWP is passed to `org-ql-select', which see.
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
creating a custom command that saves the user from having to type creating a custom command that saves the user from having to type
@ -312,6 +317,7 @@ single predicate)."
bow (or ,@query-tokens) (0+ (not space)) bow (or ,@query-tokens) (0+ (not space))
(optional (repeat 1 3 (0+ space) (repeat 1 15 (not space)))))))) (optional (repeat 1 3 (0+ space) (repeat 1 15 (not space))))))))
(org-ql-select buffers-files (org-ql--query-string-to-sexp input) (org-ql-select buffers-files (org-ql--query-string-to-sexp input)
:narrow narrowp
:action #'action)))) :action #'action))))
(unless (listp buffers-files) (unless (listp buffers-files)
;; Since we map across this argument, we ensure it's a list. ;; Since we map across this argument, we ensure it's a list.

View file

@ -33,6 +33,8 @@
(require 'org-ql-search) (require 'org-ql-search)
(require 'org-ql-completing-read) (require 'org-ql-completing-read)
(declare-function org-ql--normalize-query "org-ql" t t)
;;;; Customization ;;;; Customization
(defgroup org-ql-find nil (defgroup org-ql-find nil
@ -52,14 +54,18 @@ See function `display-buffer'."
;;;; Commands ;;;; Commands
;;;###autoload ;;;###autoload
(cl-defun org-ql-find (buffers-files &key query-prefix query-filter (cl-defun org-ql-find (buffers-files &key query-prefix query-filter widen
(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, search the buffers and files relevant to the Interactively, search the buffers and files relevant to the
current buffer (i.e. in `org-agenda-mode', the value of current buffer (i.e. in `org-agenda-mode', the value of
`org-ql-view-buffers-files' or `org-agenda-contributing-files'; `org-ql-view-buffers-files' or `org-agenda-contributing-files';
in `org-mode', that buffer). With universal prefix, select in `org-mode', that buffer).
multiple buffers to search with completion and PROMPT.
With one or more universal prefix arguments, WIDEN buffers before
searching (otherwise, respect any narrowing). With two universal
prefix arguments, select multiple buffers to 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
@ -70,11 +76,17 @@ types is filtered before execution (e.g. it could replace spaces
with commas to turn multiple tokens, which would normally be with commas to turn multiple tokens, which would normally be
treated as multiple predicates, into multiple arguments to a treated as multiple predicates, into multiple arguments to a
single predicate)." single predicate)."
(interactive (list (org-ql-find--buffers))) (interactive (list (org-ql-find--buffers
(let ((marker (org-ql-completing-read buffers-files :read-buffer-p (equal '(16) current-prefix-arg))
:widen current-prefix-arg))
(let ((marker (save-restriction
(when (and widen (equal (current-buffer) buffers-files))
(widen))
(org-ql-completing-read buffers-files
:narrowp (not widen)
:query-prefix query-prefix :query-prefix query-prefix
:query-filter query-filter :query-filter query-filter
:prompt prompt))) :prompt prompt))))
(set-buffer (or (buffer-base-buffer (marker-buffer marker)) (set-buffer (or (buffer-base-buffer (marker-buffer marker))
(marker-buffer marker))) (marker-buffer marker)))
(pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action)
@ -195,15 +207,15 @@ multiple buffers to search with completion and PROMPT."
;;;; Functions ;;;; Functions
(defun org-ql-find--buffers () (cl-defun org-ql-find--buffers (&key read-buffer-p)
"Return list of buffers to search in. "Return buffer or list of buffers to search in.
In a mode derived from `org-agenda-mode', return the value of In a mode derived from `org-agenda-mode', return the value of
`org-ql-view-buffers-files' or `org-agenda-contributing-files'. `org-ql-view-buffers-files' or `org-agenda-contributing-files'.
In a mode derived from `org-mode', return the current buffer. In a mode derived from `org-mode', return the current buffer. If
When `current-prefix-arg', read a list of buffers in `org-mode' READ-BUFFER-P, read a list of buffers in `org-mode' with
with completion. To be used in `org-ql-find' commands' completion. To be used in `org-ql-find' commands' interactive
interactive forms." forms."
(if current-prefix-arg (if read-buffer-p
(mapcar #'get-buffer (mapcar #'get-buffer
(completing-read-multiple (completing-read-multiple
"Buffers: " "Buffers: "

View file

@ -40,6 +40,8 @@
(require 'org-ql) (require 'org-ql)
(require 'org-ql-view) (require 'org-ql-view)
(declare-function org-ql--normalize-query "org-ql" t t)
;;;; Compatibility ;;;; Compatibility
(defalias 'org-ql-search--link-heading-search-string (defalias 'org-ql-search--link-heading-search-string
@ -220,23 +222,28 @@ necessary."
(symbol (symbol-value super-groups)) (symbol (symbol-value super-groups))
(list super-groups)))) (list super-groups))))
(setf strings (org-super-agenda--group-items strings)))) (setf strings (org-super-agenda--group-items strings))))
(org-ql-view--display :buffer buffer :header header (org-ql-view--display :buffer buffer :header header :strings strings))))
:string (s-join "\n" strings)))))
;;;###autoload ;;;###autoload
(defun org-ql-search-block (query) (defun org-ql-search-block (args)
"Insert items for QUERY into current buffer. "Insert items for ARGS into current buffer.
QUERY should be an `org-ql' query form. Intended to be used as a Intended to be used as a user-defined function in
user-defined function in `org-agenda-custom-commands'. QUERY `org-agenda-custom-commands'. ARGS corresponds to the `match'
corresponds to the `match' item in the custom command form. item in the custom command form. It should be a list of
arguments which may be applied to `org-ql-select', which see, but
not including its BUFFERS-FILES argument (which is supplied
through the Agenda). An additional `:header' keyword argument
may be supplied as a string, like that supplied to
`org-ql-view--display'.
Like other agenda block commands, it searches files returned by Like other agenda block commands, it searches files returned by
function `org-agenda-files'. Inserts a newline after the block. function `org-agenda-files'. Inserts a newline after the block.
If `org-ql-block-header' is non-nil, it is used as the header If `org-ql-block-header' is non-nil, it is used as the header
string for the block, otherwise a the header is formed string for the block, otherwise the header is formed
automatically from the query." automatically from the query."
(let (narrow-p old-beg old-end) (pcase-let ((`(,query . ,(map :header :sort)) args)
(narrow-p) (old-beg) (old-end))
(when-let* ((from (pcase org-agenda-restrict (when-let* ((from (pcase org-agenda-restrict
('nil (org-agenda-files nil 'ifmode)) ('nil (org-agenda-files nil 'ifmode))
(_ (prog1 org-agenda-restrict (_ (prog1 org-agenda-restrict
@ -247,7 +254,7 @@ automatically from the query."
(narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end)))))) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end))))))
(items (org-ql-select from query (items (org-ql-select from query
:action 'element-with-markers :action 'element-with-markers
:narrow narrow-p))) :narrow narrow-p :sort sort)))
(when narrow-p (when narrow-p
;; Restore buffer's previous restrictions. ;; Restore buffer's previous restrictions.
(with-current-buffer from (with-current-buffer from
@ -257,16 +264,25 @@ automatically from the query."
;; FIXME: `org-agenda--insert-overriding-header' is from an Org version newer than ;; FIXME: `org-agenda--insert-overriding-header' is from an Org version newer than
;; I'm using. Should probably declare it as a minimum Org version after upgrading. ;; I'm using. Should probably declare it as a minimum Org version after upgrading.
;; (org-agenda--insert-overriding-header (or org-ql-block-header (org-ql-agenda--header-line-format from query))) ;; (org-agenda--insert-overriding-header (or org-ql-block-header (org-ql-agenda--header-line-format from query)))
(insert (org-add-props (or org-ql-block-header (org-ql-view--header-line-format ;; FIXME: Should we really use `org-ql-block-header' AND `header', or just one of them?
(insert (org-add-props (or org-ql-block-header header
(org-ql-view--header-line-format
:buffers-files from :query query)) :buffers-files from :query query))
nil 'face 'org-agenda-structure) "\n") nil 'face 'org-agenda-structure) "\n")
;; Calling `org-agenda-finalize' should be unnecessary, because in a "series" agenda, ;; Calling `org-agenda-finalize' should be unnecessary, because in a "series" agenda,
;; `org-agenda-multi' is bound non-nil, in which case `org-agenda-finalize' does nothing. ;; `org-agenda-multi' is bound non-nil, in which case `org-agenda-finalize' does nothing.
;; But we do call `org-agenda-finalize-entries', which allows `org-super-agenda' to work. ;; But we do call `org-agenda-finalize-entries', which allows `org-super-agenda' to work.
;; However, `org-agenda-finalize-entries' sorts entries with `org-entries-lessp', which
;; overrides the sorting `org-ql' has already done, so we rebind `org-entries-lessp' to
;; prevent it from affecting sort order. (Ideally we would let `org-entries-lessp'
;; handle sorting, but that's not possible, because we can't add the `type' text property
;; it uses to sort entries, because the design of org-ql and org-agenda is fundamentally
;; different. So we have to do the sorting ourselves.)
(cl-letf (((symbol-function 'org-entries-lessp) #'ignore))
(->> items (->> items
(-map #'org-ql-view--format-element) (-map #'org-ql-view--format-element)
org-agenda-finalize-entries org-agenda-finalize-entries
insert) insert))
(insert "\n")))) (insert "\n"))))
;;;###autoload ;;;###autoload

View file

@ -44,6 +44,7 @@
(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) (declare-function org-ql-search--org-link-store-props "org-ql-search" t)
(declare-function org-ql--normalize-query "org-ql" t t)
(require 'dash) (require 'dash)
(require 's) (require 's)
@ -56,7 +57,18 @@
(defface org-ql-view-due-date (defface org-ql-view-due-date
'((t (:slant italic :weight bold))) '((t (:slant italic :weight bold)))
"Face for due dates in `org-ql-view' views." "Face for due dates in `org-ql-view' views."
:group 'org-ql) :group 'org-ql-view)
(defface org-ql-view-query nil
"View query in header line.
This face is added to the formatted query after font-lock faces
are applied to it. It may be used, e.g. to reduce the height so
more of it is visible."
:group 'org-ql-view)
(defface org-ql-view-title '((t :weight bold))
"View title in header line."
:group 'org-ql-view)
;;;; Variables ;;;; Variables
@ -237,6 +249,12 @@ See info node `(elisp)Cyclic Window Ordering'."
(sexp :tag "org-super-agenda grouping expression") (sexp :tag "org-super-agenda grouping expression")
(variable :tag "Variable holding org-super-agenda grouping expression")))))))) (variable :tag "Variable holding org-super-agenda grouping expression"))))))))
(defcustom org-ql-view-relative-deadline-prefix "due "
;; TODO(v0.9): Add one for scheduled, too.
"Prefix for relative deadlines.
Relative deadlines are, e.g. \"in 5d\", \"5d ago\"."
:type 'string)
;;;; Commands ;;;; Commands
;;;###autoload ;;;###autoload
@ -408,7 +426,7 @@ update search arguments."
(defvar bookmark-make-record-function) (defvar bookmark-make-record-function)
(cl-defun org-ql-view--display (&key (buffer org-ql-view-buffer) header string) (cl-defun org-ql-view--display (&key (buffer org-ql-view-buffer) header strings)
"Display STRING in `org-ql-view' BUFFER. "Display STRING in `org-ql-view' BUFFER.
BUFFER may be a buffer, or a string naming a buffer, which is BUFFER may be a buffer, or a string naming a buffer, which is
@ -446,7 +464,9 @@ subsequent refreshing of the buffer: `org-ql-view-buffers-files',
;; Clear buffer, insert entries, etc. ;; Clear buffer, insert entries, etc.
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(erase-buffer) (erase-buffer)
(insert string "\n") (dolist (string strings)
(insert string "\n"))
(insert "\n")
(pop-to-buffer (current-buffer) org-ql-view-display-buffer-action) (pop-to-buffer (current-buffer) org-ql-view-display-buffer-action)
(org-agenda-finalize) (org-agenda-finalize)
(goto-char (point-min)))))) (goto-char (point-min))))))
@ -456,7 +476,8 @@ subsequent refreshing of the buffer: `org-ql-view-buffers-files',
If TITLE, prepend it to the header." If TITLE, prepend it to the header."
(let* ((title (if title (let* ((title (if title
(concat (propertize "View:" 'face 'transient-argument) (concat (propertize "View:" 'face 'transient-argument)
title " ") (propertize title 'face 'org-ql-view-title)
" ")
"")) ""))
(query-formatted (when query (query-formatted (when query
(org-ql-view--format-query query))) (org-ql-view--format-query query)))
@ -475,6 +496,7 @@ If TITLE, prepend it to the header."
(org-ql-view--font-lock-string 'emacs-lisp-mode) (org-ql-view--font-lock-string 'emacs-lisp-mode)
(s-truncate available-width)) (s-truncate available-width))
'help-echo buffers-files-formatted)))) 'help-echo buffers-files-formatted))))
(add-face-text-property 0 (length query-propertized) 'org-ql-view-query 'append query-propertized)
(concat title (concat title
(when query (propertize "Query:" 'face 'transient-argument)) (when query (propertize "Query:" 'face 'transient-argument))
(when query query-propertized) (when query query-propertized)
@ -506,6 +528,22 @@ with human-readable strings."
(font-lock-ensure) (font-lock-ensure)
(buffer-string)))) (buffer-string))))
(defun org-ql-view--font-lock-as-org (s)
"Return string S font-locked as in `org-mode'."
;; This works like `org-fontify-like-in-org-mode', but uses a single
;; buffer instead of a new one every time.
;; TODO(C): Submit these improvements upstream.
(let ((buffer (or (get-buffer " *org-ql-view--font-lock-as-org*")
(with-current-buffer (get-buffer-create " *org-ql-view--font-lock-as-org*")
(buffer-disable-undo)
(org-mode)
(current-buffer)))))
(with-current-buffer buffer
(insert s)
(font-lock-ensure)
(prog1 (buffer-string)
(erase-buffer)))))
(defun org-ql-view--buffer (&optional name) (defun org-ql-view--buffer (&optional name)
"Return `org-ql-view' buffer, creating it if necessary. "Return `org-ql-view' buffer, creating it if necessary.
If NAME is non-nil, return buffer by that name instead of using If NAME is non-nil, return buffer by that name instead of using
@ -608,6 +646,7 @@ The optional, second argument is temporarily _IGNORED for
purposes of compatibility with changes in Org 9.4." purposes of compatibility with changes in Org 9.4."
(require 'url-parse) (require 'url-parse)
(require 'url-util) (require 'url-util)
(declare-function url-path-and-query "url-parse")
(when (version<= "9.3" (org-version)) (when (version<= "9.3" (org-version))
;; Org 9.3+ makes a backward-incompatible change to link escaping. ;; Org 9.3+ makes a backward-incompatible change to link escaping.
;; I don't think it would be a good idea to try to guess whether ;; I don't think it would be a good idea to try to guess whether
@ -641,6 +680,8 @@ purposes of compatibility with changes in Org 9.4."
(stringp buffers-files) (stringp buffers-files)
(cl-every #'stringp buffers-files)) (cl-every #'stringp buffers-files))
(error "CAUTION: Link not opened because unsafe buffers-files parameter detected: %s" buffers-files)) (error "CAUTION: Link not opened because unsafe buffers-files parameter detected: %s" buffers-files))
(unless (or (stringp title) (null title))
(error "CAUTION: Link not opened because unsafe title parameter detected: %S" title))
(when (or (listp query) (when (or (listp query)
(string-match (rx bol (0+ space) "(") query)) (string-match (rx bol (0+ space) "(") query))
;; SAFETY: Query is in sexp form: ask for confirmation, because it could contain arbitrary code. ;; SAFETY: Query is in sexp form: ask for confirmation, because it could contain arbitrary code.
@ -709,6 +750,8 @@ When opened, the link searches the buffer it's opened from."
;; Transient manual is written very well, not everything is covered in ;; Transient manual is written very well, not everything is covered in
;; it, so I'm having to try to imitate examples from `magit-transient'. ;; it, so I'm having to try to imitate examples from `magit-transient'.
(require 'eieio-core)
(require 'transient) (require 'transient)
(defclass org-ql-view--variable (transient-variable) (defclass org-ql-view--variable (transient-variable)
@ -871,6 +914,11 @@ return an empty string."
;; (which would also make it easier to do it independently of faces, etc). ;; (which would also make it easier to do it independently of faces, etc).
(title (--> (org-ql-view--add-faces element) (title (--> (org-ql-view--add-faces element)
(org-element-property :raw-value it))) (org-element-property :raw-value it)))
;; TODO(B): Needs refactoring. A function like `org-ql-view--add-faces'
;; should return a list of faces to be added.
(title-faces (get-text-property 0 'face title))
(title (org-ql-view--font-lock-as-org title))
(_ (add-face-text-property 0 (length title) title-faces t title))
(todo-keyword (-some--> (org-element-property :todo-keyword element) (todo-keyword (-some--> (org-element-property :todo-keyword element)
(org-ql-view--add-todo-face (org-ql-view--add-todo-face
(substring-no-properties it)))) (substring-no-properties it))))
@ -1008,7 +1056,9 @@ property."
(deadline-day-number (org-time-string-to-absolute (deadline-day-number (org-time-string-to-absolute
(org-element-timestamp-interpreter deadline-date 'ignore))) (org-element-timestamp-interpreter deadline-date 'ignore)))
(difference-days (- today-day-number deadline-day-number)) (difference-days (- today-day-number deadline-day-number))
(relative-due-date (org-add-props (org-ql-view--format-relative-date difference-days) nil (relative-due-date (org-add-props
(concat org-ql-view-relative-deadline-prefix
(org-ql-view--format-relative-date difference-days)) nil
'help-echo (org-element-property :raw-value deadline-date))) 'help-echo (org-element-property :raw-value deadline-date)))
;; FIXME: Unused for now: (todo-keyword (org-element-property :todo-keyword element)) ;; FIXME: Unused for now: (todo-keyword (org-element-property :todo-keyword element))
;; FIXME: Unused for now: (done-p (member todo-keyword org-done-keywords)) ;; FIXME: Unused for now: (done-p (member todo-keyword org-done-keywords))

View file

@ -4,7 +4,7 @@
;; Author: Adam Porter <adam@alphapapa.net> ;; Author: Adam Porter <adam@alphapapa.net>
;; Url: https://github.com/alphapapa/org-ql ;; Url: https://github.com/alphapapa/org-ql
;; Version: 0.8.10 ;; Version: 0.9-pre
;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre"))
;; Keywords: hypermedia, outlines, Org, agenda ;; Keywords: hypermedia, outlines, Org, agenda

View file

@ -26,6 +26,7 @@ and saved views.
* Installation:: * Installation::
* Usage:: * Usage::
* Changelog:: * Changelog::
* Development::
* Notes:: * Notes::
* License:: * License::
@ -72,6 +73,7 @@ Functions / Macros
Changelog Changelog
* 0.9-pre: 09-pre.
* 0.8.10: 0810. * 0.8.10: 0810.
* 0.8.9: 089. * 0.8.9: 089.
* 0.8.8: 088. * 0.8.8: 088.
@ -114,6 +116,14 @@ Changelog
* 0.2: 02. * 0.2: 02.
* 0.1: 01. * 0.1: 01.
0.9-pre
* helm-org-ql: helm-org-ql (1).
Development
* Copyright assignment::
Notes Notes
* Comparison with Org Agenda searches:: * Comparison with Org Agenda searches::
@ -126,7 +136,7 @@ File: README.info, Node: Contents, Next: Screenshots, Prev: Top, Up: Top
1 Contents 1 Contents
********** **********
• • • • • • • •
 
File: README.info, Node: Screenshots, Next: Installation, Prev: Contents, Up: Top File: README.info, Node: Screenshots, Next: Installation, Prev: Contents, Up: Top
@ -1025,7 +1035,7 @@ File: README.info, Node: Tips, Prev: Links, Up: Usage
(https://github.com/alphapapa/burly.el). (https://github.com/alphapapa/burly.el).
 
File: README.info, Node: Changelog, Next: Notes, Prev: Usage, Up: Top File: README.info, Node: Changelog, Next: Development, Prev: Usage, Up: Top
5 Changelog 5 Changelog
*********** ***********
@ -1038,6 +1048,7 @@ releases.
* Menu: * Menu:
* 0.9-pre: 09-pre.
* 0.8.10: 0810. * 0.8.10: 0810.
* 0.8.9: 089. * 0.8.9: 089.
* 0.8.8: 088. * 0.8.8: 088.
@ -1081,9 +1092,44 @@ releases.
* 0.1: 01. * 0.1: 01.
 
File: README.info, Node: 0810, Next: 089, Up: Changelog File: README.info, Node: 09-pre, Next: 0810, Up: Changelog
5.1 0.8.10 5.1 0.9-pre
===========
*Additions*
• Face org-ql-view-query, applied to view queries in header line.
• Face org-ql-view-title, applied to view titles in header line.
• Option org-ql-view-relative-deadline-prefix.
*Changes*
• Command org-ql-find respects narrowing of the current buffer by
default, allowing searching within the narrowed region. (Using one
C-u argument widens the current buffer, and using two C-u
arguments prompts for the buffers to search.)
• Function org-ql-completing-read accepts a new NARROWP argument,
which is passed to org-ql-select.
*Fixes*
• Customization group for face org-ql-view-due-date.
• Apply Org syntax font-locking to items in org-ql-view buffers.
* Menu:
* helm-org-ql: helm-org-ql (1).

File: README.info, Node: helm-org-ql (1), Up: 09-pre
5.1.1 helm-org-ql
-----------------
Tagged v0.6.2, fixing a compilation warning.

File: README.info, Node: 0810, Next: 089, Prev: 09-pre, Up: Changelog
5.2 0.8.10
========== ==========
*Fixes* *Fixes*
@ -1098,7 +1144,7 @@ File: README.info, Node: 0810, Next: 089, Up: Changelog
 
File: README.info, Node: 089, Next: 088, Prev: 0810, Up: Changelog File: README.info, Node: 089, Next: 088, Prev: 0810, Up: Changelog
5.2 0.8.9 5.3 0.8.9
========= =========
*Fixes* *Fixes*
@ -1125,7 +1171,7 @@ File: README.info, Node: 089, Next: 088, Prev: 0810, Up: Changelog
 
File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog
5.3 0.8.8 5.4 0.8.8
========= =========
*Fixes* *Fixes*
@ -1147,7 +1193,7 @@ File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog
 
File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog
5.4 0.8.7 5.5 0.8.7
========= =========
*Fixes* *Fixes*
@ -1175,7 +1221,7 @@ File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog
 
File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog
5.5 0.8.6 5.6 0.8.6
========= =========
*Fixes* *Fixes*
@ -1185,7 +1231,7 @@ File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog
 
File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog
5.6 0.8.5 5.7 0.8.5
========= =========
*Fixes* *Fixes*
@ -1202,7 +1248,7 @@ File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog
 
File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog
5.7 0.8.4 5.8 0.8.4
========= =========
*Fixes* *Fixes*
@ -1216,7 +1262,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog
 
File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog
5.8 0.8.3 5.9 0.8.3
========= =========
*Fixes* *Fixes*
@ -1229,8 +1275,8 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog
 
File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog
5.9 0.8.2 5.10 0.8.2
========= ==========
*Fixes* *Fixes*
@ -1243,7 +1289,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog
 
File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog
5.10 0.8.1 5.11 0.8.1
========== ==========
*Fixes* *Fixes*
@ -1258,7 +1304,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog
 
File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog
5.11 0.8 5.12 0.8
======== ========
*Additions* *Additions*
@ -1314,7 +1360,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog
 
File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog
5.12 0.7.4 5.13 0.7.4
========== ==========
*Fixes* *Fixes*
@ -1324,7 +1370,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog
 
File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog
5.13 0.7.3 5.14 0.7.3
========== ==========
*Fixes* *Fixes*
@ -1342,7 +1388,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog
 
File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog
5.14 0.7.2 5.15 0.7.2
========== ==========
*Fixes* *Fixes*
@ -1363,7 +1409,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog
 
File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog
5.15 0.7.1 5.16 0.7.1
========== ==========
*Fixes* *Fixes*
@ -1382,7 +1428,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog
 
File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog
5.16 0.7 5.17 0.7
======== ========
*Added* *Added*
@ -1441,7 +1487,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog
 
File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog
5.17 0.6.3 5.18 0.6.3
========== ==========
*Fixed* *Fixed*
@ -1457,7 +1503,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog
 
File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog
5.18 0.6.2 5.19 0.6.2
========== ==========
*Fixed* *Fixed*
@ -1468,7 +1514,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog
 
File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog
5.19 0.6.1 5.20 0.6.1
========== ==========
*Fixed* *Fixed*
@ -1486,7 +1532,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog
 
File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog
5.20 0.6 5.21 0.6
======== ========
*Added* *Added*
@ -1553,7 +1599,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog
 
File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog
5.21 0.5.2 5.22 0.5.2
========== ==========
*Fixed* *Fixed*
@ -1564,7 +1610,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog
 
File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog
5.22 0.5.1 5.23 0.5.1
========== ==========
*Fixed* *Fixed*
@ -1577,7 +1623,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog
 
File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog
5.23 0.5 5.24 0.5
======== ========
*Added* *Added*
@ -1618,7 +1664,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog
 
File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog
5.24 0.4.9 5.25 0.4.9
========== ==========
*Fixed* *Fixed*
@ -1629,7 +1675,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog
 
File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog
5.25 0.4.8 5.26 0.4.8
========== ==========
*Fixed* *Fixed*
@ -1641,7 +1687,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog
 
File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog
5.26 0.4.7 5.27 0.4.7
========== ==========
*Fixed* *Fixed*
@ -1654,7 +1700,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog
 
File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog
5.27 0.4.6 5.28 0.4.6
========== ==========
*Fixed* *Fixed*
@ -1667,7 +1713,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog
 
File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog
5.28 0.4.5 5.29 0.4.5
========== ==========
*Fixed* *Fixed*
@ -1679,7 +1725,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog
 
File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog
5.29 0.4.4 5.30 0.4.4
========== ==========
*Fixed* *Fixed*
@ -1691,7 +1737,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog
 
File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog
5.30 0.4.3 5.31 0.4.3
========== ==========
*Fixed* *Fixed*
@ -1701,7 +1747,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog
 
File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog
5.31 0.4.2 5.32 0.4.2
========== ==========
*Fixed* *Fixed*
@ -1710,7 +1756,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog
 
File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog
5.32 0.4.1 5.33 0.4.1
========== ==========
*Fixed* *Fixed*
@ -1720,7 +1766,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog
 
File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog
5.33 0.4 5.34 0.4
======== ========
_Note:_ The next release, 0.5, may include changes which will require _Note:_ The next release, 0.5, may include changes which will require
@ -1801,7 +1847,7 @@ automatically, as they will be pushed to the master branch when ready.
 
File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog
5.34 0.3.2 5.35 0.3.2
========== ==========
*Fixed* *Fixed*
@ -1814,7 +1860,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog
 
File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog
5.35 0.3.1 5.36 0.3.1
========== ==========
*Fixed* *Fixed*
@ -1824,7 +1870,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog
 
File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog
5.36 0.3 5.37 0.3
======== ========
*Added* *Added*
@ -1892,7 +1938,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog
 
File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog
5.37 0.2.3 5.38 0.2.3
========== ==========
*Fixed* *Fixed*
@ -1902,7 +1948,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog
 
File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog
5.38 0.2.2 5.39 0.2.2
========== ==========
*Fixed* *Fixed*
@ -1913,7 +1959,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog
 
File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog
5.39 0.2.1 5.40 0.2.1
========== ==========
*Fixed* *Fixed*
@ -1923,7 +1969,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog
 
File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog
5.40 0.2 5.41 0.2
======== ========
*Added* *Added*
@ -2006,15 +2052,42 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog
 
File: README.info, Node: 01, Prev: 02, Up: Changelog File: README.info, Node: 01, Prev: 02, Up: Changelog
5.41 0.1 5.42 0.1
======== ========
First tagged release. First tagged release.
 
File: README.info, Node: Notes, Next: License, Prev: Changelog, Up: Top File: README.info, Node: Development, Next: Notes, Prev: Changelog, Up: Top
6 Notes 6 Development
*************
Bug reports, feature requests, and suggestions are welcome. For
patches, see below.
* Menu:
* Copyright assignment::

File: README.info, Node: Copyright assignment, Up: Development
6.1 Copyright assignment
========================
While Org QL is currently distributed in MELPA, its intended
(https://github.com/alphapapa/org-ql/issues/409) to merge Org QL into
Org mode. When that happens, it will become a part of Emacs and Org,
and therefore cumulative contributions of more than 15 lines of code
will require that the author assign copyright of such contributions to
the FSF. Authors who are interested in doing so may contact
assign@gnu.org <assign@gnu.org> to request the appropriate form.

File: README.info, Node: Notes, Next: License, Prev: Development, Up: Top
7 Notes
******* *******
* Menu: * Menu:
@ -2025,7 +2098,7 @@ File: README.info, Node: Notes, Next: License, Prev: Changelog, Up: Top
 
File: README.info, Node: Comparison with Org Agenda searches, Next: org-sidebar, Up: Notes File: README.info, Node: Comparison with Org Agenda searches, Next: org-sidebar, Up: Notes
6.1 Comparison with Org Agenda searches 7.1 Comparison with Org Agenda searches
======================================= =======================================
Of course, queries like these can already be written with Org Agenda Of course, queries like these can already be written with Org Agenda
@ -2045,7 +2118,7 @@ todo:TO-READ, or in Lisp syntax, (and "lisp" (todo "TO-READ")).
 
File: README.info, Node: org-sidebar, Prev: Comparison with Org Agenda searches, Up: Notes File: README.info, Node: org-sidebar, Prev: Comparison with Org Agenda searches, Up: Notes
6.2 org-sidebar 7.2 org-sidebar
=============== ===============
This package is used by org-sidebar This package is used by org-sidebar
@ -2055,7 +2128,7 @@ customizable agenda-like view in a sidebar window.
 
File: README.info, Node: License, Prev: Notes, Up: Top File: README.info, Node: License, Prev: Notes, Up: Top
7 License 8 License
********* *********
GPLv3 GPLv3
@ -2064,86 +2137,90 @@ GPLv3
 
Tag Table: Tag Table:
Node: Top225 Node: Top225
Node: Contents1993 Node: Contents2109
Node: Screenshots2116 Node: Screenshots2236
Node: Installation2234 Node: Installation2354
Node: Quelpa2748 Node: Quelpa2868
Node: Helm support3276 Node: Helm support3396
Node: Usage3679 Node: Usage3799
Node: Commands4077 Node: Commands4197
Node: org-ql-find4542 Node: org-ql-find4662
Node: org-ql-open-link5450 Node: org-ql-open-link5570
Node: org-ql-refile6305 Node: org-ql-refile6425
Node: org-ql-search6633 Node: org-ql-search6753
Node: helm-org-ql8564 Node: helm-org-ql8684
Node: org-ql-view8942 Node: org-ql-view9062
Node: org-ql-view-sidebar9472 Node: org-ql-view-sidebar9592
Node: org-ql-view-recent-items9852 Node: org-ql-view-recent-items9972
Node: org-ql-sparse-tree10348 Node: org-ql-sparse-tree10468
Node: Queries11148 Node: Queries11268
Node: Non-sexp query syntax12265 Node: Non-sexp query syntax12385
Node: General predicates14024 Node: General predicates14144
Node: Ancestor/descendant predicates20949 Node: Ancestor/descendant predicates21069
Node: Date/time predicates22077 Node: Date/time predicates22197
Node: Functions / Macros25201 Node: Functions / Macros25321
Node: Agenda-like views25499 Node: Agenda-like views25619
Ref: Function org-ql-block25661 Ref: Function org-ql-block25781
Node: Listing / acting-on results26922 Node: Listing / acting-on results27042
Ref: Caching27130 Ref: Caching27250
Ref: Function org-ql-select28043 Ref: Function org-ql-select28163
Ref: Function org-ql-query30469 Ref: Function org-ql-query30589
Ref: Macro org-ql (deprecated)32243 Ref: Macro org-ql (deprecated)32363
Node: Custom predicates32558 Node: Custom predicates32678
Ref: Macro org-ql-defpred32782 Ref: Macro org-ql-defpred32902
Node: Dynamic block36223 Node: Dynamic block36343
Node: Links38947 Node: Links39067
Node: Tips39634 Node: Tips39754
Node: Changelog39958 Node: Changelog40078
Node: 081040916 Node: 09-pre41061
Node: 08941430 Node: helm-org-ql (1)41987
Node: 08842570 Node: 081042128
Node: 08743646 Node: 08942657
Node: 08644874 Node: 08843797
Node: 08545108 Node: 08744873
Node: 08445764 Node: 08646101
Node: 08346216 Node: 08546335
Node: 08246557 Node: 08446991
Node: 08146950 Node: 08347443
Node: 0847373 Node: 08247784
Node: 07450099 Node: 08148179
Node: 07350324 Node: 0848602
Node: 07251058 Node: 07451328
Node: 07151979 Node: 07351553
Node: 0752790 Node: 07252287
Node: 06355656 Node: 07153208
Node: 06256189 Node: 0754019
Node: 06156496 Node: 06356885
Node: 0657066 Node: 06257418
Node: 05260122 Node: 06157725
Node: 05160424 Node: 0658295
Node: 0560849 Node: 05261351
Node: 04962380 Node: 05161653
Node: 04862662 Node: 0562078
Node: 04763011 Node: 04963609
Node: 04663420 Node: 04863891
Node: 04563828 Node: 04764240
Node: 04464189 Node: 04664649
Node: 04364548 Node: 04565057
Node: 04264751 Node: 04465418
Node: 04164912 Node: 04365777
Node: 0465159 Node: 04265980
Node: 03269260 Node: 04166141
Node: 03169663 Node: 0466388
Node: 0369860 Node: 03270489
Node: 02373160 Node: 03170892
Node: 02273394 Node: 0371089
Node: 02173674 Node: 02374389
Node: 0273879 Node: 02274623
Node: 0177957 Node: 02174903
Node: Notes78058 Node: 0275108
Node: Comparison with Org Agenda searches78220 Node: 0179186
Node: org-sidebar79109 Node: Development79287
Node: License79388 Node: Copyright assignment79520
Node: Notes80110
Node: Comparison with Org Agenda searches80274
Node: org-sidebar81163
Node: License81442
 
End Tag Table End Tag Table

View file

@ -21,7 +21,7 @@ DEADLINE: <2024-06-25 Tue 08:00-09:00 ++7d>
** French ** French
<2024-07-12 Fri> <2024-07-12 ven.>
* Canary * Canary

View file

@ -3,7 +3,7 @@
;; Copyright (C) 2019 Adam Porter ;; Copyright (C) 2019 Adam Porter
;; Author: Adam Porter <adam@alphapapa.net> ;; Author: Adam Porter <adam@alphapapa.net>
;; Package-Requires: ((buttercup) (with-simulated-input)) ;; Package-Requires: ((buttercup) (with-simulated-input) (xr))
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -35,6 +35,8 @@
(require 'xr) (require 'xr)
(declare-function org-ql--normalize-query "org-ql" t t)
;;;; Variables ;;;; Variables
(defvar org-ql-test-buffer nil (defvar org-ql-test-buffer nil
@ -1984,13 +1986,13 @@ with keyword arg NOW in PLIST."
(expression-link "[[org-ql-search:todo:?title%3D%28error%20%22UNSAFE%22%29]]")) (expression-link "[[org-ql-search:todo:?title%3D%28error%20%22UNSAFE%22%29]]"))
(it "Errors for a quoted lambda" (it "Errors for a quoted lambda"
(expect (open-link quoted-lambda-link) (expect (open-link quoted-lambda-link)
:to-throw 'wrong-type-argument '(characterp lambda))) :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (lambda (_ _) (error \"UNSAFE\"))")))
(it "Errors for an unquoted lambda" (it "Errors for an unquoted lambda"
(expect (open-link unquoted-lambda-link) (expect (open-link unquoted-lambda-link)
:to-throw 'wrong-type-argument '(characterp lambda))) :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (lambda (_ _) (error \"UNSAFE\"))")))
(it "Errors for an expression" (it "Errors for an expression"
(expect (open-link expression-link) (expect (open-link expression-link)
:to-throw 'wrong-type-argument '(characterp error)))) :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (error \"UNSAFE\")"))))
(describe "sort parameter" (describe "sort parameter"
:var ((quoted-lambda-link "[[org-ql-search:todo:?sort%3D%28lambda%20%28_%20_%29%20%28error%20%22UNSAFE%22%29%29]]") :var ((quoted-lambda-link "[[org-ql-search:todo:?sort%3D%28lambda%20%28_%20_%29%20%28error%20%22UNSAFE%22%29%29]]")