From e885001a2ad14b8367ce66e011ecd6088782f677 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 1 Nov 2023 14:37:59 -0500 Subject: [PATCH 01/43] Comment: Add TODO --- org-ql-find.el | 1 + 1 file changed, 1 insertion(+) diff --git a/org-ql-find.el b/org-ql-find.el index 394b3a4..13c2016 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -137,6 +137,7 @@ which see (but only the files are used)." ;;;###autoload (defun org-ql-find-path () "Call `org-ql-find' to search outline paths in the current buffer." + ;; TODO: Use same interactive form as `org-ql-find'. (interactive) (let ((org-ql-default-predicate 'outline-path)) (org-ql-find (current-buffer)))) From 72b9934d1f98635492513c106f27a220bb829b01 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 6 Nov 2023 15:52:33 -0600 Subject: [PATCH 02/43] Change: (org-ql-find.el) Factor out interactive form And use in org-ql-find-path. --- org-ql-find.el | 76 ++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/org-ql-find.el b/org-ql-find.el index 13c2016..03a2829 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -49,7 +49,7 @@ See function `display-buffer'." :type 'sexp) -;;;; Functions +;;;; Commands ;;;###autoload (cl-defun org-ql-find (buffers-files &key query-prefix query-filter @@ -70,19 +70,7 @@ types is filtered before execution (e.g. it could replace spaces with commas to turn multiple tokens, which would normally be treated as multiple predicates, into multiple arguments to a single predicate)." - (interactive - (list (if current-prefix-arg - (mapcar #'get-buffer - (completing-read-multiple - "Buffers: " - (cl-loop for buffer in (buffer-list) - when (eq 'org-mode (buffer-local-value 'major-mode buffer)) - collect (buffer-name buffer)) - nil t)) - (cond ((derived-mode-p 'org-agenda-mode) (or org-ql-view-buffers-files - org-agenda-contributing-files)) - ((derived-mode-p 'org-mode) (current-buffer)) - (t (user-error "This is not an Org-related buffer: %S" (current-buffer))))))) + (interactive (list (org-ql-find--buffers))) (let ((marker (org-ql-completing-read buffers-files :query-prefix query-prefix :query-filter query-filter @@ -135,12 +123,16 @@ which see (but only the files are used)." (org-ql-find (org-ql-search-directories-files))) ;;;###autoload -(defun org-ql-find-path () - "Call `org-ql-find' to search outline paths in the current buffer." - ;; TODO: Use same interactive form as `org-ql-find'. - (interactive) +(defun org-ql-find-path (buffers-files) + "Call `org-ql-find' to search outline paths in BUFFERS-FILES. +Interactively, search the buffers and files relevant to the +current buffer (i.e. in `org-agenda-mode', the value of +`org-ql-view-buffers-files' or `org-agenda-contributing-files'; +in `org-mode', that buffer). With universal prefix, select +multiple buffers to search with completion and PROMPT." + (interactive (list (org-ql-find--buffers))) (let ((org-ql-default-predicate 'outline-path)) - (org-ql-find (current-buffer)))) + (org-ql-find buffers-files))) ;;;###autoload (cl-defun org-ql-open-link (buffers-files &key query-prefix query-filter @@ -150,21 +142,14 @@ Links found in entries matching the input query are offered as candidates, and the selected one is opened with `org-open-at-point'. Arguments BUFFERS-FILES, QUERY-FILTER, QUERY-PREFIX, and PROMPT are passed to `org-ql-completing-read', -which see." - (interactive - ;; FIXME: Factor this out. - (list (if current-prefix-arg - (mapcar #'get-buffer - (completing-read-multiple - "Buffers: " - (cl-loop for buffer in (buffer-list) - when (eq 'org-mode (buffer-local-value 'major-mode buffer)) - collect (buffer-name buffer)) - nil t)) - (progn - (unless (eq major-mode 'org-mode) - (user-error "This is not an Org buffer: %S" (current-buffer))) - (current-buffer))))) +which see. + +Interactively, search the buffers and files relevant to the +current buffer (i.e. in `org-agenda-mode', the value of +`org-ql-view-buffers-files' or `org-agenda-contributing-files'; +in `org-mode', that buffer). With universal prefix, select +multiple buffers to search with completion and PROMPT." + (interactive (list (org-ql-find--buffers))) (let* ((marker (org-ql-completing-read buffers-files :query-prefix query-prefix :query-filter query-filter @@ -193,6 +178,29 @@ which see." (org-with-point-at marker (org-open-at-point)))) +;;;; Functions + +(defun org-ql-find--buffers () + "Return list of buffers to search in. +In a mode derived from `org-agenda-mode', return the value of +`org-ql-view-buffers-files' or `org-agenda-contributing-files'. +In a mode derived from `org-mode', return the current buffer. +When `current-prefix-arg', read a list of buffers in `org-mode' +with completion. To be used in `org-ql-find' commands' +interactive forms." + (if current-prefix-arg + (mapcar #'get-buffer + (completing-read-multiple + "Buffers: " + (cl-loop for buffer in (buffer-list) + when (eq 'org-mode (buffer-local-value 'major-mode buffer)) + collect (buffer-name buffer)) + nil t)) + (cond ((derived-mode-p 'org-agenda-mode) (or org-ql-view-buffers-files + org-agenda-contributing-files)) + ((derived-mode-p 'org-mode) (current-buffer)) + (t (user-error "This is not an Org-related buffer: %S" (current-buffer)))))) + (provide 'org-ql-find) ;;; org-ql-find.el ends here From 4f62ba3bd6d639b021ee9f159357b2a80d7a2f92 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 6 Nov 2023 16:30:20 -0600 Subject: [PATCH 03/43] Fix: (org-ql-find) Pop to buffer then go to position Seems that selecting the window after going to the position can sometimes break (probably because of the window point). --- org-ql-find.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org-ql-find.el b/org-ql-find.el index 03a2829..84dad91 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -76,9 +76,8 @@ single predicate)." :query-filter query-filter :prompt prompt))) (set-buffer (marker-buffer marker)) + (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (goto-char marker) - (display-buffer (current-buffer) org-ql-find-display-buffer-action) - (select-window (get-buffer-window (current-buffer))) (run-hook-with-args 'org-ql-find-goto-hook))) ;;;###autoload From 5775848b8a89ddb970f9d77c706f261e95638e9b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 03:56:58 -0600 Subject: [PATCH 04/43] Meta: v0.7.4-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 207 +++++++++++++++++++++++++++------------------------- 3 files changed, 114 insertions(+), 99 deletions(-) diff --git a/README.org b/README.org index b8893e0..3fa1607 100644 --- a/README.org +++ b/README.org @@ -542,6 +542,10 @@ 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. +** 0.7.4-pre + +Nothing new yet. + ** 0.7.3 *Fixes* diff --git a/org-ql.el b/org-ql.el index 1bf1900..568225d 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.7.3 +;; Version: 0.7.4-pre ;; Package-Requires: ((emacs "26.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 diff --git a/org-ql.info b/org-ql.info index 94eb443..998316a 100644 --- a/org-ql.info +++ b/org-ql.info @@ -71,6 +71,7 @@ Functions / Macros Changelog +* 0.7.4-pre: 074-pre. * 0.7.3: 073. * 0.7.2: 072. * 0.7.1: 071. @@ -993,6 +994,7 @@ releases. * Menu: +* 0.7.4-pre: 074-pre. * 0.7.3: 073. * 0.7.2: 072. * 0.7.1: 071. @@ -1024,9 +1026,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 073, Next: 072, Up: Changelog +File: README.info, Node: 074-pre, Next: 073, Up: Changelog -5.1 0.7.3 +5.1 0.7.4-pre +============= + +Nothing new yet. + + +File: README.info, Node: 073, Next: 072, Prev: 074-pre, Up: Changelog + +5.2 0.7.3 ========= *Fixes* @@ -1044,7 +1054,7 @@ File: README.info, Node: 073, Next: 072, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.2 0.7.2 +5.3 0.7.2 ========= *Fixes* @@ -1065,7 +1075,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.3 0.7.1 +5.4 0.7.1 ========= *Fixes* @@ -1084,7 +1094,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.4 0.7 +5.5 0.7 ======= *Added* @@ -1144,7 +1154,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.5 0.6.3 +5.6 0.6.3 ========= *Fixed* @@ -1160,7 +1170,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.6 0.6.2 +5.7 0.6.2 ========= *Fixed* @@ -1171,7 +1181,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.7 0.6.1 +5.8 0.6.1 ========= *Fixed* @@ -1189,7 +1199,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.8 0.6 +5.9 0.6 ======= *Added* @@ -1256,8 +1266,8 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.9 0.5.2 -========= +5.10 0.5.2 +========== *Fixed* • Predicate ‘link’’s ‘:target’ and ‘:regexp-p’ arguments. (#220 @@ -1267,7 +1277,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.10 0.5.1 +5.11 0.5.1 ========== *Fixed* @@ -1280,7 +1290,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.11 0.5 +5.12 0.5 ======== *Added* @@ -1321,7 +1331,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.12 0.4.9 +5.13 0.4.9 ========== *Fixed* @@ -1332,7 +1342,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.13 0.4.8 +5.14 0.4.8 ========== *Fixed* @@ -1344,7 +1354,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.14 0.4.7 +5.15 0.4.7 ========== *Fixed* @@ -1357,7 +1367,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.15 0.4.6 +5.16 0.4.6 ========== *Fixed* @@ -1370,7 +1380,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.16 0.4.5 +5.17 0.4.5 ========== *Fixed* @@ -1382,7 +1392,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.17 0.4.4 +5.18 0.4.4 ========== *Fixed* @@ -1394,7 +1404,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.18 0.4.3 +5.19 0.4.3 ========== *Fixed* @@ -1404,7 +1414,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.19 0.4.2 +5.20 0.4.2 ========== *Fixed* @@ -1413,7 +1423,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.20 0.4.1 +5.21 0.4.1 ========== *Fixed* @@ -1423,7 +1433,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.21 0.4 +5.22 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1504,7 +1514,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.22 0.3.2 +5.23 0.3.2 ========== *Fixed* @@ -1517,7 +1527,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.23 0.3.1 +5.24 0.3.1 ========== *Fixed* @@ -1527,7 +1537,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.24 0.3 +5.25 0.3 ======== *Added* @@ -1595,7 +1605,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.25 0.2.3 +5.26 0.2.3 ========== *Fixed* @@ -1605,7 +1615,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.26 0.2.2 +5.27 0.2.2 ========== *Fixed* @@ -1616,7 +1626,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.27 0.2.1 +5.28 0.2.1 ========== *Fixed* @@ -1626,7 +1636,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.28 0.2 +5.29 0.2 ======== *Added* @@ -1709,7 +1719,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.29 0.1 +5.30 0.1 ======== First tagged release. @@ -1767,73 +1777,74 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1805 -Node: Screenshots1928 -Node: Installation2046 -Node: Quelpa2560 -Node: Helm support3088 -Node: Usage3491 -Node: Commands3889 -Node: org-ql-find4333 -Node: org-ql-refile4799 -Node: org-ql-search5122 -Node: helm-org-ql6818 -Node: org-ql-view7196 -Node: org-ql-view-sidebar7726 -Node: org-ql-view-recent-items8106 -Node: org-ql-sparse-tree8602 -Node: Queries9402 -Node: Non-sexp query syntax10519 -Node: General predicates12278 -Node: Ancestor/descendant predicates19265 -Node: Date/time predicates20393 -Node: Functions / Macros23517 -Node: Agenda-like views23815 -Ref: Function org-ql-block23977 -Node: Listing / acting-on results25238 -Ref: Caching25446 -Ref: Function org-ql-select26359 -Ref: Function org-ql-query28785 -Ref: Macro org-ql (deprecated)30559 -Node: Custom predicates30874 -Ref: Macro org-ql-defpred31098 -Node: Dynamic block34539 -Node: Links37263 -Node: Tips37950 -Node: Changelog38274 -Node: 07339065 -Node: 07239785 -Node: 07140704 -Node: 0741513 -Node: 06344437 -Node: 06244968 -Node: 06145273 -Node: 0645841 -Node: 05248895 -Node: 05149195 -Node: 0549620 -Node: 04951151 -Node: 04851433 -Node: 04751782 -Node: 04652191 -Node: 04552599 -Node: 04452960 -Node: 04353319 -Node: 04253522 -Node: 04153683 -Node: 0453930 -Node: 03258031 -Node: 03158434 -Node: 0358631 -Node: 02361931 -Node: 02262165 -Node: 02162445 -Node: 0262650 -Node: 0166728 -Node: Notes66829 -Node: Comparison with Org Agenda searches66991 -Node: org-sidebar67880 -Node: License68159 +Node: Contents1827 +Node: Screenshots1950 +Node: Installation2068 +Node: Quelpa2582 +Node: Helm support3110 +Node: Usage3513 +Node: Commands3911 +Node: org-ql-find4355 +Node: org-ql-refile4821 +Node: org-ql-search5144 +Node: helm-org-ql6840 +Node: org-ql-view7218 +Node: org-ql-view-sidebar7748 +Node: org-ql-view-recent-items8128 +Node: org-ql-sparse-tree8624 +Node: Queries9424 +Node: Non-sexp query syntax10541 +Node: General predicates12300 +Node: Ancestor/descendant predicates19287 +Node: Date/time predicates20415 +Node: Functions / Macros23539 +Node: Agenda-like views23837 +Ref: Function org-ql-block23999 +Node: Listing / acting-on results25260 +Ref: Caching25468 +Ref: Function org-ql-select26381 +Ref: Function org-ql-query28807 +Ref: Macro org-ql (deprecated)30581 +Node: Custom predicates30896 +Ref: Macro org-ql-defpred31120 +Node: Dynamic block34561 +Node: Links37285 +Node: Tips37972 +Node: Changelog38296 +Node: 074-pre39109 +Node: 07339221 +Node: 07239957 +Node: 07140876 +Node: 0741685 +Node: 06344609 +Node: 06245140 +Node: 06145445 +Node: 0646013 +Node: 05249067 +Node: 05149369 +Node: 0549794 +Node: 04951325 +Node: 04851607 +Node: 04751956 +Node: 04652365 +Node: 04552773 +Node: 04453134 +Node: 04353493 +Node: 04253696 +Node: 04153857 +Node: 0454104 +Node: 03258205 +Node: 03158608 +Node: 0358805 +Node: 02362105 +Node: 02262339 +Node: 02162619 +Node: 0262824 +Node: 0166902 +Node: Notes67003 +Node: Comparison with Org Agenda searches67165 +Node: org-sidebar68054 +Node: License68333  End Tag Table From 7a6b622cd025d0244e10bf11758001335d64eb02 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 03:57:35 -0600 Subject: [PATCH 05/43] Fix: Ignore empty quoted strings when parsing string queries Fixes #383. Reported-by: Adam Porter --- README.org | 3 ++- org-ql.el | 18 ++++++++++++++++-- tests/test-org-ql.el | 8 ++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 3fa1607..ba7ad9d 100644 --- a/README.org +++ b/README.org @@ -544,7 +544,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.7.4-pre -Nothing new yet. +*Fixes* ++ Ignore empty quoted strings in plain-string queries ([[https://github.com/alphapapa/org-ql/issues/383][#383]]). ** 0.7.3 diff --git a/org-ql.el b/org-ql.el index 568225d..96a3235 100644 --- a/org-ql.el +++ b/org-ql.el @@ -285,6 +285,11 @@ Matches with or without time.") :link '(custom-manual "(org-ql)Usage") :link '(url-link "https://github.com/alphapapa/org-ql")) +(defcustom org-ql-signal-peg-failure nil + "Signal an error when parsing a plain-string query fails. +This should only be enabled while debugging." + :type 'boolean) + (defcustom org-ql-ask-unsafe-queries t "Ask before running a query that could run arbitrary code. Org QL queries in sexp form can contain arbitrary expressions. @@ -950,7 +955,7 @@ value of `org-ql-predicates')." (term (or (and negation (list positive-term) ;; This is a bit confusing, but it seems to work. There's probably a better way. `(pred -- (list 'not (car pred)))) - positive-term)) + positive-term empty-quote)) (positive-term (or (and predicate-with-args `(pred args -- (cons (intern pred) args))) (and predicate-without-args `(pred -- (list (intern pred)))) (and plain-string `(s -- (list org-ql-default-predicate s))))) @@ -963,6 +968,12 @@ value of `org-ql-predicates')." (keyword (substring (+ (not (or separator "=" "\"" (syntax-class whitespace))) (any)))) (quoted-arg "\"" (substring (+ (not (or separator "\"")) (any))) "\"") (unquoted-arg (substring (+ (not (or separator "\"" (syntax-class whitespace))) (any)))) + (empty-quote + ;; This avoids aborting parsing or signaling an + ;; error if the user types in two successive + ;; quotation marks while typing a query (e.g. when + ;; using electric-pair-mode). + "\"\"") (negation "!") (separator "," ))) (closure (lambda (input &optional boolean) @@ -983,7 +994,10 @@ value of `org-ql-predicates')." ;; have to borrow some code. It ends up that we only have to ;; borrow this `with-peg-rules' call, which isn't too bad. (eval `(with-peg-rules ,pexs - (peg-run (peg ,(caar pexs)) #'peg-signal-failure)))))) + (peg-run (peg ,(caar pexs)) + (lambda (failures) + (when org-ql-signal-peg-failure + (peg-signal-failure failures))))))))) (pcase parsed-sexp (`(,one-predicate) one-predicate) (`(,_ . ,_) (cons boolean (reverse parsed-sexp))) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 9008179..12e8eb0 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -648,6 +648,14 @@ with keyword arg NOW in PLIST." ;; TODO: Other predicates. + (it "Ignores empty quoted strings" + (expect (org-ql--query-string-to-sexp "\"\"") + :to-equal nil) + (expect (org-ql--query-string-to-sexp "foo \"\" bar") + :to-equal '(and (rifle "foo") (rifle "bar"))) + (expect (org-ql--query-string-to-sexp "foo \"baz\" bar") + :to-equal '(and (rifle "foo") (rifle "baz") (rifle "bar")))) + (it "Negated terms" (expect (org-ql--query-string-to-sexp "todo: !todo:CHECK,SOMEDAY") :to-equal '(and (todo) (not (todo "CHECK" "SOMEDAY")))) From 38e16b4a5f9148d2aba0e8a17cfe123771e981a5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 04:11:01 -0600 Subject: [PATCH 06/43] Release: v0.7.4 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 152 ++++++++++++++++++++++++++-------------------------- 3 files changed, 79 insertions(+), 77 deletions(-) diff --git a/README.org b/README.org index ba7ad9d..3ad7c23 100644 --- a/README.org +++ b/README.org @@ -542,7 +542,7 @@ 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. -** 0.7.4-pre +** 0.7.4 *Fixes* + Ignore empty quoted strings in plain-string queries ([[https://github.com/alphapapa/org-ql/issues/383][#383]]). diff --git a/org-ql.el b/org-ql.el index 96a3235..571b63c 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.7.4-pre +;; Version: 0.7.4 ;; Package-Requires: ((emacs "26.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 diff --git a/org-ql.info b/org-ql.info index 998316a..9ac9522 100644 --- a/org-ql.info +++ b/org-ql.info @@ -71,7 +71,7 @@ Functions / Macros Changelog -* 0.7.4-pre: 074-pre. +* 0.7.4: 074. * 0.7.3: 073. * 0.7.2: 072. * 0.7.1: 071. @@ -994,7 +994,7 @@ releases. * Menu: -* 0.7.4-pre: 074-pre. +* 0.7.4: 074. * 0.7.3: 073. * 0.7.2: 072. * 0.7.1: 071. @@ -1026,15 +1026,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 074-pre, Next: 073, Up: Changelog +File: README.info, Node: 074, Next: 073, Up: Changelog -5.1 0.7.4-pre -============= +5.1 0.7.4 +========= -Nothing new yet. +*Fixes* + • Ignore empty quoted strings in plain-string queries (#383 + (https://github.com/alphapapa/org-ql/issues/383)).  -File: README.info, Node: 073, Next: 072, Prev: 074-pre, Up: Changelog +File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog 5.2 0.7.3 ========= @@ -1777,74 +1779,74 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1827 -Node: Screenshots1950 -Node: Installation2068 -Node: Quelpa2582 -Node: Helm support3110 -Node: Usage3513 -Node: Commands3911 -Node: org-ql-find4355 -Node: org-ql-refile4821 -Node: org-ql-search5144 -Node: helm-org-ql6840 -Node: org-ql-view7218 -Node: org-ql-view-sidebar7748 -Node: org-ql-view-recent-items8128 -Node: org-ql-sparse-tree8624 -Node: Queries9424 -Node: Non-sexp query syntax10541 -Node: General predicates12300 -Node: Ancestor/descendant predicates19287 -Node: Date/time predicates20415 -Node: Functions / Macros23539 -Node: Agenda-like views23837 -Ref: Function org-ql-block23999 -Node: Listing / acting-on results25260 -Ref: Caching25468 -Ref: Function org-ql-select26381 -Ref: Function org-ql-query28807 -Ref: Macro org-ql (deprecated)30581 -Node: Custom predicates30896 -Ref: Macro org-ql-defpred31120 -Node: Dynamic block34561 -Node: Links37285 -Node: Tips37972 -Node: Changelog38296 -Node: 074-pre39109 -Node: 07339221 -Node: 07239957 -Node: 07140876 -Node: 0741685 -Node: 06344609 -Node: 06245140 -Node: 06145445 -Node: 0646013 -Node: 05249067 -Node: 05149369 -Node: 0549794 -Node: 04951325 -Node: 04851607 -Node: 04751956 -Node: 04652365 -Node: 04552773 -Node: 04453134 -Node: 04353493 -Node: 04253696 -Node: 04153857 -Node: 0454104 -Node: 03258205 -Node: 03158608 -Node: 0358805 -Node: 02362105 -Node: 02262339 -Node: 02162619 -Node: 0262824 -Node: 0166902 -Node: Notes67003 -Node: Comparison with Org Agenda searches67165 -Node: org-sidebar68054 -Node: License68333 +Node: Contents1819 +Node: Screenshots1942 +Node: Installation2060 +Node: Quelpa2574 +Node: Helm support3102 +Node: Usage3505 +Node: Commands3903 +Node: org-ql-find4347 +Node: org-ql-refile4813 +Node: org-ql-search5136 +Node: helm-org-ql6832 +Node: org-ql-view7210 +Node: org-ql-view-sidebar7740 +Node: org-ql-view-recent-items8120 +Node: org-ql-sparse-tree8616 +Node: Queries9416 +Node: Non-sexp query syntax10533 +Node: General predicates12292 +Node: Ancestor/descendant predicates19279 +Node: Date/time predicates20407 +Node: Functions / Macros23531 +Node: Agenda-like views23829 +Ref: Function org-ql-block23991 +Node: Listing / acting-on results25252 +Ref: Caching25460 +Ref: Function org-ql-select26373 +Ref: Function org-ql-query28799 +Ref: Macro org-ql (deprecated)30573 +Node: Custom predicates30888 +Ref: Macro org-ql-defpred31112 +Node: Dynamic block34553 +Node: Links37277 +Node: Tips37964 +Node: Changelog38288 +Node: 07439093 +Node: 07339305 +Node: 07240037 +Node: 07140956 +Node: 0741765 +Node: 06344689 +Node: 06245220 +Node: 06145525 +Node: 0646093 +Node: 05249147 +Node: 05149449 +Node: 0549874 +Node: 04951405 +Node: 04851687 +Node: 04752036 +Node: 04652445 +Node: 04552853 +Node: 04453214 +Node: 04353573 +Node: 04253776 +Node: 04153937 +Node: 0454184 +Node: 03258285 +Node: 03158688 +Node: 0358885 +Node: 02362185 +Node: 02262419 +Node: 02162699 +Node: 0262904 +Node: 0166982 +Node: Notes67083 +Node: Comparison with Org Agenda searches67245 +Node: org-sidebar68134 +Node: License68413  End Tag Table From a31baebc4ffb75649825683fb1fcf897bf4bebef Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 04:40:39 -0600 Subject: [PATCH 07/43] Add: (org-ql-view--format-element) org-category property Hopefully this does not cause a noticeable performance impact. Maybe the new org-element caching features in Org will help with that. Fixes #363. Reported-by: Gabriele Mongiano --- README.org | 1 + org-ql-view.el | 11 +++++++- org-ql.info | 73 +++++++++++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/README.org b/README.org index f468d25..2a97f10 100644 --- a/README.org +++ b/README.org @@ -561,6 +561,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: + Command ~org-ql-find~ may be called in an ~org-agenda~ or ~org-ql-view~ buffer to search the buffers which contributed to the agenda/view buffer. + Command ~org-ql-find-path~, which searches outline paths in the current buffer. + Command ~org-ql-open-link~, which finds links in entries matching the given query, and opens the selected one with ~org-open-at-point~. (This is helpful when a collection of links are kept in Org files: rather than having to first visit the entry containing the desired link, then locate it within the entry, and then open it, the user can simply select the link and open it directly.) ++ Items in ~org-ql-view~ buffers now include the ~org-category~ text property, like Org Agenda buffers, which allows grouping with ~org-super-agenda~'s category-related selectors. ([[https://github.com/alphapapa/org-ql/issues/363][#363]]. Thanks to [[https://github.com/kofm][Gabriele Mongiano]] for reporting.) *Compatibility* diff --git a/org-ql-view.el b/org-ql-view.el index 034e762..1bb7837 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -889,7 +889,15 @@ return an empty string." (s-join ":" it) (s-wrap it ":") (org-add-props it nil 'face 'org-tag)))) - ;; (category (org-element-property :category element)) + (category (or (org-element-property :CATEGORY element) + (when-let ((marker (or (org-element-property :org-hd-marker element) + (org-element-property :org-marker element)))) + (org-with-point-at marker + (or (org-get-category) + (when buffer-file-name + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)))))) + "")) (priority-string (-some->> (org-element-property :priority element) (char-to-string) (format "[#%s]") @@ -909,6 +917,7 @@ return an empty string." (concat " " it) (org-add-props it properties 'org-agenda-type 'search + 'org-category category 'todo-state todo-keyword 'tags tag-list 'org-habit-p habit-property))))) diff --git a/org-ql.info b/org-ql.info index e965a29..1adeaa1 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1089,6 +1089,11 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog containing the desired link, then locate it within the entry, and then open it, the user can simply select the link and open it directly.) + • Items in ‘org-ql-view’ buffers now include the ‘org-category’ text + property, like Org Agenda buffers, which allows grouping with + ‘org-super-agenda’’s category-related selectors. (#363 + (https://github.com/alphapapa/org-ql/issues/363). Thanks to + Gabriele Mongiano (https://github.com/kofm) for reporting.) *Compatibility* @@ -1887,40 +1892,40 @@ Node: Links38785 Node: Tips39472 Node: Changelog39796 Node: 08-pre40620 -Node: 07442385 -Node: 07342612 -Node: 07243344 -Node: 07144263 -Node: 0745072 -Node: 06347996 -Node: 06248527 -Node: 06148832 -Node: 0649400 -Node: 05252456 -Node: 05152758 -Node: 0553183 -Node: 04954714 -Node: 04854996 -Node: 04755345 -Node: 04655754 -Node: 04556162 -Node: 04456523 -Node: 04356882 -Node: 04257085 -Node: 04157246 -Node: 0457493 -Node: 03261594 -Node: 03161997 -Node: 0362194 -Node: 02365494 -Node: 02265728 -Node: 02166008 -Node: 0266213 -Node: 0170291 -Node: Notes70392 -Node: Comparison with Org Agenda searches70554 -Node: org-sidebar71443 -Node: License71722 +Node: 07442732 +Node: 07342959 +Node: 07243691 +Node: 07144610 +Node: 0745419 +Node: 06348343 +Node: 06248874 +Node: 06149179 +Node: 0649747 +Node: 05252803 +Node: 05153105 +Node: 0553530 +Node: 04955061 +Node: 04855343 +Node: 04755692 +Node: 04656101 +Node: 04556509 +Node: 04456870 +Node: 04357229 +Node: 04257432 +Node: 04157593 +Node: 0457840 +Node: 03261941 +Node: 03162344 +Node: 0362541 +Node: 02365841 +Node: 02266075 +Node: 02166355 +Node: 0266560 +Node: 0170638 +Node: Notes70739 +Node: Comparison with Org Agenda searches70901 +Node: org-sidebar71790 +Node: License72069  End Tag Table From 0ab236f95b0616699ab63d99011e673c000ba5cf Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 05:14:34 -0600 Subject: [PATCH 08/43] Tidy: Docstring The compiler still complains that it has wrong usage of an unescaped single quote, but nothing seems to fix it. --- org-ql.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/org-ql.el b/org-ql.el index 17deec8..aad8ff0 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1135,7 +1135,7 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." (byte-compile 'org-ql--query-preamble))) (cl-defmacro org-ql-defpred (name args docstring &key body preambles normalizers coalesce) - "Define an `org-ql' selector predicate named `org-ql--predicate-NAME'. + "Define an \\+`org-ql' selector predicate \\=`org-ql--predicate-NAME'. NAME may be a symbol or a list of symbols: if a list, the first is used as NAME and the rest are aliases. A function is only created for NAME, not for aliases, so a normalizer should be used @@ -1180,7 +1180,7 @@ to variables bound in the pattern: :case-fold Bound to `case-fold-search' around the regexp search. :query Expression which should replace the query expression, - or `query' if it should not be changed (e.g. if the + or \\+`query' if it should not be changed (e.g. if the regexp is insufficient to determine whether a heading matches, in which case the predicate's body needs to be tested on the heading). If the regexp @@ -1207,7 +1207,7 @@ e.g. a predicate takes keyword arguments, so arguments to multiple calls can't be simply appended.) For convenience, within the `pcase' patterns, the symbol -`predicate-names' is a special form which is replaced with a +\\+`predicate-names' is a special form which is replaced with a pattern matching any of the predicate's name and aliases. For example, if NAME were: @@ -1215,13 +1215,13 @@ example, if NAME were: Then if NORMALIZERS were: - ((`(,predicate-names . ,args) - `(heading ,@args))) + ((\\=`(,predicate-names . ,args) + \\=`(heading ,@args))) It would be expanded to: - ((`(,(or 'heading 'h) . ,args) - `(heading ,@args)))" + ((\\=`(,(or 'heading 'h) . ,args) + \\=`(heading ,@args)))" ;; FIXME: Update defpred tutorial to include :coalesce. ;; NOTE: The debug form works, completely! For example, use `edebug-defun' From c62ff77cd3bcd58ce3a7669c1dd1ff9afe97bb6f Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 05:15:36 -0600 Subject: [PATCH 09/43] Tidy: Use compat and newer symbol names --- org-ql-completing-read.el | 4 ++-- org-ql-view.el | 6 +++--- org-ql.el | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 3f25345..9c4c044 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -82,7 +82,7 @@ To be used in, e.g. annotation functions.") (defun org-ql-completing-read-action () "Default action for `org-ql-completing-read'. Returns (STRING . MARKER) cons for entry at point." - (font-lock-ensure (point-at-bol) (point-at-eol)) + (font-lock-ensure (pos-bol) (pos-eol)) (cons (org-link-display-format (org-entry-get nil "ITEM")) (point-marker))) (defun org-ql-completing-read-snippet (marker) @@ -155,7 +155,7 @@ single predicate)." (cl-labels (;; (debug-message ;; (f &rest args) (apply #'message (concat "ORG-QL-COMPLETING-READ: " f) args)) (action () - (font-lock-ensure (point-at-bol) (point-at-eol)) + (font-lock-ensure (pos-bol) (pos-eol)) ;; This function needs to handle multiple candidates per ;; call, so we loop over a list of values by default. (pcase-dolist (`(,string . ,marker) (funcall action-filter (funcall action))) diff --git a/org-ql-view.el b/org-ql-view.el index 1bb7837..5c3b9a2 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -302,10 +302,10 @@ SLOT is passed to `display-buffer-in-side-window', which see." (defun org-ql-view-switch () "Switch to view at point." (interactive) - (let ((key (buffer-substring-no-properties (point-at-bol) (point-at-eol)))) + (let ((key (buffer-substring-no-properties (pos-bol) (pos-eol)))) (unless (string-empty-p key) (ov-clear :org-ql-view-selected) - (ov (point-at-bol) (1+ (point-at-eol)) :org-ql-view-selected t + (ov (pos-bol) (1+ (pos-eol)) :org-ql-view-selected t 'face '(:weight bold :inherit highlight)) (org-ql-view key)))) @@ -369,7 +369,7 @@ update search arguments." (defun org-ql-view-customize () "Customize view at point in `org-ql-view-sidebar' buffer." (interactive) - (let ((key (buffer-substring-no-properties (point-at-bol) (point-at-eol)))) + (let ((key (buffer-substring-no-properties (pos-bol) (pos-eol)))) (customize-option 'org-ql-views) (search-forward (concat "Name: " key)))) diff --git a/org-ql.el b/org-ql.el index aad8ff0..adc2bec 100644 --- a/org-ql.el +++ b/org-ql.el @@ -5,7 +5,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql ;; Version: 0.8-pre -;; Package-Requires: ((emacs "26.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 "26.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 ;;; License: @@ -43,6 +43,7 @@ (require 'seq) (require 'subr-x) +(require 'compat) (require 'dash) (require 'map) (require 'ts) @@ -1973,7 +1974,7 @@ language. Matching is done case-insensitively." (point))) (contents-end (progn (goto-char (match-end 0)) - (point-at-bol)))) + (pos-bol)))) (cl-loop for re in regexps do (goto-char contents-beg) always (re-search-forward re contents-end t)))))))))) From 004ed1ee0ff73de2fdbb1721bc06e2b7c8bdeef4 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 05:22:08 -0600 Subject: [PATCH 10/43] Tidy: Indentation For Emacs 29.1's and with-simulated-input's changes. --- org-ql-search.el | 22 +-- org-ql-view.el | 80 ++++----- org-ql.el | 403 +++++++++++++++++++++---------------------- tests/test-org-ql.el | 121 +++++++------ 4 files changed, 312 insertions(+), 314 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index b029544..da1cfb3 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -341,17 +341,17 @@ this (must be a single line in the Org buffer): (setf elements (cl-etypecase take ((and integer (satisfies cl-minusp)) (-take-last (abs take) elements)) (integer (-take take elements))))) - (cl-labels ((format-element - (element) (string-join (cl-loop for column in columns - collect (or (pcase-exhaustive column - ((pred symbolp) - (funcall (alist-get column format-fns) element)) - (`((,column . ,args) ,_header) - (apply (alist-get column format-fns) element args)) - (`(,column ,_header) - (funcall (alist-get column format-fns) element))) - "")) - " | "))) + (cl-labels ((format-element (element) + (string-join (cl-loop for column in columns + collect (or (pcase-exhaustive column + ((pred symbolp) + (funcall (alist-get column format-fns) element)) + (`((,column . ,args) ,_header) + (apply (alist-get column format-fns) element args)) + (`(,column ,_header) + (funcall (alist-get column format-fns) element))) + "")) + " | "))) ;; Table header (insert "| " (string-join (--map (pcase it ((pred symbolp) (capitalize (symbol-name it))) diff --git a/org-ql-view.el b/org-ql-view.el index 5c3b9a2..84507a4 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -487,11 +487,11 @@ If TITLE, prepend it to the header." Makes QUERY more readable, e.g. timestamp objects are replaced with human-readable strings." (cl-labels ((rec (form) - (cl-typecase form - (ts (ts-format form)) - (cons (cons (rec (car form)) - (rec (cdr form)))) - (otherwise form)))) + (cl-typecase form + (ts (ts-format form)) + (cons (cons (rec (car form)) + (rec (cdr form)))) + (otherwise form)))) (format "%S" (rec query)))) (defun org-ql-view--font-lock-string (mode s) @@ -533,14 +533,14 @@ dates in the past, and negative for dates in the future." (defun org-ql-view-bookmark-make-record () "Return a bookmark record for the current Org QL View buffer." - (cl-labels ((file-nameize - (b-f) (abbreviate-file-name - (cl-typecase b-f - (string b-f) - (buffer (or (buffer-file-name b-f) - (when (buffer-base-buffer b-f) - (buffer-file-name (buffer-base-buffer b-f))))) - (t (user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f)))))) + (cl-labels ((file-nameize (b-f) + (abbreviate-file-name + (cl-typecase b-f + (string b-f) + (buffer (or (buffer-file-name b-f) + (when (buffer-base-buffer b-f) + (buffer-file-name (buffer-base-buffer b-f))))) + (t (user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f)))))) (-let* ((plist (org-ql-view--plist (current-buffer))) ((&plist :buffers-files) plist)) ;; Replace buffers with their filenames, and signal error if any are not file-backed. @@ -655,23 +655,25 @@ When opened, the link searches the buffer it's opened from." (when org-ql-view-query ;; Only Org QL View buffers should have `org-ql-view-query' set. (cl-labels ((prompt-for (buffers-files) - (pcase-exhaustive - (completing-read (format "Make link that searches: ") - '("file link is in" "files currently searched") - nil t nil nil "file link is in") - ("file link is in" nil) - ("files currently searched" buffers-files))) - (strings-or-file-buffers-p - (thing) (cl-etypecase thing - (list (cl-every #'strings-or-file-buffers-p thing)) - (string thing) - (buffer (or (buffer-file-name thing) - ;; TODO: Should indirect buffers be allowed? Maybe not, since their narrowing isn't preserved. - ;; On the other hand, it's possible to accidentally make a search view for an indirect buffer - ;; that's since been widened, and forcing the user to manually change that would be awkward, - ;; and trying to communicate the problem would be difficult, so maybe it's okay to allow it. - (when (buffer-base-buffer thing) - (buffer-file-name (buffer-base-buffer thing)))))))) + (pcase-exhaustive + (completing-read (format "Make link that searches: ") + '("file link is in" "files currently searched") + nil t nil nil "file link is in") + ("file link is in" nil) + ("files currently searched" buffers-files))) + (strings-or-file-buffers-p (thing) + (cl-etypecase thing + (list (cl-every #'strings-or-file-buffers-p thing)) + (string thing) + (buffer (or (buffer-file-name thing) + ;; TODO: Should indirect buffers be allowed? Maybe not, since their + ;; narrowing isn't preserved. On the other hand, it's possible to + ;; accidentally make a search view for an indirect buffer that's + ;; since been widened, and forcing the user to manually change that + ;; would be awkward, and trying to communicate the problem would be + ;; difficult, so maybe it's okay to allow it. + (when (buffer-base-buffer thing) + (buffer-file-name (buffer-base-buffer thing)))))))) (unless (strings-or-file-buffers-p org-ql-view-buffers-files) (user-error "%s" "Views that search non-file-backed buffers can't be linked to")) (let* ((query-string (--if-let (org-ql--query-sexp-to-string org-ql-view-query) @@ -1048,11 +1050,11 @@ the variable), \"org-directory\" if it matches the value of current buffer. Otherwise BUFFERS-FILES is returned unchanged." ;; Used in `org-ql-view--complete-buffers-files' and ;; `org-ql-view--header-line-format'. - (cl-labels ((expand-files - (list) (--map (cl-typecase it - (string (expand-file-name it)) - (otherwise it)) - list))) + (cl-labels ((expand-files (list) + (--map (cl-typecase it + (string (expand-file-name it)) + (otherwise it)) + list))) ;; TODO: Test this more exhaustively. (pcase buffers-files ((pred listp) @@ -1074,10 +1076,10 @@ current buffer. Otherwise BUFFERS-FILES is returned unchanged." (defun org-ql-view--complete-buffers-files () "Return value for `org-ql-view-buffers-files' using completion." - (cl-labels ((initial-input - () (when org-ql-view-buffers-files - (org-ql-view--contract-buffers-files - org-ql-view-buffers-files)))) + (cl-labels ((initial-input () + (when org-ql-view-buffers-files + (org-ql-view--contract-buffers-files + org-ql-view-buffers-files)))) (if (and org-ql-view-buffers-files (bufferp org-ql-view-buffers-files)) ;; Buffers can't be input by name, so if the default value is a buffer, just use it. diff --git a/org-ql.el b/org-ql.el index adc2bec..cc899f2 100644 --- a/org-ql.el +++ b/org-ql.el @@ -755,38 +755,38 @@ be coalesced." ;; can't be coalesced with it since they don't specify the same ;; language. That could be fixed, but it's probably not worth it. (cl-labels ((rec (sexp) - (pcase sexp - (`(,(and boolean (or 'or 'not)) . ,sexps) - `(,boolean ,@(mapcar #'rec sexps))) - (`(and . ,sexps) - (anded sexps)) - (_ sexp))) + (pcase sexp + (`(,(and boolean (or 'or 'not)) . ,sexps) + `(,boolean ,@(mapcar #'rec sexps))) + (`(and . ,sexps) + (anded sexps)) + (_ sexp))) (anded (sexps) - (let (anded-predicates new-sexp) - (dolist (sexp sexps) - (pcase sexp - (`(,(or 'or 'not) . ,_) - (push (rec sexp) new-sexp)) - (`(,predicate . ,args) - (pcase-exhaustive (plist-get (alist-get predicate org-ql-predicates) :coalesce) - (`nil (push sexp new-sexp)) - (`t (setf (alist-get predicate anded-predicates) - (append (alist-get predicate anded-predicates) args))) - ((and fn (pred functionp)) - (if-let (new-args (funcall fn (alist-get predicate anded-predicates) args)) - (setf (alist-get predicate anded-predicates) new-args) - (push sexp new-sexp))))))) - (delq nil `(and ,@(nreverse new-sexp) ,@(nreverse anded-predicates)))))) + (let (anded-predicates new-sexp) + (dolist (sexp sexps) + (pcase sexp + (`(,(or 'or 'not) . ,_) + (push (rec sexp) new-sexp)) + (`(,predicate . ,args) + (pcase-exhaustive (plist-get (alist-get predicate org-ql-predicates) :coalesce) + (`nil (push sexp new-sexp)) + (`t (setf (alist-get predicate anded-predicates) + (append (alist-get predicate anded-predicates) args))) + ((and fn (pred functionp)) + (if-let (new-args (funcall fn (alist-get predicate anded-predicates) args)) + (setf (alist-get predicate anded-predicates) new-args) + (push sexp new-sexp))))))) + (delq nil `(and ,@(nreverse new-sexp) ,@(nreverse anded-predicates)))))) (rec query))) (defun org-ql--sanity-check-form (form) "Signal error if any forms in FORM do not have preconditions met. Or, when possible, fix the problem." (cl-flet ((check (symbol) - (pcase symbol - ('done (unless org-done-keywords - ;; NOTE: This check needs to be done from within the Org buffer being checked. - (error "Variable `org-done-keywords' is nil. Are you running this from an Org buffer?")))))) + (pcase symbol + ('done (unless org-done-keywords + ;; NOTE: This check needs to be done from within the Org buffer being checked. + (error "Variable `org-done-keywords' is nil. Are you running this from an Org buffer?")))))) (cl-loop for elem in form if (consp elem) do (progn @@ -808,28 +808,27 @@ respectively." (and "\\" (0+ "\\\\") (any "[]")) (and (1+ "\\") (not (any "[]"))))))) (cl-labels - ((no-desc - (match) (rx-to-string `(seq (or bol (1+ blank)) - "[[" ,link-target-part (regexp ,match) ,link-target-part - "]]"))) - (match-both - (description target) - (rx-to-string `(seq (or bol (1+ blank)) - "[[" ,link-target-part (regexp ,target) ,link-target-part - "][" (*? anything) (regexp ,description) (*? anything) - "]]"))) + ((no-desc (match) + (rx-to-string `(seq (or bol (1+ blank)) + "[[" ,link-target-part (regexp ,match) ,link-target-part + "]]"))) + (match-both (description target) + (rx-to-string `(seq (or bol (1+ blank)) + "[[" ,link-target-part (regexp ,target) ,link-target-part + "][" (*? anything) (regexp ,description) (*? anything) + "]]"))) ;; Note that these actually allow empty descriptions ;; or targets, depending on what they are matching. - (match-desc - (match) (rx-to-string `(seq (or bol (1+ blank)) - "[[" ,link-target-part - "][" (*? anything) (regexp ,match) (*? anything) - "]]"))) - (match-target - (match) (rx-to-string `(seq (or bol (1+ blank)) - "[[" ,link-target-part (regexp ,match) ,link-target-part - "][" (*? anything) - "]]")))) + (match-desc (match) + (rx-to-string `(seq (or bol (1+ blank)) + "[[" ,link-target-part + "][" (*? anything) (regexp ,match) (*? anything) + "]]"))) + (match-target (match) + (rx-to-string `(seq (or bol (1+ blank)) + "[[" ,link-target-part (regexp ,match) ,link-target-part + "][" (*? anything) + "]]")))) (cond (description-or-target (rx-to-string `(or (regexp ,(no-desc description-or-target)) (regexp ,(match-desc description-or-target)) @@ -884,48 +883,48 @@ Arguments STRING, POS, FILL, and LEVEL are according to ;; NOTE: The pcases check for both t/nil symbols and strings, because the ;; string queries always return keyword arguments' values as strings. (cl-macrolet ((clocked (&key from to on) - `(org-ql--predicate-clocked :from ,from :to ,to)) + `(org-ql--predicate-clocked :from ,from :to ,to)) (closed (&key from to on (with-time 'not-found)) - `(org-ql--predicate-closed :from ,from :to ,to)) + `(org-ql--predicate-closed :from ,from :to ,to)) (deadline (&key from to on (with-time 'not-found)) - `(org-ql--predicate-deadline - :from ,from :to ,to :with-time ',with-time - :regexp ,(pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-deadline-with-time) - ((or 'nil "nil") org-ql-regexp-deadline-without-time) - ('not-found org-ql-regexp-deadline)))) + `(org-ql--predicate-deadline + :from ,from :to ,to :with-time ',with-time + :regexp ,(pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-deadline-with-time) + ((or 'nil "nil") org-ql-regexp-deadline-without-time) + ('not-found org-ql-regexp-deadline)))) (planning (&key from to on (with-time 'not-found)) - `(org-ql--predicate-planning - :from ,from :to ,to :with-time ',with-time - :regexp ,(pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-planning-with-time) - ((or 'nil "nil") org-ql-regexp-planning-without-time) - ('not-found org-ql-regexp-planning)))) + `(org-ql--predicate-planning + :from ,from :to ,to :with-time ',with-time + :regexp ,(pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-planning-with-time) + ((or 'nil "nil") org-ql-regexp-planning-without-time) + ('not-found org-ql-regexp-planning)))) (scheduled (&key from to on (with-time 'not-found)) - `(org-ql--predicate-scheduled - :from ,from :to ,to :with-time ',with-time - :regexp ,(pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-scheduled-with-time) - ((or 'nil "nil") org-ql-regexp-scheduled-without-time) - ('not-found org-ql-regexp-scheduled)))) + `(org-ql--predicate-scheduled + :from ,from :to ,to :with-time ',with-time + :regexp ,(pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-scheduled-with-time) + ((or 'nil "nil") org-ql-regexp-scheduled-without-time) + ('not-found org-ql-regexp-scheduled)))) (ts (&key from to on (type 'both) (with-time 'not-found)) - ;; NOTE: The TYPE argument is elided from the arguments actually passed to the predicate, being converted to the REGEXP argument. - ;; MAYBE: Move the :regexp handling out of this macrolet and into the normalizer. - `(org-ql--predicate-ts - :from ,from :to ,to :with-time ',with-time - :regexp ,(pcase type - ((or 'nil 'both) (pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-ts-both-with-time) - ((or 'nil "nil") org-ql-regexp-ts-both-without-time) - ('not-found org-ql-regexp-ts-both))) - ('active (pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-ts-active-with-time) - ((or 'nil "nil") org-ql-regexp-ts-active-without-time) - ('not-found org-ql-regexp-ts-active))) - ('inactive (pcase-exhaustive with-time - ((or 't "t") org-ql-regexp-ts-inactive-with-time) - ((or 'nil "nil") org-ql-regexp-ts-inactive-without-time) - ('not-found org-ql-regexp-ts-inactive))))))) + ;; NOTE: The TYPE argument is elided from the arguments actually passed to the predicate, being converted to the REGEXP argument. + ;; MAYBE: Move the :regexp handling out of this macrolet and into the normalizer. + `(org-ql--predicate-ts + :from ,from :to ,to :with-time ',with-time + :regexp ,(pcase type + ((or 'nil 'both) (pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-ts-both-with-time) + ((or 'nil "nil") org-ql-regexp-ts-both-without-time) + ('not-found org-ql-regexp-ts-both))) + ('active (pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-ts-active-with-time) + ((or 'nil "nil") org-ql-regexp-ts-active-without-time) + ('not-found org-ql-regexp-ts-active))) + ('inactive (pcase-exhaustive with-time + ((or 't "t") org-ql-regexp-ts-inactive-with-time) + ((or 'nil "nil") org-ql-regexp-ts-inactive-without-time) + ('not-found org-ql-regexp-ts-inactive))))))) ,query))))) ;;;;; String query parsing @@ -1042,21 +1041,21 @@ This function is defined by calling `org-ql--define-normalize-query-fn', which uses normalizer forms defined in `org-ql-predicates' by calling `org-ql-defpred'." (cl-labels ((rec (element) - (pcase element - (`(or . ,clauses) `(or ,@(mapcar #'rec clauses))) - (`(and . ,clauses) `(and ,@(mapcar #'rec clauses))) - (`(not . ,clauses) `(not ,@(mapcar #'rec clauses))) - (`(when ,condition . ,clauses) `(when ,(rec condition) - ,@(mapcar #'rec clauses))) - (`(unless ,condition . ,clauses) `(unless ,(rec condition) - ,@(mapcar #'rec clauses))) - ;; TODO: Combine (regexp) when appropriate (i.e. inside an OR, not an AND). - ((pred stringp) `(,org-ql-default-predicate ,element)) + (pcase element + (`(or . ,clauses) `(or ,@(mapcar #'rec clauses))) + (`(and . ,clauses) `(and ,@(mapcar #'rec clauses))) + (`(not . ,clauses) `(not ,@(mapcar #'rec clauses))) + (`(when ,condition . ,clauses) `(when ,(rec condition) + ,@(mapcar #'rec clauses))) + (`(unless ,condition . ,clauses) `(unless ,(rec condition) + ,@(mapcar #'rec clauses))) + ;; TODO: Combine (regexp) when appropriate (i.e. inside an OR, not an AND). + ((pred stringp) `(,org-ql-default-predicate ,element)) - ,@normalizer-patterns + ,@normalizer-patterns - ;; Any other form: passed through unchanged. - (_ element)))) + ;; Any other form: passed through unchanged. + (_ element)))) ;; Repeat normalization until result doesn't change (limiting to 10 in case of an infinite-loop bug). (cl-loop with limit = 10 and count = 0 for new-query = (rec query) @@ -1109,18 +1108,18 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." (_ (let ((preamble-case-fold t) org-ql-preamble) (cl-labels ((rec (element) - (or (when org-ql-preamble - ;; Only one preamble is allowed - element) - (pcase element - (`(or _) element) + (or (when org-ql-preamble + ;; Only one preamble is allowed + element) + (pcase element + (`(or _) element) - ,@preamble-patterns + ,@preamble-patterns - (`(and . ,rest) - (let ((clauses (mapcar #'rec rest))) - `(and ,@(-non-nil clauses)))) - (_ element))))) + (`(and . ,rest) + (let ((clauses (mapcar #'rec rest))) + `(and ,@(-non-nil clauses)))) + (_ element))))) (setq query (pcase (mapcar #'rec (list query)) ((or `(nil) `((nil)) @@ -1984,8 +1983,8 @@ language. Matching is done case-insensitively." Tests both inherited and local tags." ;; MAYBE: -all versions for inherited and local. :body (cl-macrolet ((tags-p (tags) - `(and ,tags - (not (eq 'org-ql-nil ,tags))))) + `(and ,tags + (not (eq 'org-ql-nil ,tags))))) (-let* (((inherited local) (org-ql--tags-at (point)))) (cl-typecase tags (null (or (tags-p inherited) @@ -2010,8 +2009,8 @@ If TAGS is nil, return non-nil if heading has any inherited tags." :normalizers ((`(,predicate-names . ,tags) `(tags-inherited ,@tags))) :body (cl-macrolet ((tags-p (tags) - `(and ,tags - (not (eq 'org-ql-nil ,tags))))) + `(and ,tags + (not (eq 'org-ql-nil ,tags))))) (-let* (((inherited _) (org-ql--tags-at (point)))) (cl-typecase tags (null (tags-p inherited)) @@ -2031,8 +2030,8 @@ If TAGS is nil, return non-nil if heading has any local tags." t) :query t))) :body (cl-macrolet ((tags-p (tags) - `(and ,tags - (not (eq 'org-ql-nil ,tags))))) + `(and ,tags + (not (eq 'org-ql-nil ,tags))))) (-let* (((_ local) (org-ql--tags-at (point)))) (cl-typecase tags (null (tags-p local)) @@ -2045,8 +2044,8 @@ Tests both inherited and local tags." :normalizers ((`(,predicate-names . ,regexps) `(tags-regexp ,@regexps))) :body (cl-macrolet ((tags-p (tags) - `(and ,tags - (not (eq 'org-ql-nil ,tags))))) + `(and ,tags + (not (eq 'org-ql-nil ,tags))))) (-let* (((inherited local) (org-ql--tags-at (point)))) (cl-typecase regexps (null (or (tags-p inherited) @@ -2394,12 +2393,12 @@ any planning prefix); it defaults to 0 (i.e. the whole regexp)." :body (cl-macrolet ((next-timestamp () - `(when (re-search-forward regexp limit t) - (ts-parse-org (match-string match-group)))) + `(when (re-search-forward regexp limit t) + (ts-parse-org (match-string match-group)))) (test-timestamps (pred-form) - `(cl-loop for next-ts = (next-timestamp) - while next-ts - thereis ,pred-form))) + `(cl-loop for next-ts = (next-timestamp) + while next-ts + thereis ,pred-form))) (save-excursion (cond ((not (or from to)) (re-search-forward regexp limit t)) ((and from to) (test-timestamps (ts-in from to next-ts))) @@ -2425,27 +2424,27 @@ PREDICATES is a list of one or more sorting methods, including: `deadline', `scheduled', `closed' and `priority'." ;; MAYBE: Use macrolet instead of flet. (cl-flet* ((sorter (symbol) - (pcase symbol - ((or 'deadline 'scheduled 'closed) - (apply-partially #'org-ql--date-type< (intern (concat ":" (symbol-name symbol))))) - ;; TODO: Rename `date' to `planning'. `date' should be something else. - ('date #'org-ql--date<) - ('priority #'org-ql--priority<) - ('random (lambda (&rest _ignore) - (= 0 (random 2)))) - ;; NOTE: reverse and todo are handled below. - ;; TODO: Add more. - (_ (user-error "Invalid sorting predicate: %s" symbol)))) + (pcase symbol + ((or 'deadline 'scheduled 'closed) + (apply-partially #'org-ql--date-type< (intern (concat ":" (symbol-name symbol))))) + ;; TODO: Rename `date' to `planning'. `date' should be something else. + ('date #'org-ql--date<) + ('priority #'org-ql--priority<) + ('random (lambda (&rest _ignore) + (= 0 (random 2)))) + ;; NOTE: reverse and todo are handled below. + ;; TODO: Add more. + (_ (user-error "Invalid sorting predicate: %s" symbol)))) (sort-by-todo-keyword (items) - (let* ((grouped-items (--group-by (when-let (keyword (org-element-property :todo-keyword it)) - (substring-no-properties keyword)) - items)) - (sorted-groups (cl-sort grouped-items #'< - :key (lambda (keyword) - (or (cl-position (car keyword) org-todo-keywords-1 :test #'string=) - ;; Put at end of list if not found - (1+ (length org-todo-keywords-1))))))) - (-flatten-n 1 (-map #'cdr sorted-groups))))) + (let* ((grouped-items (--group-by (when-let (keyword (org-element-property :todo-keyword it)) + (substring-no-properties keyword)) + items)) + (sorted-groups (cl-sort grouped-items #'< + :key (lambda (keyword) + (or (cl-position (car keyword) org-todo-keywords-1 :test #'string=) + ;; Put at end of list if not found + (1+ (length org-todo-keywords-1))))))) + (-flatten-n 1 (-map #'cdr sorted-groups))))) (dolist (pred predicates) (setq items (pcase pred ;; NOTE: Using `reverse' instead of `nreverse' because my gut @@ -2470,16 +2469,16 @@ A and B are Org headline elements. TYPE should be a symbol like "Return non-nil if A's deadline or scheduled property is earlier than B's. Deadline is considered before scheduled." (cl-macrolet ((ts (item) - `(or (org-element-property :deadline ,item) - (org-element-property :scheduled ,item)))) + `(or (org-element-property :deadline ,item) + (org-element-property :scheduled ,item)))) (org-ql--org-timestamp-element< (ts a) (ts b)))) (defun org-ql--org-timestamp-element< (a b) "Return non-nil if A's date element is earlier than B's. A and B are Org timestamp elements." (cl-macrolet ((ts (ts) - `(when ,ts - (org-timestamp-format ,ts "%s")))) + `(when ,ts + (org-timestamp-format ,ts "%s")))) (let* ((a-ts (ts a)) (b-ts (ts b))) (cond ((and a-ts b-ts) @@ -2491,7 +2490,7 @@ A and B are Org timestamp elements." "Return non-nil if A's priority is higher than B's. A and B are Org headline elements." (cl-macrolet ((priority (item) - `(org-element-property :priority ,item))) + `(org-element-property :priority ,item))) ;; NOTE: Priorities are numbers in Org elements. This might differ from the priority selector logic. (let ((a-priority (priority a)) (b-priority (priority b))) @@ -2519,66 +2518,66 @@ element should be a regexp string." If QUERY can't be converted to a string, return nil." ;; This started out pretty simple...but at least it's not just one long function, right? (cl-labels ((complex-p (query) - (or (contains-p 'or query) - (contains-p 'ancestors query) - (contains-p 'children query) - (contains-p 'descendants query) - (contains-p 'parent query))) + (or (contains-p 'or query) + (contains-p 'ancestors query) + (contains-p 'children query) + (contains-p 'descendants query) + (contains-p 'parent query))) (contains-p (symbol list) - (cl-loop for element in list - thereis (or (eq symbol element) - (and (listp element) - (contains-p symbol element))))) - (format-args - (args) (let (non-paired paired next-keyword) - (cl-loop for arg in args - do (cond (next-keyword (push (cons next-keyword arg) paired) - (setf next-keyword nil)) - ((keywordp arg) (setf next-keyword (substring (symbol-name arg) 1))) - (t (push arg non-paired)))) - (string-join (append (mapcar #'format-atom non-paired) - (nreverse (--map (format "%s=%s" (car it) (cdr it)) - paired))) - ","))) - (format-atom - (atom) (cl-typecase atom - (string (if (string-match (rx space) atom) - (format "%S" atom) - (format "%s" atom))) - (t (format "%s" atom)))) - (format-form - (form) (pcase form - (`(not . (,rest)) (concat "!" (format-form rest))) - (`(priority . ,_) (format-priority form)) - ;; FIXME: Convert (src) queries to non-sexp form...someday... - (`(src . ,_) (user-error "Converting (src ...) queries to non-sexp form is not implemented")) - (_ (pcase-let* ((`(,pred . ,args) form) - (args-string (pcase args - ('() "") - ((guard (= 1 (length args))) (format "%s" (car args))) - (_ (format-args args))))) - (format "%s:%s" pred args-string))))) - (format-and - (form) (pcase-let* ((`(and . ,rest) form)) - (string-join (mapcar #'format-form rest) " "))) - (format-priority - (form) (pcase-let* ((`(priority . ,rest) form) - (args (pcase rest - (`(,(and comparator (or '< '<= '> '>= '=)) ,letter) - (priority-letters comparator letter)) - (_ rest)))) - (concat "priority:" (string-join args ",")))) - (priority-letters - (comparator letter) (let* ((char (string-to-char (upcase (symbol-name letter)))) - (numeric-priorities '(?A ?B ?C)) - ;; NOTE: The comparator inversion is intentional. - (others (pcase comparator - ('< (--select (> it char) numeric-priorities)) - ('<= (--select (>= it char) numeric-priorities)) - ('> (--select (< it char) numeric-priorities)) - ('>= (--select (<= it char) numeric-priorities)) - ('= (--select (= it char) numeric-priorities))))) - (mapcar #'char-to-string others)))) + (cl-loop for element in list + thereis (or (eq symbol element) + (and (listp element) + (contains-p symbol element))))) + (format-args (args) + (let (non-paired paired next-keyword) + (cl-loop for arg in args + do (cond (next-keyword (push (cons next-keyword arg) paired) + (setf next-keyword nil)) + ((keywordp arg) (setf next-keyword (substring (symbol-name arg) 1))) + (t (push arg non-paired)))) + (string-join (append (mapcar #'format-atom non-paired) + (nreverse (--map (format "%s=%s" (car it) (cdr it)) + paired))) + ","))) + (format-atom (atom) + (cl-typecase atom + (string (if (string-match (rx space) atom) + (format "%S" atom) + (format "%s" atom))) + (t (format "%s" atom)))) + (format-form (form) + (pcase form + (`(not . (,rest)) (concat "!" (format-form rest))) + (`(priority . ,_) (format-priority form)) + ;; FIXME: Convert (src) queries to non-sexp form...someday... + (`(src . ,_) (user-error "Converting (src ...) queries to non-sexp form is not implemented")) + (_ (pcase-let* ((`(,pred . ,args) form) + (args-string (pcase args + ('() "") + ((guard (= 1 (length args))) (format "%s" (car args))) + (_ (format-args args))))) + (format "%s:%s" pred args-string))))) + (format-and (form) + (pcase-let* ((`(and . ,rest) form)) + (string-join (mapcar #'format-form rest) " "))) + (format-priority (form) + (pcase-let* ((`(priority . ,rest) form) + (args (pcase rest + (`(,(and comparator (or '< '<= '> '>= '=)) ,letter) + (priority-letters comparator letter)) + (_ rest)))) + (concat "priority:" (string-join args ",")))) + (priority-letters (comparator letter) + (let* ((char (string-to-char (upcase (symbol-name letter)))) + (numeric-priorities '(?A ?B ?C)) + ;; NOTE: The comparator inversion is intentional. + (others (pcase comparator + ('< (--select (> it char) numeric-priorities)) + ('<= (--select (>= it char) numeric-priorities)) + ('> (--select (< it char) numeric-priorities)) + ('>= (--select (<= it char) numeric-priorities)) + ('= (--select (= it char) numeric-priorities))))) + (mapcar #'char-to-string others)))) ;; FIXME: Error out for ts structs passed to `ts' predicate (very unlikely to be linked to). (unless (complex-p query) (pcase query diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 12e8eb0..7bf6a9b 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1844,14 +1844,14 @@ with keyword arg NOW in PLIST." ;; have a chance to be gathered. So we make a test buffer and run the test in that, with a test heading. (let ((test-buffer (get-buffer-create "*test-org-ql*"))) - (cl-flet ((open-link - (link) (with-current-buffer test-buffer - (erase-buffer) - (org-mode) - (insert "* TODO Test heading \n\n") - (insert link) - (backward-char 1) - (call-interactively #'org-open-at-point)))) + (cl-flet ((open-link (link) + (with-current-buffer test-buffer + (erase-buffer) + (org-mode) + (insert "* TODO Test heading \n\n") + (insert link) + (backward-char 1) + (call-interactively #'org-open-at-point)))) (describe "buffers-files parameter" :var ((quoted-lambda-link "[[org-ql-search:todo:?buffers-files%3D%28lambda%20nil%20%28error%20%22UNSAFE%22%29%29]]") @@ -2006,16 +2006,15 @@ with keyword arg NOW in PLIST." (when-let ((buffer (find-file-noselect filename 'nowarn))) (kill-buffer buffer)))) - (cl-flet ((var-after-bookmark-set-and-jump - (var buffers-files query &key sort super-groups) - (org-ql-search buffers-files query - :super-groups super-groups - :sort sort :title title :buffer view-buffer) - (set-buffer view-buffer) - (bookmark-set title) - (kill-buffer) - (bookmark-jump title) - (buffer-local-value var (get-buffer (concat "*Org QL View: " title "*"))))) + (cl-flet ((var-after-bookmark-set-and-jump (var buffers-files query &key sort super-groups) + (org-ql-search buffers-files query + :super-groups super-groups + :sort sort :title title :buffer view-buffer) + (set-buffer view-buffer) + (bookmark-set title) + (kill-buffer) + (bookmark-jump title) + (buffer-local-value var (get-buffer (concat "*Org QL View: " title "*"))))) (describe "Grouping" :var ((query '(and (todo "TODO") (regexp "heading"))) @@ -2069,18 +2068,18 @@ with keyword arg NOW in PLIST." (describe "Dynamic blocks" (describe "warn about sexp queries" - (cl-flet ((test-dblock - (&optional input) (with-current-buffer (get-buffer-create "*TEST DBLOCK*") - (erase-buffer) - (org-mode) - (insert "* TODO Heading 1\n\n" - "#+BEGIN: org-ql :query (or (todo) (regexp \"Heading\")) :columns (todo)\n" - "#+END:") - (goto-char (point-min)) - (forward-line 2) - (with-simulated-input input - (org-dblock-update)) - (kill-buffer)))) + (cl-flet ((test-dblock (&optional input) + (with-current-buffer (get-buffer-create "*TEST DBLOCK*") + (erase-buffer) + (org-mode) + (insert "* TODO Heading 1\n\n" + "#+BEGIN: org-ql :query (or (todo) (regexp \"Heading\")) :columns (todo)\n" + "#+END:") + (goto-char (point-min)) + (forward-line 2) + (with-simulated-input input + (org-dblock-update)) + (kill-buffer)))) (it "when org-ql-ask-unsafe-queries is non-nil" ;; TODO: Should the query be converted to string form if possible and only warn if not? @@ -2109,39 +2108,37 @@ with keyword arg NOW in PLIST." (insert "* TODO Test heading\n\n") (org-mode))) - (cl-flet* ((open-link-in - (link buffer input) - ;; Org REDUCED THE NUMBER OF ARGUMENTS TO `org-open-link-from-string'! That BREAKS BACKWARD - ;; COMPATIBILITY! So I have to make my own function so these tests can work across Org versions! - (with-current-buffer buffer - (erase-buffer) - (org-mode) - (insert "* TODO Test heading\n\n") - (insert link) - (backward-char 1) - (with-simulated-input input - (org-open-at-point)))) + (cl-flet* ((open-link-in (link buffer input) + ;; Org REDUCED THE NUMBER OF ARGUMENTS TO `org-open-link-from-string'! That BREAKS BACKWARD + ;; COMPATIBILITY! So I have to make my own function so these tests can work across Org versions! + (with-current-buffer buffer + (erase-buffer) + (org-mode) + (insert "* TODO Test heading\n\n") + (insert link) + (backward-char 1) + (with-simulated-input input + (org-open-at-point)))) - (var-after-link-save-open - (var buffers-files query &key sort super-groups - (buffer link-buffer) (store-input "RET") open-input) - (org-ql-search buffers-files query - :super-groups super-groups - :sort sort :title title :buffer view-buffer) - (with-current-buffer view-buffer - (cl-assert (member '("org-ql-search" :follow org-ql-view--link-follow :store org-ql-view--link-store) - org-link-parameters) - t) - (with-simulated-input store-input - ;; Avoid writing "Stored: ..." to test output. - (let ((inhibit-message t)) - (call-interactively #'org-store-link nil))) - (kill-buffer)) - (cl-assert (and org-stored-links (caar org-stored-links)) t) - (open-link-in (caar org-stored-links) buffer open-input) - (with-current-buffer (get-buffer (concat "*Org QL View: " title "*")) - (prog1 (buffer-local-value var (current-buffer)) - (kill-buffer))))) + (var-after-link-save-open (var buffers-files query &key sort super-groups + (buffer link-buffer) (store-input "RET") open-input) + (org-ql-search buffers-files query + :super-groups super-groups + :sort sort :title title :buffer view-buffer) + (with-current-buffer view-buffer + (cl-assert (member '("org-ql-search" :follow org-ql-view--link-follow :store org-ql-view--link-store) + org-link-parameters) + t) + (with-simulated-input store-input + ;; Avoid writing "Stored: ..." to test output. + (let ((inhibit-message t)) + (call-interactively #'org-store-link nil))) + (kill-buffer)) + (cl-assert (and org-stored-links (caar org-stored-links)) t) + (open-link-in (caar org-stored-links) buffer open-input) + (with-current-buffer (get-buffer (concat "*Org QL View: " title "*")) + (prog1 (buffer-local-value var (current-buffer)) + (kill-buffer))))) (describe "Queries" :var ((string-query "todo:TODO regexp:heading") From 1496185141d78e21748c894748378a44ba52a50c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 04:59:12 -0600 Subject: [PATCH 11/43] Fix: (property) Handle org-use-property-inheritance when unspecified Fixes #356. Reported-by: beast-pro Reported-by: pcompassion --- README.org | 6 ++- org-ql.el | 12 ++++-- org-ql.info | 113 +++++++++++++++++++++++++++------------------------- 3 files changed, 72 insertions(+), 59 deletions(-) diff --git a/README.org b/README.org index 2a97f10..4b6248d 100644 --- a/README.org +++ b/README.org @@ -248,7 +248,7 @@ Arguments are listed next to predicate names, where applicable. - Aliases: ~olps~. + =path (&rest regexps)= :: Return non-nil if current heading's buffer's filename path matches any of ~REGEXPS~ (regexp strings). Without arguments, return non-nil if buffer is file-backed. + =priority (&rest args)= :: Return non-nil if current heading has a certain priority. ~ARGS~ may be either a list of one or more priority letters as strings, or a comparator function symbol followed by a priority letter string. For example: ~(priority "A") (priority "A" "B") (priority '>= "B")~ Note that items without a priority cookie never match this predicate (while Org itself considers items without a cookie to have the default priority, which, by default, is equal to priority ~B~). -+ =property (property &optional value &key inherit)= :: Return non-nil if current entry has ~PROPERTY~ (a string), and optionally ~VALUE~ (a string). If ~INHERIT~ is nil, only match entries with ~PROPERTY~ set on the entry; if t, also match entries with inheritance. If ~INHERIT~ is not specified, use the Boolean value of ~org-use-property-inheritance~, which see (i.e. it is only interpreted as nil or non-nil). ++ =property (property &optional value &key inherit)= :: Return non-nil if current entry has ~PROPERTY~ (a string), and optionally ~VALUE~ (a string). If ~INHERIT~ is nil, only match entries with ~PROPERTY~ set on the entry; if t, also match entries with inheritance. If ~INHERIT~ is not specified, use the value of ~org-use-property-inheritance~, which see. + =regexp (&rest regexps)= :: Return non-nil if current entry matches all of ~REGEXPS~ (regexp strings). Matches against entire entry, from beginning of its heading to the next heading. - Aliases: =r=. + =rifle (&rest strings)= :: Return non-nil if each string is found in either the entry or its outline path. Works like =org-rifle=. This is probably the most useful, intuitive, general-purpose predicate. @@ -563,6 +563,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: + Command ~org-ql-open-link~, which finds links in entries matching the given query, and opens the selected one with ~org-open-at-point~. (This is helpful when a collection of links are kept in Org files: rather than having to first visit the entry containing the desired link, then locate it within the entry, and then open it, the user can simply select the link and open it directly.) + Items in ~org-ql-view~ buffers now include the ~org-category~ text property, like Org Agenda buffers, which allows grouping with ~org-super-agenda~'s category-related selectors. ([[https://github.com/alphapapa/org-ql/issues/363][#363]]. Thanks to [[https://github.com/kofm][Gabriele Mongiano]] for reporting.) +*Fixes* + ++ Predicate ~property~ correctly uses the value of ~org-use-property-inheritance~ when not specified ([[https://github.com/alphapapa/org-ql/issues/356][#356]]). + *Compatibility* + Org v9.7's ~org-element~ API changes required some adjustments. ([[https://github.com/alphapapa/org-ql/issues/364][#364]]. Thanks to several users for reporting, and to [[https://github.com/yantar92][Ihor Radchenko]] for his feedback.) diff --git a/org-ql.el b/org-ql.el index cc899f2..e0fea0c 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1823,10 +1823,14 @@ interpreted as nil or non-nil)." ;; otherwise would require ugly special-casing in the parsing). (when (keywordp property) (setf property (substring (symbol-name property) 1))) - (list 'property property value - :inherit (if (plist-member plist :inherit) - (plist-get plist :inherit) - org-use-property-inheritance)))) + `(property ,property ,value + :inherit ,(if (plist-member plist :inherit) + (plist-get plist :inherit) + ;; TODO: Add tests for these cases. + (pcase org-use-property-inheritance + (`nil nil) (`t t) + ((pred stringp) org-use-property-inheritance) + ((pred listp) `(quote ,org-use-property-inheritance))))))) ;; MAYBE: Should case folding be disabled for properties? What about values? ;; MAYBE: Support (property) without args. diff --git a/org-ql.info b/org-ql.info index 1adeaa1..b766614 100644 --- a/org-ql.info +++ b/org-ql.info @@ -521,9 +521,8 @@ Arguments are listed next to predicate names, where applicable. Return non-nil if current entry has ‘PROPERTY’ (a string), and optionally ‘VALUE’ (a string). If ‘INHERIT’ is nil, only match entries with ‘PROPERTY’ set on the entry; if t, also match entries - with inheritance. If ‘INHERIT’ is not specified, use the Boolean - value of ‘org-use-property-inheritance’, which see (i.e. it is - only interpreted as nil or non-nil). + with inheritance. If ‘INHERIT’ is not specified, use the value of + ‘org-use-property-inheritance’, which see. ‘regexp (&rest regexps)’ Return non-nil if current entry matches all of ‘REGEXPS’ (regexp strings). Matches against entire entry, from beginning of its @@ -1095,6 +1094,12 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog (https://github.com/alphapapa/org-ql/issues/363). Thanks to Gabriele Mongiano (https://github.com/kofm) for reporting.) + *Fixes* + + • Predicate ‘property’ correctly uses the value of + ‘org-use-property-inheritance’ when not specified (#356 + (https://github.com/alphapapa/org-ql/issues/356)). + *Compatibility* • Org v9.7’s ‘org-element’ API changes required some adjustments. @@ -1875,57 +1880,57 @@ Node: org-ql-sparse-tree10124 Node: Queries10924 Node: Non-sexp query syntax12041 Node: General predicates13800 -Node: Ancestor/descendant predicates20787 -Node: Date/time predicates21915 -Node: Functions / Macros25039 -Node: Agenda-like views25337 -Ref: Function org-ql-block25499 -Node: Listing / acting-on results26760 -Ref: Caching26968 -Ref: Function org-ql-select27881 -Ref: Function org-ql-query30307 -Ref: Macro org-ql (deprecated)32081 -Node: Custom predicates32396 -Ref: Macro org-ql-defpred32620 -Node: Dynamic block36061 -Node: Links38785 -Node: Tips39472 -Node: Changelog39796 -Node: 08-pre40620 -Node: 07442732 -Node: 07342959 -Node: 07243691 -Node: 07144610 -Node: 0745419 -Node: 06348343 -Node: 06248874 -Node: 06149179 -Node: 0649747 -Node: 05252803 -Node: 05153105 -Node: 0553530 -Node: 04955061 -Node: 04855343 -Node: 04755692 -Node: 04656101 -Node: 04556509 -Node: 04456870 -Node: 04357229 -Node: 04257432 -Node: 04157593 -Node: 0457840 -Node: 03261941 -Node: 03162344 -Node: 0362541 -Node: 02365841 -Node: 02266075 -Node: 02166355 -Node: 0266560 -Node: 0170638 -Node: Notes70739 -Node: Comparison with Org Agenda searches70901 -Node: org-sidebar71790 -Node: License72069 +Node: Ancestor/descendant predicates20725 +Node: Date/time predicates21853 +Node: Functions / Macros24977 +Node: Agenda-like views25275 +Ref: Function org-ql-block25437 +Node: Listing / acting-on results26698 +Ref: Caching26906 +Ref: Function org-ql-select27819 +Ref: Function org-ql-query30245 +Ref: Macro org-ql (deprecated)32019 +Node: Custom predicates32334 +Ref: Macro org-ql-defpred32558 +Node: Dynamic block35999 +Node: Links38723 +Node: Tips39410 +Node: Changelog39734 +Node: 08-pre40558 +Node: 07442864 +Node: 07343091 +Node: 07243823 +Node: 07144742 +Node: 0745551 +Node: 06348475 +Node: 06249006 +Node: 06149311 +Node: 0649879 +Node: 05252935 +Node: 05153237 +Node: 0553662 +Node: 04955193 +Node: 04855475 +Node: 04755824 +Node: 04656233 +Node: 04556641 +Node: 04457002 +Node: 04357361 +Node: 04257564 +Node: 04157725 +Node: 0457972 +Node: 03262073 +Node: 03162476 +Node: 0362673 +Node: 02365973 +Node: 02266207 +Node: 02166487 +Node: 0266692 +Node: 0170770 +Node: Notes70871 +Node: Comparison with Org Agenda searches71033 +Node: org-sidebar71922 +Node: License72201  End Tag Table From f6d7514159008ae65a224071cb16d6fa2ac36e8c Mon Sep 17 00:00:00 2001 From: Bram Schoenmakers Date: Wed, 12 Apr 2023 12:51:05 +0200 Subject: [PATCH 12/43] Handle the case when org-use-property-inheritance is a list of strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When org-use-property-inheritance is a list, then the query (property "FOO" "BAR") would bail out with: org-ql--byte-compile-warning: Invalid Org QL query: "Invalid Org QL query: \"‘\\\"BLAH\\\"’ is a malformed function\", :warning", :error (property "FOO") would still work though. So, if org-use-property-inheritance is a list, cast it to the (default) boolean value for this variable: nil. Use 'selective' inheritance when org-use-property-inheritance is a list This symbol is mentioned in the org-entry-get documentation. --- org-ql.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/org-ql.el b/org-ql.el index e0fea0c..8a00485 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1823,14 +1823,10 @@ interpreted as nil or non-nil)." ;; otherwise would require ugly special-casing in the parsing). (when (keywordp property) (setf property (substring (symbol-name property) 1))) - `(property ,property ,value - :inherit ,(if (plist-member plist :inherit) - (plist-get plist :inherit) - ;; TODO: Add tests for these cases. - (pcase org-use-property-inheritance - (`nil nil) (`t t) - ((pred stringp) org-use-property-inheritance) - ((pred listp) `(quote ,org-use-property-inheritance))))))) + (list 'property property value + :inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit)) + ((listp org-use-property-inheritance) ''selective) + (t org-use-property-inheritance))))) ;; MAYBE: Should case folding be disabled for properties? What about values? ;; MAYBE: Support (property) without args. From c78f785378e2f56e035481b8f7b58d161c038678 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 05:34:09 -0600 Subject: [PATCH 13/43] Docs: Update changelog --- README.org | 2 +- org-ql.info | 74 +++++++++++++++++++++++++++-------------------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/README.org b/README.org index 4b6248d..3b452d0 100644 --- a/README.org +++ b/README.org @@ -565,7 +565,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* -+ Predicate ~property~ correctly uses the value of ~org-use-property-inheritance~ when not specified ([[https://github.com/alphapapa/org-ql/issues/356][#356]]). ++ Predicate ~property~ correctly uses the value of ~org-use-property-inheritance~ when not specified. ([[https://github.com/alphapapa/org-ql/pull/346][#346]], [[https://github.com/alphapapa/org-ql/issues/356][#356]]. Thanks to [[https://github.com/bram85][Bram Schoenmakers]].) *Compatibility* diff --git a/org-ql.info b/org-ql.info index b766614..c53b4b5 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1097,8 +1097,10 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog *Fixes* • Predicate ‘property’ correctly uses the value of - ‘org-use-property-inheritance’ when not specified (#356 - (https://github.com/alphapapa/org-ql/issues/356)). + ‘org-use-property-inheritance’ when not specified. (#346 + (https://github.com/alphapapa/org-ql/pull/346), #356 + (https://github.com/alphapapa/org-ql/issues/356). Thanks to Bram + Schoenmakers (https://github.com/bram85).) *Compatibility* @@ -1897,40 +1899,40 @@ Node: Links38723 Node: Tips39410 Node: Changelog39734 Node: 08-pre40558 -Node: 07442864 -Node: 07343091 -Node: 07243823 -Node: 07144742 -Node: 0745551 -Node: 06348475 -Node: 06249006 -Node: 06149311 -Node: 0649879 -Node: 05252935 -Node: 05153237 -Node: 0553662 -Node: 04955193 -Node: 04855475 -Node: 04755824 -Node: 04656233 -Node: 04556641 -Node: 04457002 -Node: 04357361 -Node: 04257564 -Node: 04157725 -Node: 0457972 -Node: 03262073 -Node: 03162476 -Node: 0362673 -Node: 02365973 -Node: 02266207 -Node: 02166487 -Node: 0266692 -Node: 0170770 -Node: Notes70871 -Node: Comparison with Org Agenda searches71033 -Node: org-sidebar71922 -Node: License72201 +Node: 07442987 +Node: 07343214 +Node: 07243946 +Node: 07144865 +Node: 0745674 +Node: 06348598 +Node: 06249129 +Node: 06149434 +Node: 0650002 +Node: 05253058 +Node: 05153360 +Node: 0553785 +Node: 04955316 +Node: 04855598 +Node: 04755947 +Node: 04656356 +Node: 04556764 +Node: 04457125 +Node: 04357484 +Node: 04257687 +Node: 04157848 +Node: 0458095 +Node: 03262196 +Node: 03162599 +Node: 0362796 +Node: 02366096 +Node: 02266330 +Node: 02166610 +Node: 0266815 +Node: 0170893 +Node: Notes70994 +Node: Comparison with Org Agenda searches71156 +Node: org-sidebar72045 +Node: License72324  End Tag Table From 3dc2409539eb67206954effdcb22f1a78f52ab56 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 07:10:52 -0600 Subject: [PATCH 14/43] Meta: Require Emacs 27.1 or later Emacs 26.3 is quite old now, and I can't practically run tests for it anymore because some other dependencies have dropped support for it. --- .github/workflows/test.yml | 1 - README.org | 1 + org-ql.el | 2 +- org-ql.info | 69 +++++++++++++++++++------------------- 4 files changed, 37 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87bc281..4f11ce7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,6 @@ jobs: fail-fast: false matrix: emacs_version: - - 26.3 - 27.1 - 27.2 - 28.1 diff --git a/README.org b/README.org index 3b452d0..3d2f75e 100644 --- a/README.org +++ b/README.org @@ -569,6 +569,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Compatibility* ++ Emacs 27.1 or later is now required. + Org v9.7's ~org-element~ API changes required some adjustments. ([[https://github.com/alphapapa/org-ql/issues/364][#364]]. Thanks to several users for reporting, and to [[https://github.com/yantar92][Ihor Radchenko]] for his feedback.) ** 0.7.4 diff --git a/org-ql.el b/org-ql.el index 8a00485..2ba9a31 100644 --- a/org-ql.el +++ b/org-ql.el @@ -5,7 +5,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql ;; Version: 0.8-pre -;; Package-Requires: ((emacs "26.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 ;;; License: diff --git a/org-ql.info b/org-ql.info index c53b4b5..ecc4d75 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1104,6 +1104,7 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog *Compatibility* + • Emacs 27.1 or later is now required. • Org v9.7’s ‘org-element’ API changes required some adjustments. (#364 (https://github.com/alphapapa/org-ql/issues/364). Thanks to several users for reporting, and to Ihor Radchenko @@ -1899,40 +1900,40 @@ Node: Links38723 Node: Tips39410 Node: Changelog39734 Node: 08-pre40558 -Node: 07442987 -Node: 07343214 -Node: 07243946 -Node: 07144865 -Node: 0745674 -Node: 06348598 -Node: 06249129 -Node: 06149434 -Node: 0650002 -Node: 05253058 -Node: 05153360 -Node: 0553785 -Node: 04955316 -Node: 04855598 -Node: 04755947 -Node: 04656356 -Node: 04556764 -Node: 04457125 -Node: 04357484 -Node: 04257687 -Node: 04157848 -Node: 0458095 -Node: 03262196 -Node: 03162599 -Node: 0362796 -Node: 02366096 -Node: 02266330 -Node: 02166610 -Node: 0266815 -Node: 0170893 -Node: Notes70994 -Node: Comparison with Org Agenda searches71156 -Node: org-sidebar72045 -Node: License72324 +Node: 07443031 +Node: 07343258 +Node: 07243990 +Node: 07144909 +Node: 0745718 +Node: 06348642 +Node: 06249173 +Node: 06149478 +Node: 0650046 +Node: 05253102 +Node: 05153404 +Node: 0553829 +Node: 04955360 +Node: 04855642 +Node: 04755991 +Node: 04656400 +Node: 04556808 +Node: 04457169 +Node: 04357528 +Node: 04257731 +Node: 04157892 +Node: 0458139 +Node: 03262240 +Node: 03162643 +Node: 0362840 +Node: 02366140 +Node: 02266374 +Node: 02166654 +Node: 0266859 +Node: 0170937 +Node: Notes71038 +Node: Comparison with Org Agenda searches71200 +Node: org-sidebar72089 +Node: License72368  End Tag Table From 77b4c2bce214905901ce47ffbf0fa1a930bb657e Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 16 Dec 2023 07:49:00 -0600 Subject: [PATCH 15/43] Meta: Add bug report template --- .github/ISSUE_TEMPLATE/bug_report.yml | 78 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 45 +++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..87794a3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,78 @@ +name: Bug Report +description: File a bug report +labels: ["bug"] +assignees: + - alphapapa +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: os-platform + attributes: + label: OS/platform + description: What operating system or platform are you running Emacs on? + validations: + required: true + - type: textarea + id: emacs-provenance + attributes: + label: Emacs version and provenance + description: What version of Emacs are you using, where did you acquire it, and how did you install it? + validations: + required: true + - type: input + id: emacs-command + attributes: + label: Emacs command + description: By what method did you run Emacs? (i.e. what command did you run?) + validations: + required: true + # - type: input + # id: emacs-frame + # attributes: + # label: Emacs frame type + # description: Did the problem happen on a GUI or tty Emacs frame? + # validations: + # required: true + - type: input + id: package-provenance + attributes: + label: org-ql package version and provenance + description: What version of org-ql are you using, where did you acquire it, and how did you install it? + validations: + required: true + - type: textarea + id: actions + attributes: + label: Actions taken + description: What actions did you take, step-by-step, in order, before the problem was noticed? + validations: + required: true + - type: textarea + id: results + attributes: + label: Observed results + description: What behavior did you observe that seemed wrong? + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected results + description: What behavior did you expect to observe? + validations: + required: true + - type: textarea + id: backtrace + attributes: + label: Backtrace + description: If an error was signaled, please use `M-x toggle-debug-on-error RET` and cause the error to happen again, then paste the contents of the `*Backtrace*` buffer here. + render: elisp + - type: textarea + id: etc + attributes: + label: Etc. + description: Any other information that seems relevant + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..7e36d80 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Support questions + url: https://github.com/alphapapa/org-ql/discussions + about: Please ask and answer support questions here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..7b14c94 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,45 @@ +name: Feature Request +description: File a feature request +labels: ["enhancement"] +body: + - type: input + id: os-platform + attributes: + label: OS/platform + description: What operating system or platform are you running Emacs on? + validations: + required: true + - type: textarea + id: emacs-provenance + attributes: + label: Emacs version and provenance + description: What version of Emacs are you using, where did you acquire it, and how did you install it? + validations: + required: true + - type: textarea + id: org-provenance + attributes: + label: Org version and provenance + description: What version of Org are you using, where did you acquire it, and how did you install it? + validations: + required: true + - type: input + id: package-provenance + attributes: + label: org-ql package version and provenance + description: What version of org-ql are you using, where did you acquire it, and how did you install it? + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: Describe your request. + validations: + required: true + - type: textarea + id: etc + attributes: + label: Etc. + description: Any other information that seems relevant + From 4ef9d9efed61e928850250d0365a9f840a41d1b8 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 19 Dec 2023 03:25:37 -0600 Subject: [PATCH 16/43] Meta: (bug_report.yml) Add Org version, remove labels and assignee --- .github/ISSUE_TEMPLATE/bug_report.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 87794a3..7e1b0c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,8 +1,8 @@ name: Bug Report description: File a bug report -labels: ["bug"] -assignees: - - alphapapa +# labels: ["bug"] +# assignees: +# - alphapapa body: - type: markdown attributes: @@ -29,13 +29,13 @@ body: description: By what method did you run Emacs? (i.e. what command did you run?) validations: required: true - # - type: input - # id: emacs-frame - # attributes: - # label: Emacs frame type - # description: Did the problem happen on a GUI or tty Emacs frame? - # validations: - # required: true + - type: textarea + id: org-provenance + attributes: + label: Org version and provenance + description: What version of Org are you using, where did you acquire it, and how did you install it? + validations: + required: true - type: input id: package-provenance attributes: From 121af5c5d5d2ba10f1a4494dfb6538ae7d93c3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Antol=C3=ADn=20Camarena?= Date: Fri, 8 Sep 2023 14:42:30 -0600 Subject: [PATCH 17/43] Add C-c C-e key binding to save an org-ql-find session --- org-ql-completing-read.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 9c4c044..4109557 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -322,7 +322,23 @@ single predicate)." (mapc #'org-ql--ensure-buffer buffers-files) (let* ((completion-styles '(org-ql-completing-read)) (completion-styles-alist (list (list 'org-ql-completing-read #'try #'all "Org QL Find"))) - (selected (completing-read prompt #'collection nil t))) + (selected + (minibuffer-with-setup-hook + (lambda () + (let ((map (make-sparse-keymap))) + (define-key + map (kbd "C-c C-e") + (lambda () + (interactive) + (run-at-time 0 nil + #'org-ql-search + buffers-files + (minibuffer-contents-no-properties)) + (if (fboundp 'minibuffer-quit-recursive-edit) + (minibuffer-quit-recursive-edit) + (abort-recursive-edit)))) + (use-local-map (make-composed-keymap map (current-local-map))))) + (completing-read prompt #'collection nil t)))) ;; (debug-message "SELECTED:%S KEYS:%S" selected (hash-table-keys table)) (or (gethash selected table) ;; If there are completions in the table, but none of them exactly match the user input From 0552aa8b93c3b8278742d0cf63c7d49878e0172d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Antol=C3=ADn?= Date: Mon, 18 Dec 2023 13:35:04 -0600 Subject: [PATCH 18/43] Use a keymap for the org-ql-view export functionality --- org-ql-completing-read.el | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 4109557..b290ed9 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -114,6 +114,17 @@ value, or nil." ;;;;; Completing read +(defun org-ql-export-view () + "Create `org-ql-view' buffer from current minibuffer org-ql search." + (interactive) + (user-error "Must be run from within an `org-ql-completing-read' session")) + +(defvar org-ql-completing-read-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c C-e") #'org-ql-export-view) + map) + "Keymap active during `org-ql-completing-read' minibuffer sessions.") + ;;;###autoload (cl-defun org-ql-completing-read (buffers-files &key query-prefix query-filter @@ -325,20 +336,20 @@ single predicate)." (selected (minibuffer-with-setup-hook (lambda () - (let ((map (make-sparse-keymap))) - (define-key - map (kbd "C-c C-e") - (lambda () - (interactive) - (run-at-time 0 nil - #'org-ql-search - buffers-files - (minibuffer-contents-no-properties)) - (if (fboundp 'minibuffer-quit-recursive-edit) - (minibuffer-quit-recursive-edit) - (abort-recursive-edit)))) - (use-local-map (make-composed-keymap map (current-local-map))))) - (completing-read prompt #'collection nil t)))) + (use-local-map (make-composed-keymap org-ql-completing-read-map (current-local-map)))) + (cl-letf* (((symbol-function 'org-ql-export-view) + (lambda () + (interactive) + (run-at-time 0 nil + #'org-ql-search + buffers-files + (minibuffer-contents-no-properties)) + (if (fboundp 'minibuffer-quit-recursive-edit) + (minibuffer-quit-recursive-edit) + (abort-recursive-edit)))) + ((symbol-function 'embark-export) + (symbol-function 'org-ql-export-view))) + (completing-read prompt #'collection nil t))))) ;; (debug-message "SELECTED:%S KEYS:%S" selected (hash-table-keys table)) (or (gethash selected table) ;; If there are completions in the table, but none of them exactly match the user input From 2644f53fe2a69006a442a60e0e156fed061bb7e2 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 16:35:25 -0600 Subject: [PATCH 19/43] Tidy, rename --- org-ql-completing-read.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index b290ed9..4c3e0f3 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -26,6 +26,12 @@ (require 'org-ql) +;;;; Variables + +(defvar-keymap org-ql-completing-read-map + :doc "Active during `org-ql-completing-read' sessions." + (kbd "C-c C-e") #'org-ql-completing-read-export) + ;;;; Customization (defgroup org-ql-completing-read nil @@ -114,16 +120,10 @@ value, or nil." ;;;;; Completing read -(defun org-ql-export-view () - "Create `org-ql-view' buffer from current minibuffer org-ql search." +(defun org-ql-completing-read-export () + "Show `org-ql-view' buffer for current `org-ql-completing-read'-based search." (interactive) - (user-error "Must be run from within an `org-ql-completing-read' session")) - -(defvar org-ql-completing-read-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-c C-e") #'org-ql-export-view) - map) - "Keymap active during `org-ql-completing-read' minibuffer sessions.") + (user-error "Not in an `org-ql-completing-read' session")) ;;;###autoload (cl-defun org-ql-completing-read @@ -337,7 +337,7 @@ single predicate)." (minibuffer-with-setup-hook (lambda () (use-local-map (make-composed-keymap org-ql-completing-read-map (current-local-map)))) - (cl-letf* (((symbol-function 'org-ql-export-view) + (cl-letf* (((symbol-function 'org-ql-completing-read-export) (lambda () (interactive) (run-at-time 0 nil @@ -348,7 +348,7 @@ single predicate)." (minibuffer-quit-recursive-edit) (abort-recursive-edit)))) ((symbol-function 'embark-export) - (symbol-function 'org-ql-export-view))) + (symbol-function 'org-ql-completing-read-export))) (completing-read prompt #'collection nil t))))) ;; (debug-message "SELECTED:%S KEYS:%S" selected (hash-table-keys table)) (or (gethash selected table) From f4b006ffb956d7503d8072d9c3b76c9f77485113 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 16:38:11 -0600 Subject: [PATCH 20/43] Remap embark-collect to embark-export --- org-ql-completing-read.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 4c3e0f3..a8053af 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -30,7 +30,11 @@ (defvar-keymap org-ql-completing-read-map :doc "Active during `org-ql-completing-read' sessions." - (kbd "C-c C-e") #'org-ql-completing-read-export) + "C-c C-e" #'org-ql-completing-read-export) + +;; `embark-collect' doesn't work for `org-ql-completing-read', so remap +;; it to `embark-export' (which `keymap-set', et al doesn't allow). +(define-key org-ql-completing-read-map [remap embark-collect] 'embark-export) ;;;; Customization From f98dee54c8d73a6951a051a4e43afaf0048cbf0d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 16:48:52 -0600 Subject: [PATCH 21/43] Docs: Update changelog and usage --- README.org | 3 +- org-ql.info | 132 +++++++++++++++++++++++++++------------------------- 2 files changed, 71 insertions(+), 64 deletions(-) diff --git a/README.org b/README.org index 3d2f75e..bd34ecf 100644 --- a/README.org +++ b/README.org @@ -115,7 +115,7 @@ These commands jump to a heading selected using Emacs's built-in completion faci - ~org-ql-find-in-agenda~ searches in ~(org-agenda-files)~. - ~org-ql-find-in-org-directory~ searches in ~org-directory~. -Note that these commands are compatible with [[https://github.com/oantolin/embark][Embark]]: the ~embark-act~ command can be called on a completion candidate (i.e. a search result) to act on it immediately, without having to visit the entry in its source Org buffer. +Note that these commands are compatible with [[https://github.com/oantolin/embark][Embark]]: the ~embark-act~ command can be called on a completion candidate (i.e. a search result) to act on it immediately, without having to visit the entry in its source Org buffer, and ~embark-export~ may be called to show the results in an ~org-ql-view~ buffer. [[images/org-ql-find.png]] @@ -558,6 +558,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Additions* + Function ~org-ql-completing-read~, used by command ~org-ql-find~, now specifies the completion category as ~org-heading~, providing compatibility with [[https://github.com/oantolin/embark][Embark]]. (This is a powerful feature, as it means any ~org-ql-find~ result can be acted on from inside the search results with Embark, which provides common actions from Org Agenda and Org speed keys bindings.) ([[https://github.com/alphapapa/org-ql/issues/299][#299]]. Thanks to [[https://github.com/oantolin][Omar Antolín Camarena]], [[https://github.com/minad][Daniel Mendler]], and [[https://github.com/akirak][Akira Komamura]].) + - Command ~org-ql-completing-read-export~, bound to ~C-c C-e~ or ~embark-export~ while in an ~org-ql-completing-read~ session, exits and shows an ~org-ql-view~ buffer for the current search. + Command ~org-ql-find~ may be called in an ~org-agenda~ or ~org-ql-view~ buffer to search the buffers which contributed to the agenda/view buffer. + Command ~org-ql-find-path~, which searches outline paths in the current buffer. + Command ~org-ql-open-link~, which finds links in entries matching the given query, and opens the selected one with ~org-open-at-point~. (This is helpful when a collection of links are kept in Org files: rather than having to first visit the entry containing the desired link, then locate it within the entry, and then open it, the user can simply select the link and open it directly.) diff --git a/org-ql.info b/org-ql.info index ecc4d75..430d5a9 100644 --- a/org-ql.info +++ b/org-ql.info @@ -237,7 +237,9 @@ completion facilities with an Org QL query: Note that these commands are compatible with Embark (https://github.com/oantolin/embark): the ‘embark-act’ command can be called on a completion candidate (i.e. a search result) to act on it -immediately, without having to visit the entry in its source Org buffer. +immediately, without having to visit the entry in its source Org buffer, +and ‘embark-export’ may be called to show the results in an +‘org-ql-view’ buffer.  File: README.info, Node: org-ql-open-link, Next: org-ql-refile, Prev: org-ql-find, Up: Commands @@ -1076,6 +1078,10 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog Thanks to Omar Antolín Camarena (https://github.com/oantolin), Daniel Mendler (https://github.com/minad), and Akira Komamura (https://github.com/akirak).) + • Command ‘org-ql-completing-read-export’, bound to ‘C-c C-e’ or + ‘embark-export’ while in an ‘org-ql-completing-read’ session, + exits and shows an ‘org-ql-view’ buffer for the current + search. • Command ‘org-ql-find’ may be called in an ‘org-agenda’ or ‘org-ql-view’ buffer to search the buffers which contributed to the agenda/view buffer. @@ -1872,68 +1878,68 @@ Node: Helm support3142 Node: Usage3545 Node: Commands3943 Node: org-ql-find4408 -Node: org-ql-open-link5226 -Node: org-ql-refile6081 -Node: org-ql-search6409 -Node: helm-org-ql8340 -Node: org-ql-view8718 -Node: org-ql-view-sidebar9248 -Node: org-ql-view-recent-items9628 -Node: org-ql-sparse-tree10124 -Node: Queries10924 -Node: Non-sexp query syntax12041 -Node: General predicates13800 -Node: Ancestor/descendant predicates20725 -Node: Date/time predicates21853 -Node: Functions / Macros24977 -Node: Agenda-like views25275 -Ref: Function org-ql-block25437 -Node: Listing / acting-on results26698 -Ref: Caching26906 -Ref: Function org-ql-select27819 -Ref: Function org-ql-query30245 -Ref: Macro org-ql (deprecated)32019 -Node: Custom predicates32334 -Ref: Macro org-ql-defpred32558 -Node: Dynamic block35999 -Node: Links38723 -Node: Tips39410 -Node: Changelog39734 -Node: 08-pre40558 -Node: 07443031 -Node: 07343258 -Node: 07243990 -Node: 07144909 -Node: 0745718 -Node: 06348642 -Node: 06249173 -Node: 06149478 -Node: 0650046 -Node: 05253102 -Node: 05153404 -Node: 0553829 -Node: 04955360 -Node: 04855642 -Node: 04755991 -Node: 04656400 -Node: 04556808 -Node: 04457169 -Node: 04357528 -Node: 04257731 -Node: 04157892 -Node: 0458139 -Node: 03262240 -Node: 03162643 -Node: 0362840 -Node: 02366140 -Node: 02266374 -Node: 02166654 -Node: 0266859 -Node: 0170937 -Node: Notes71038 -Node: Comparison with Org Agenda searches71200 -Node: org-sidebar72089 -Node: License72368 +Node: org-ql-open-link5316 +Node: org-ql-refile6171 +Node: org-ql-search6499 +Node: helm-org-ql8430 +Node: org-ql-view8808 +Node: org-ql-view-sidebar9338 +Node: org-ql-view-recent-items9718 +Node: org-ql-sparse-tree10214 +Node: Queries11014 +Node: Non-sexp query syntax12131 +Node: General predicates13890 +Node: Ancestor/descendant predicates20815 +Node: Date/time predicates21943 +Node: Functions / Macros25067 +Node: Agenda-like views25365 +Ref: Function org-ql-block25527 +Node: Listing / acting-on results26788 +Ref: Caching26996 +Ref: Function org-ql-select27909 +Ref: Function org-ql-query30335 +Ref: Macro org-ql (deprecated)32109 +Node: Custom predicates32424 +Ref: Macro org-ql-defpred32648 +Node: Dynamic block36089 +Node: Links38813 +Node: Tips39500 +Node: Changelog39824 +Node: 08-pre40648 +Node: 07443372 +Node: 07343599 +Node: 07244331 +Node: 07145250 +Node: 0746059 +Node: 06348983 +Node: 06249514 +Node: 06149819 +Node: 0650387 +Node: 05253443 +Node: 05153745 +Node: 0554170 +Node: 04955701 +Node: 04855983 +Node: 04756332 +Node: 04656741 +Node: 04557149 +Node: 04457510 +Node: 04357869 +Node: 04258072 +Node: 04158233 +Node: 0458480 +Node: 03262581 +Node: 03162984 +Node: 0363181 +Node: 02366481 +Node: 02266715 +Node: 02166995 +Node: 0267200 +Node: 0171278 +Node: Notes71379 +Node: Comparison with Org Agenda searches71541 +Node: org-sidebar72430 +Node: License72709  End Tag Table From eaf58b463e48d209c47c08ca00d0faee5cdd7915 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 16:54:17 -0600 Subject: [PATCH 22/43] Meta: Update copyright years Fixes #336. --- org-ql-completing-read.el | 2 +- org-ql-find.el | 2 +- org-ql-search.el | 2 ++ org-ql-view.el | 2 ++ org-ql.el | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index a8053af..e535f8b 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -1,6 +1,6 @@ ;;; org-ql-completing-read.el --- Completing read of Org entries using org-ql -*- lexical-binding: t; -*- -;; Copyright (C) 2022 Adam Porter +;; Copyright (C) 2022-2023 Adam Porter ;; Author: Adam Porter diff --git a/org-ql-find.el b/org-ql-find.el index 84dad91..e4b16a6 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -1,6 +1,6 @@ ;;; org-ql-find.el --- Find headings with completion using org-ql -*- lexical-binding: t; -*- -;; Copyright (C) 2022 Adam Porter +;; Copyright (C) 2022-2023 Adam Porter ;; Author: Adam Porter diff --git a/org-ql-search.el b/org-ql-search.el index da1cfb3..f726891 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -1,5 +1,7 @@ ;;; org-ql-search.el --- Search commands for org-ql -*- lexical-binding: t; -*- +;; Copyright (C) 2019-2023 Adam Porter + ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql diff --git a/org-ql-view.el b/org-ql-view.el index 84507a4..5d452de 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -1,5 +1,7 @@ ;;; org-ql-view.el --- Agenda-like view based on org-ql -*- lexical-binding: t; -*- +;; Copyright (C) 2019-2023 Adam Porter + ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql diff --git a/org-ql.el b/org-ql.el index 2ba9a31..29d515c 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1,6 +1,6 @@ ;;; org-ql.el --- Org Query Language, search command, and agenda-like view -*- lexical-binding: t; -*- -;; Copyright (C) 2017-2022 Adam Porter +;; Copyright (C) 2017-2023 Adam Porter ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql From b015b3b910ddcff4d46621be53b9fa09df7632c5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 17:10:53 -0600 Subject: [PATCH 23/43] Tidy: Indentation, variable --- org-ql-completing-read.el | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index e535f8b..4db51e6 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -134,7 +134,7 @@ value, or nil." (buffers-files &key query-prefix query-filter (action #'org-ql-completing-read-action) ;; FIXME: Unused argument. - (annotate #'org-ql-completing-read-snippet) + ;; (annotate #'org-ql-completing-read-snippet) (snippet #'org-ql-completing-read-snippet) (path #'org-ql-completing-read-path) (action-filter #'list) @@ -188,7 +188,6 @@ single predicate)." (setf string (format "%s <%s>" string (cl-incf suffix))) (setf string (format "%s <%s>" string (puthash string 2 disambiguations))))) (puthash (propertize string 'org-marker marker) marker table))))) - (path (marker) (org-with-point-at marker (let* ((path (thread-first (org-get-outline-path nil t) @@ -198,10 +197,10 @@ single predicate)." (concat "\\" (string-join (reverse path) "\\")) (concat "/" (string-join path "/"))))) formatted-path))) - (todo - (marker) (if-let (it (org-entry-get marker "TODO")) - (concat (propertize it 'face (org-get-todo-face it)) " ") - "")) + (todo (marker) + (if-let (it (org-entry-get marker "TODO")) + (concat (propertize it 'face (org-get-todo-face it)) " ") + "")) (affix (completions) ;; (debug-message "AFFIX:%S" completions) (cl-loop for completion in completions @@ -216,14 +215,14 @@ single predicate)." ;; e.g. Helm while typing, but it seems to help a little when using the ;; org-rifle-style snippets. (or (snippet (get-text-property 0 'org-marker candidate)) ""))) - (snippet - (marker) (when-let - ((snippet - (org-with-point-at marker - (or (funcall org-ql-completing-read-snippet-function org-ql-completing-read-input-regexp) - (org-ql-completing-read--snippet-simple))))) - (propertize (concat " " snippet) - 'face 'org-ql-completing-read-snippet))) + (snippet (marker) + (when-let + ((snippet + (org-with-point-at marker + (or (funcall org-ql-completing-read-snippet-function org-ql-completing-read-input-regexp) + (org-ql-completing-read--snippet-simple))))) + (propertize (concat " " snippet) + 'face 'org-ql-completing-read-snippet))) (group (candidate transform) (pcase transform (`nil (buffer-name (marker-buffer (get-text-property 0 'org-marker candidate)))) From 09e7b60505d80db038eefcd8519c7bd64b31e030 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 17:11:01 -0600 Subject: [PATCH 24/43] Tidy: Compatibility aliases for Org 9.6 --- org-ql-search.el | 14 ++++++++++++-- org-ql.el | 8 +++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index f726891..57215f8 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -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)) diff --git a/org-ql.el b/org-ql.el index 29d515c..d9f834b 100644 --- a/org-ql.el +++ b/org-ql.el @@ -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) From 087e99703efc236680e77f4d081b939139e1d782 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 21 Dec 2023 17:14:30 -0600 Subject: [PATCH 25/43] Release: v0.8 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 152 ++++++++++++++++++++++++++-------------------------- 3 files changed, 78 insertions(+), 78 deletions(-) diff --git a/README.org b/README.org index bd34ecf..180db57 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ 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. -** 0.8-pre +** 0.8 *Additions* diff --git a/org-ql.el b/org-ql.el index d9f834b..4a66726 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8-pre +;; Version: 0.8 ;; 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 diff --git a/org-ql.info b/org-ql.info index 430d5a9..71e17b3 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8-pre: 08-pre. +* 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. * 0.7.2: 072. @@ -1028,7 +1028,7 @@ releases. * Menu: -* 0.8-pre: 08-pre. +* 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. * 0.7.2: 072. @@ -1061,10 +1061,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 08-pre, Next: 074, Up: Changelog +File: README.info, Node: 08, Next: 074, Up: Changelog -5.1 0.8-pre -=========== +5.1 0.8 +======= *Additions* @@ -1117,7 +1117,7 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog (https://github.com/yantar92) for his feedback.)  -File: README.info, Node: 074, Next: 073, Prev: 08-pre, Up: Changelog +File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog 5.2 0.7.4 ========= @@ -1870,76 +1870,76 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1859 -Node: Screenshots1982 -Node: Installation2100 -Node: Quelpa2614 -Node: Helm support3142 -Node: Usage3545 -Node: Commands3943 -Node: org-ql-find4408 -Node: org-ql-open-link5316 -Node: org-ql-refile6171 -Node: org-ql-search6499 -Node: helm-org-ql8430 -Node: org-ql-view8808 -Node: org-ql-view-sidebar9338 -Node: org-ql-view-recent-items9718 -Node: org-ql-sparse-tree10214 -Node: Queries11014 -Node: Non-sexp query syntax12131 -Node: General predicates13890 -Node: Ancestor/descendant predicates20815 -Node: Date/time predicates21943 -Node: Functions / Macros25067 -Node: Agenda-like views25365 -Ref: Function org-ql-block25527 -Node: Listing / acting-on results26788 -Ref: Caching26996 -Ref: Function org-ql-select27909 -Ref: Function org-ql-query30335 -Ref: Macro org-ql (deprecated)32109 -Node: Custom predicates32424 -Ref: Macro org-ql-defpred32648 -Node: Dynamic block36089 -Node: Links38813 -Node: Tips39500 -Node: Changelog39824 -Node: 08-pre40648 -Node: 07443372 -Node: 07343599 -Node: 07244331 -Node: 07145250 -Node: 0746059 -Node: 06348983 -Node: 06249514 -Node: 06149819 -Node: 0650387 -Node: 05253443 -Node: 05153745 -Node: 0554170 -Node: 04955701 -Node: 04855983 -Node: 04756332 -Node: 04656741 -Node: 04557149 -Node: 04457510 -Node: 04357869 -Node: 04258072 -Node: 04158233 -Node: 0458480 -Node: 03262581 -Node: 03162984 -Node: 0363181 -Node: 02366481 -Node: 02266715 -Node: 02166995 -Node: 0267200 -Node: 0171278 -Node: Notes71379 -Node: Comparison with Org Agenda searches71541 -Node: org-sidebar72430 -Node: License72709 +Node: Contents1851 +Node: Screenshots1974 +Node: Installation2092 +Node: Quelpa2606 +Node: Helm support3134 +Node: Usage3537 +Node: Commands3935 +Node: org-ql-find4400 +Node: org-ql-open-link5308 +Node: org-ql-refile6163 +Node: org-ql-search6491 +Node: helm-org-ql8422 +Node: org-ql-view8800 +Node: org-ql-view-sidebar9330 +Node: org-ql-view-recent-items9710 +Node: org-ql-sparse-tree10206 +Node: Queries11006 +Node: Non-sexp query syntax12123 +Node: General predicates13882 +Node: Ancestor/descendant predicates20807 +Node: Date/time predicates21935 +Node: Functions / Macros25059 +Node: Agenda-like views25357 +Ref: Function org-ql-block25519 +Node: Listing / acting-on results26780 +Ref: Caching26988 +Ref: Function org-ql-select27901 +Ref: Function org-ql-query30327 +Ref: Macro org-ql (deprecated)32101 +Node: Custom predicates32416 +Ref: Macro org-ql-defpred32640 +Node: Dynamic block36081 +Node: Links38805 +Node: Tips39492 +Node: Changelog39816 +Node: 0840632 +Node: 07443344 +Node: 07343567 +Node: 07244299 +Node: 07145218 +Node: 0746027 +Node: 06348951 +Node: 06249482 +Node: 06149787 +Node: 0650355 +Node: 05253411 +Node: 05153713 +Node: 0554138 +Node: 04955669 +Node: 04855951 +Node: 04756300 +Node: 04656709 +Node: 04557117 +Node: 04457478 +Node: 04357837 +Node: 04258040 +Node: 04158201 +Node: 0458448 +Node: 03262549 +Node: 03162952 +Node: 0363149 +Node: 02366449 +Node: 02266683 +Node: 02166963 +Node: 0267168 +Node: 0171246 +Node: Notes71347 +Node: Comparison with Org Agenda searches71509 +Node: org-sidebar72398 +Node: License72677  End Tag Table From 0e39372146b56902d01d6c1d7cc3aab7bc29d095 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sun, 24 Dec 2023 01:09:49 -0600 Subject: [PATCH 26/43] Meta: v0.9-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 217 +++++++++++++++++++++++++++------------------------- 3 files changed, 119 insertions(+), 104 deletions(-) diff --git a/README.org b/README.org index 180db57..745c1dd 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ 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. +** 0.9-pre + +Nothing new yet. + ** 0.8 *Additions* diff --git a/org-ql.el b/org-ql.el index 4a66726..338c52a 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8 +;; 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")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 71e17b3..113f6d1 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.9-pre: 09-pre. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1028,6 +1029,7 @@ releases. * Menu: +* 0.9-pre: 09-pre. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1061,9 +1063,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 08, Next: 074, Up: Changelog +File: README.info, Node: 09-pre, Next: 08, Up: Changelog -5.1 0.8 +5.1 0.9-pre +=========== + +Nothing new yet. + + +File: README.info, Node: 08, Next: 074, Prev: 09-pre, Up: Changelog + +5.2 0.8 ======= *Additions* @@ -1119,7 +1129,7 @@ File: README.info, Node: 08, Next: 074, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.2 0.7.4 +5.3 0.7.4 ========= *Fixes* @@ -1129,7 +1139,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.3 0.7.3 +5.4 0.7.3 ========= *Fixes* @@ -1147,7 +1157,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.4 0.7.2 +5.5 0.7.2 ========= *Fixes* @@ -1168,7 +1178,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.5 0.7.1 +5.6 0.7.1 ========= *Fixes* @@ -1187,7 +1197,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.6 0.7 +5.7 0.7 ======= *Added* @@ -1247,7 +1257,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.7 0.6.3 +5.8 0.6.3 ========= *Fixed* @@ -1263,7 +1273,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.8 0.6.2 +5.9 0.6.2 ========= *Fixed* @@ -1274,8 +1284,8 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.9 0.6.1 -========= +5.10 0.6.1 +========== *Fixed* • In dynamic blocks, links to headings with statistics cookies were @@ -1292,7 +1302,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.10 0.6 +5.11 0.6 ======== *Added* @@ -1359,7 +1369,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.11 0.5.2 +5.12 0.5.2 ========== *Fixed* @@ -1370,7 +1380,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.12 0.5.1 +5.13 0.5.1 ========== *Fixed* @@ -1383,7 +1393,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.13 0.5 +5.14 0.5 ======== *Added* @@ -1424,7 +1434,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.14 0.4.9 +5.15 0.4.9 ========== *Fixed* @@ -1435,7 +1445,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.15 0.4.8 +5.16 0.4.8 ========== *Fixed* @@ -1447,7 +1457,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.16 0.4.7 +5.17 0.4.7 ========== *Fixed* @@ -1460,7 +1470,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.17 0.4.6 +5.18 0.4.6 ========== *Fixed* @@ -1473,7 +1483,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.18 0.4.5 +5.19 0.4.5 ========== *Fixed* @@ -1485,7 +1495,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.19 0.4.4 +5.20 0.4.4 ========== *Fixed* @@ -1497,7 +1507,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.20 0.4.3 +5.21 0.4.3 ========== *Fixed* @@ -1507,7 +1517,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.21 0.4.2 +5.22 0.4.2 ========== *Fixed* @@ -1516,7 +1526,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.22 0.4.1 +5.23 0.4.1 ========== *Fixed* @@ -1526,7 +1536,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.23 0.4 +5.24 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1607,7 +1617,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.24 0.3.2 +5.25 0.3.2 ========== *Fixed* @@ -1620,7 +1630,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.25 0.3.1 +5.26 0.3.1 ========== *Fixed* @@ -1630,7 +1640,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.26 0.3 +5.27 0.3 ======== *Added* @@ -1698,7 +1708,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.27 0.2.3 +5.28 0.2.3 ========== *Fixed* @@ -1708,7 +1718,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.28 0.2.2 +5.29 0.2.2 ========== *Fixed* @@ -1719,7 +1729,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.29 0.2.1 +5.30 0.2.1 ========== *Fixed* @@ -1729,7 +1739,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.30 0.2 +5.31 0.2 ======== *Added* @@ -1812,7 +1822,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.31 0.1 +5.32 0.1 ======== First tagged release. @@ -1870,76 +1880,77 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1851 -Node: Screenshots1974 -Node: Installation2092 -Node: Quelpa2606 -Node: Helm support3134 -Node: Usage3537 -Node: Commands3935 -Node: org-ql-find4400 -Node: org-ql-open-link5308 -Node: org-ql-refile6163 -Node: org-ql-search6491 -Node: helm-org-ql8422 -Node: org-ql-view8800 -Node: org-ql-view-sidebar9330 -Node: org-ql-view-recent-items9710 -Node: org-ql-sparse-tree10206 -Node: Queries11006 -Node: Non-sexp query syntax12123 -Node: General predicates13882 -Node: Ancestor/descendant predicates20807 -Node: Date/time predicates21935 -Node: Functions / Macros25059 -Node: Agenda-like views25357 -Ref: Function org-ql-block25519 -Node: Listing / acting-on results26780 -Ref: Caching26988 -Ref: Function org-ql-select27901 -Ref: Function org-ql-query30327 -Ref: Macro org-ql (deprecated)32101 -Node: Custom predicates32416 -Ref: Macro org-ql-defpred32640 -Node: Dynamic block36081 -Node: Links38805 -Node: Tips39492 -Node: Changelog39816 -Node: 0840632 -Node: 07443344 -Node: 07343567 -Node: 07244299 -Node: 07145218 -Node: 0746027 -Node: 06348951 -Node: 06249482 -Node: 06149787 -Node: 0650355 -Node: 05253411 -Node: 05153713 -Node: 0554138 -Node: 04955669 -Node: 04855951 -Node: 04756300 -Node: 04656709 -Node: 04557117 -Node: 04457478 -Node: 04357837 -Node: 04258040 -Node: 04158201 -Node: 0458448 -Node: 03262549 -Node: 03162952 -Node: 0363149 -Node: 02366449 -Node: 02266683 -Node: 02166963 -Node: 0267168 -Node: 0171246 -Node: Notes71347 -Node: Comparison with Org Agenda searches71509 -Node: org-sidebar72398 -Node: License72677 +Node: Contents1870 +Node: Screenshots1993 +Node: Installation2111 +Node: Quelpa2625 +Node: Helm support3153 +Node: Usage3556 +Node: Commands3954 +Node: org-ql-find4419 +Node: org-ql-open-link5327 +Node: org-ql-refile6182 +Node: org-ql-search6510 +Node: helm-org-ql8441 +Node: org-ql-view8819 +Node: org-ql-view-sidebar9349 +Node: org-ql-view-recent-items9729 +Node: org-ql-sparse-tree10225 +Node: Queries11025 +Node: Non-sexp query syntax12142 +Node: General predicates13901 +Node: Ancestor/descendant predicates20826 +Node: Date/time predicates21954 +Node: Functions / Macros25078 +Node: Agenda-like views25376 +Ref: Function org-ql-block25538 +Node: Listing / acting-on results26799 +Ref: Caching27007 +Ref: Function org-ql-select27920 +Ref: Function org-ql-query30346 +Ref: Macro org-ql (deprecated)32120 +Node: Custom predicates32435 +Ref: Macro org-ql-defpred32659 +Node: Dynamic block36100 +Node: Links38824 +Node: Tips39511 +Node: Changelog39835 +Node: 09-pre40670 +Node: 0840776 +Node: 07443503 +Node: 07343726 +Node: 07244458 +Node: 07145377 +Node: 0746186 +Node: 06349110 +Node: 06249641 +Node: 06149946 +Node: 0650516 +Node: 05253572 +Node: 05153874 +Node: 0554299 +Node: 04955830 +Node: 04856112 +Node: 04756461 +Node: 04656870 +Node: 04557278 +Node: 04457639 +Node: 04357998 +Node: 04258201 +Node: 04158362 +Node: 0458609 +Node: 03262710 +Node: 03163113 +Node: 0363310 +Node: 02366610 +Node: 02266844 +Node: 02167124 +Node: 0267329 +Node: 0171407 +Node: Notes71508 +Node: Comparison with Org Agenda searches71670 +Node: org-sidebar72559 +Node: License72838  End Tag Table From a4bf5b0a92e47fb4ea0c5e4e5462a71b1c9b20a9 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sun, 24 Dec 2023 01:10:27 -0600 Subject: [PATCH 27/43] Tidy: (org-ql-view--display) Take STRINGS instead of STRING No need to allocate one large string just to insert it into the buffer. --- org-ql-search.el | 3 +-- org-ql-view.el | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index 57215f8..d08397a 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -220,8 +220,7 @@ necessary." (symbol (symbol-value super-groups)) (list super-groups)))) (setf strings (org-super-agenda--group-items strings)))) - (org-ql-view--display :buffer buffer :header header - :string (s-join "\n" strings))))) + (org-ql-view--display :buffer buffer :header header :strings strings)))) ;;;###autoload (defun org-ql-search-block (query) diff --git a/org-ql-view.el b/org-ql-view.el index 5d452de..e13cfaa 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -408,7 +408,7 @@ update search arguments." (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. BUFFER may be a buffer, or a string naming a buffer, which is @@ -446,7 +446,9 @@ subsequent refreshing of the buffer: `org-ql-view-buffers-files', ;; Clear buffer, insert entries, etc. (let ((inhibit-read-only t)) (erase-buffer) - (insert string "\n") + (dolist (string strings) + (insert string "\n")) + (insert "\n") (pop-to-buffer (current-buffer) org-ql-view-display-buffer-action) (org-agenda-finalize) (goto-char (point-min)))))) From 24b799ab0bd49b1a128350cabf6421ff9d0e536f Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Jan 2024 18:25:18 -0600 Subject: [PATCH 28/43] Meta: v0.8.1-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 217 +++++++++++++++++++++++++++------------------------- 3 files changed, 119 insertions(+), 104 deletions(-) diff --git a/README.org b/README.org index 180db57..20b13c5 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ 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. +** 0.8.1-pre + +Nothing new yet. + ** 0.8 *Additions* diff --git a/org-ql.el b/org-ql.el index 4a66726..7134a48 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8 +;; Version: 0.8.1-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 diff --git a/org-ql.info b/org-ql.info index 71e17b3..e88fde6 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.1-pre: 081-pre. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1028,6 +1029,7 @@ releases. * Menu: +* 0.8.1-pre: 081-pre. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1061,9 +1063,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 08, Next: 074, Up: Changelog +File: README.info, Node: 081-pre, Next: 08, Up: Changelog -5.1 0.8 +5.1 0.8.1-pre +============= + +Nothing new yet. + + +File: README.info, Node: 08, Next: 074, Prev: 081-pre, Up: Changelog + +5.2 0.8 ======= *Additions* @@ -1119,7 +1129,7 @@ File: README.info, Node: 08, Next: 074, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.2 0.7.4 +5.3 0.7.4 ========= *Fixes* @@ -1129,7 +1139,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.3 0.7.3 +5.4 0.7.3 ========= *Fixes* @@ -1147,7 +1157,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.4 0.7.2 +5.5 0.7.2 ========= *Fixes* @@ -1168,7 +1178,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.5 0.7.1 +5.6 0.7.1 ========= *Fixes* @@ -1187,7 +1197,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.6 0.7 +5.7 0.7 ======= *Added* @@ -1247,7 +1257,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.7 0.6.3 +5.8 0.6.3 ========= *Fixed* @@ -1263,7 +1273,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.8 0.6.2 +5.9 0.6.2 ========= *Fixed* @@ -1274,8 +1284,8 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.9 0.6.1 -========= +5.10 0.6.1 +========== *Fixed* • In dynamic blocks, links to headings with statistics cookies were @@ -1292,7 +1302,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.10 0.6 +5.11 0.6 ======== *Added* @@ -1359,7 +1369,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.11 0.5.2 +5.12 0.5.2 ========== *Fixed* @@ -1370,7 +1380,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.12 0.5.1 +5.13 0.5.1 ========== *Fixed* @@ -1383,7 +1393,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.13 0.5 +5.14 0.5 ======== *Added* @@ -1424,7 +1434,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.14 0.4.9 +5.15 0.4.9 ========== *Fixed* @@ -1435,7 +1445,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.15 0.4.8 +5.16 0.4.8 ========== *Fixed* @@ -1447,7 +1457,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.16 0.4.7 +5.17 0.4.7 ========== *Fixed* @@ -1460,7 +1470,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.17 0.4.6 +5.18 0.4.6 ========== *Fixed* @@ -1473,7 +1483,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.18 0.4.5 +5.19 0.4.5 ========== *Fixed* @@ -1485,7 +1495,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.19 0.4.4 +5.20 0.4.4 ========== *Fixed* @@ -1497,7 +1507,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.20 0.4.3 +5.21 0.4.3 ========== *Fixed* @@ -1507,7 +1517,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.21 0.4.2 +5.22 0.4.2 ========== *Fixed* @@ -1516,7 +1526,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.22 0.4.1 +5.23 0.4.1 ========== *Fixed* @@ -1526,7 +1536,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.23 0.4 +5.24 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1607,7 +1617,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.24 0.3.2 +5.25 0.3.2 ========== *Fixed* @@ -1620,7 +1630,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.25 0.3.1 +5.26 0.3.1 ========== *Fixed* @@ -1630,7 +1640,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.26 0.3 +5.27 0.3 ======== *Added* @@ -1698,7 +1708,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.27 0.2.3 +5.28 0.2.3 ========== *Fixed* @@ -1708,7 +1718,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.28 0.2.2 +5.29 0.2.2 ========== *Fixed* @@ -1719,7 +1729,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.29 0.2.1 +5.30 0.2.1 ========== *Fixed* @@ -1729,7 +1739,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.30 0.2 +5.31 0.2 ======== *Added* @@ -1812,7 +1822,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.31 0.1 +5.32 0.1 ======== First tagged release. @@ -1870,76 +1880,77 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1851 -Node: Screenshots1974 -Node: Installation2092 -Node: Quelpa2606 -Node: Helm support3134 -Node: Usage3537 -Node: Commands3935 -Node: org-ql-find4400 -Node: org-ql-open-link5308 -Node: org-ql-refile6163 -Node: org-ql-search6491 -Node: helm-org-ql8422 -Node: org-ql-view8800 -Node: org-ql-view-sidebar9330 -Node: org-ql-view-recent-items9710 -Node: org-ql-sparse-tree10206 -Node: Queries11006 -Node: Non-sexp query syntax12123 -Node: General predicates13882 -Node: Ancestor/descendant predicates20807 -Node: Date/time predicates21935 -Node: Functions / Macros25059 -Node: Agenda-like views25357 -Ref: Function org-ql-block25519 -Node: Listing / acting-on results26780 -Ref: Caching26988 -Ref: Function org-ql-select27901 -Ref: Function org-ql-query30327 -Ref: Macro org-ql (deprecated)32101 -Node: Custom predicates32416 -Ref: Macro org-ql-defpred32640 -Node: Dynamic block36081 -Node: Links38805 -Node: Tips39492 -Node: Changelog39816 -Node: 0840632 -Node: 07443344 -Node: 07343567 -Node: 07244299 -Node: 07145218 -Node: 0746027 -Node: 06348951 -Node: 06249482 -Node: 06149787 -Node: 0650355 -Node: 05253411 -Node: 05153713 -Node: 0554138 -Node: 04955669 -Node: 04855951 -Node: 04756300 -Node: 04656709 -Node: 04557117 -Node: 04457478 -Node: 04357837 -Node: 04258040 -Node: 04158201 -Node: 0458448 -Node: 03262549 -Node: 03162952 -Node: 0363149 -Node: 02366449 -Node: 02266683 -Node: 02166963 -Node: 0267168 -Node: 0171246 -Node: Notes71347 -Node: Comparison with Org Agenda searches71509 -Node: org-sidebar72398 -Node: License72677 +Node: Contents1873 +Node: Screenshots1996 +Node: Installation2114 +Node: Quelpa2628 +Node: Helm support3156 +Node: Usage3559 +Node: Commands3957 +Node: org-ql-find4422 +Node: org-ql-open-link5330 +Node: org-ql-refile6185 +Node: org-ql-search6513 +Node: helm-org-ql8444 +Node: org-ql-view8822 +Node: org-ql-view-sidebar9352 +Node: org-ql-view-recent-items9732 +Node: org-ql-sparse-tree10228 +Node: Queries11028 +Node: Non-sexp query syntax12145 +Node: General predicates13904 +Node: Ancestor/descendant predicates20829 +Node: Date/time predicates21957 +Node: Functions / Macros25081 +Node: Agenda-like views25379 +Ref: Function org-ql-block25541 +Node: Listing / acting-on results26802 +Ref: Caching27010 +Ref: Function org-ql-select27923 +Ref: Function org-ql-query30349 +Ref: Macro org-ql (deprecated)32123 +Node: Custom predicates32438 +Ref: Macro org-ql-defpred32662 +Node: Dynamic block36103 +Node: Links38827 +Node: Tips39514 +Node: Changelog39838 +Node: 081-pre40676 +Node: 0840787 +Node: 07443515 +Node: 07343738 +Node: 07244470 +Node: 07145389 +Node: 0746198 +Node: 06349122 +Node: 06249653 +Node: 06149958 +Node: 0650528 +Node: 05253584 +Node: 05153886 +Node: 0554311 +Node: 04955842 +Node: 04856124 +Node: 04756473 +Node: 04656882 +Node: 04557290 +Node: 04457651 +Node: 04358010 +Node: 04258213 +Node: 04158374 +Node: 0458621 +Node: 03262722 +Node: 03163125 +Node: 0363322 +Node: 02366622 +Node: 02266856 +Node: 02167136 +Node: 0267341 +Node: 0171419 +Node: Notes71520 +Node: Comparison with Org Agenda searches71682 +Node: org-sidebar72571 +Node: License72850  End Tag Table From 8e9a8fe0907fdd56e46bd78bbfb2d05b9eea0c85 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Jan 2024 18:26:03 -0600 Subject: [PATCH 29/43] Fix: (org-ql-find) Widen buffer This fixes the case in which a user calls org-ql-find from a narrowed buffer and chooses a result outside the restriction. This is already done in, e.g. org-ql-open-link; it's just an oversight here. --- README.org | 4 ++- org-ql-find.el | 4 +-- org-ql.info | 75 ++++++++++++++++++++++++++------------------------ 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/README.org b/README.org index 20b13c5..178ca4f 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.1-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ widens the buffer before going to the selected entry. ** 0.8 diff --git a/org-ql-find.el b/org-ql-find.el index e4b16a6..fed9ade 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -77,8 +77,8 @@ single predicate)." :prompt prompt))) (set-buffer (marker-buffer marker)) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) - (goto-char marker) - (run-hook-with-args 'org-ql-find-goto-hook))) + (org-with-point-at marker + (run-hook-with-args 'org-ql-find-goto-hook)))) ;;;###autoload (defun org-ql-refile (marker) diff --git a/org-ql.info b/org-ql.info index e88fde6..630d120 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1068,7 +1068,10 @@ File: README.info, Node: 081-pre, Next: 08, Up: Changelog 5.1 0.8.1-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ widens the buffer before going to the + selected entry.  File: README.info, Node: 08, Next: 074, Prev: 081-pre, Up: Changelog @@ -1916,41 +1919,41 @@ Node: Links38827 Node: Tips39514 Node: Changelog39838 Node: 081-pre40676 -Node: 0840787 -Node: 07443515 -Node: 07343738 -Node: 07244470 -Node: 07145389 -Node: 0746198 -Node: 06349122 -Node: 06249653 -Node: 06149958 -Node: 0650528 -Node: 05253584 -Node: 05153886 -Node: 0554311 -Node: 04955842 -Node: 04856124 -Node: 04756473 -Node: 04656882 -Node: 04557290 -Node: 04457651 -Node: 04358010 -Node: 04258213 -Node: 04158374 -Node: 0458621 -Node: 03262722 -Node: 03163125 -Node: 0363322 -Node: 02366622 -Node: 02266856 -Node: 02167136 -Node: 0267341 -Node: 0171419 -Node: Notes71520 -Node: Comparison with Org Agenda searches71682 -Node: org-sidebar72571 -Node: License72850 +Node: 0840871 +Node: 07443599 +Node: 07343822 +Node: 07244554 +Node: 07145473 +Node: 0746282 +Node: 06349206 +Node: 06249737 +Node: 06150042 +Node: 0650612 +Node: 05253668 +Node: 05153970 +Node: 0554395 +Node: 04955926 +Node: 04856208 +Node: 04756557 +Node: 04656966 +Node: 04557374 +Node: 04457735 +Node: 04358094 +Node: 04258297 +Node: 04158458 +Node: 0458705 +Node: 03262806 +Node: 03163209 +Node: 0363406 +Node: 02366706 +Node: 02266940 +Node: 02167220 +Node: 0267425 +Node: 0171503 +Node: Notes71604 +Node: Comparison with Org Agenda searches71766 +Node: org-sidebar72655 +Node: License72934  End Tag Table From 529e05851bada55d8e6a8b7a11751bf104e37cea Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Jan 2024 18:32:02 -0600 Subject: [PATCH 30/43] Fix: (org-ql-view--format-element) Avoid unlinkifying links I don't fully understand why this is the correct fix, because I don't know where the raw heading text is being linkified (it seems like the :raw-value property should be the unlinkified text), but this seems to work correctly now. If it turns out to break something else, we'll find out and fix it. Fixes #282. Reported-by: Jacob Boxerman --- README.org | 1 + org-ql-view.el | 3 +- org-ql.info | 74 ++++++++++++++++++++++++++------------------------ 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/README.org b/README.org index 178ca4f..129cb25 100644 --- a/README.org +++ b/README.org @@ -558,6 +558,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Command ~org-ql-find~ widens the buffer before going to the selected entry. ++ In ~org-ql-view~ buffers, links in headings remain clickable links. (Fixes [[https://github.com/alphapapa/org-ql/issues/282][#282]]. Thanks to [[https://github.com/jakebox][Jacob Boxerman]] for reporting.) ** 0.8 diff --git a/org-ql-view.el b/org-ql-view.el index 5d452de..4d3c8c3 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -869,8 +869,7 @@ return an empty string." ;; Adding the relative due date property should probably be done explicitly and separately ;; (which would also make it easier to do it independently of faces, etc). (title (--> (org-ql-view--add-faces element) - (org-element-property :raw-value it) - (org-link-display-format it))) + (org-element-property :raw-value it))) (todo-keyword (-some--> (org-element-property :todo-keyword element) (org-ql-view--add-todo-face it))) (tag-list (if org-use-tag-inheritance diff --git a/org-ql.info b/org-ql.info index 630d120..f3a72a1 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1072,6 +1072,10 @@ File: README.info, Node: 081-pre, Next: 08, Up: Changelog • Command ‘org-ql-find’ widens the buffer before going to the selected entry. + • In ‘org-ql-view’ buffers, links in headings remain clickable links. + (Fixes #282 (https://github.com/alphapapa/org-ql/issues/282). + Thanks to Jacob Boxerman (https://github.com/jakebox) for + reporting.)  File: README.info, Node: 08, Next: 074, Prev: 081-pre, Up: Changelog @@ -1919,41 +1923,41 @@ Node: Links38827 Node: Tips39514 Node: Changelog39838 Node: 081-pre40676 -Node: 0840871 -Node: 07443599 -Node: 07343822 -Node: 07244554 -Node: 07145473 -Node: 0746282 -Node: 06349206 -Node: 06249737 -Node: 06150042 -Node: 0650612 -Node: 05253668 -Node: 05153970 -Node: 0554395 -Node: 04955926 -Node: 04856208 -Node: 04756557 -Node: 04656966 -Node: 04557374 -Node: 04457735 -Node: 04358094 -Node: 04258297 -Node: 04158458 -Node: 0458705 -Node: 03262806 -Node: 03163209 -Node: 0363406 -Node: 02366706 -Node: 02266940 -Node: 02167220 -Node: 0267425 -Node: 0171503 -Node: Notes71604 -Node: Comparison with Org Agenda searches71766 -Node: org-sidebar72655 -Node: License72934 +Node: 0841097 +Node: 07443825 +Node: 07344048 +Node: 07244780 +Node: 07145699 +Node: 0746508 +Node: 06349432 +Node: 06249963 +Node: 06150268 +Node: 0650838 +Node: 05253894 +Node: 05154196 +Node: 0554621 +Node: 04956152 +Node: 04856434 +Node: 04756783 +Node: 04657192 +Node: 04557600 +Node: 04457961 +Node: 04358320 +Node: 04258523 +Node: 04158684 +Node: 0458931 +Node: 03263032 +Node: 03163435 +Node: 0363632 +Node: 02366932 +Node: 02267166 +Node: 02167446 +Node: 0267651 +Node: 0171729 +Node: Notes71830 +Node: Comparison with Org Agenda searches71992 +Node: org-sidebar72881 +Node: License73160  End Tag Table From 393f88e7f376bd24a70a52ed520218cefba6b5bc Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Mon, 1 Jan 2024 23:35:38 +0000 Subject: [PATCH 31/43] Remove mentions of removed functions from v0.7 subheading in Changelog. These commands were removed in 5768c685adc7c6e85c17cfec358aa8a0e368310b, but they were still mentioned in the release that was going to incorporate those two functions, v0.7. This commit removes the mention of those two functions from the v0.7 subheading in the changelog. Note that `org-ql-find-path` was re-introduced in v0.8, so it remains under that subheading as a separate addition. --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 129cb25..2502101 100644 --- a/README.org +++ b/README.org @@ -611,7 +611,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.7 *Added* -+ Commands ~org-ql-find~, ~org-ql-find-heading~, and ~org-ql-find-path~, which jump to entries selected using Emacs's built-in completion facilities and Org QL queries (like ~helm-org-ql~, but doesn't require Helm.). ++ Command ~org-ql-find~, which jumps to entries selected using Emacs's built-in completion facilities and Org QL queries (like ~helm-org-ql~, but doesn't require Helm.). + Command ~org-ql-refile~, which refiles the entry at point to one selected using Org QL completion. + Predicate ~rifle~, which matches an entry if each of the given arguments is found in either the entry's contents or its outline path. This provides very intuitive results, mimicing the behavior of [[https://github.com/alphapapa/org-rifle][=org-rifle=]]. In fact, the results are so useful that it's now the default predicate for plain-string query tokens. (It is also aliased to ~smart~, since it's so "smart," and not all users have used =org-rifle=.) + Option ~org-ql-default-predicate~, applied to plain-string query tokens (before, the ~regexp~ predicate was always used, but now it may be customized). From 51869fd7f968a8beaebf0dbaeaeaa08a21bb252a Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Jan 2024 18:47:44 -0600 Subject: [PATCH 32/43] Release: v0.8.1 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 159 ++++++++++++++++++++++++++-------------------------- 3 files changed, 81 insertions(+), 82 deletions(-) diff --git a/README.org b/README.org index 2502101..59235b6 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ 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. -** 0.8.1-pre +** 0.8.1 *Fixes* diff --git a/org-ql.el b/org-ql.el index 7134a48..3bed395 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.1-pre +;; Version: 0.8.1 ;; 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 diff --git a/org-ql.info b/org-ql.info index f3a72a1..f55af54 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.1-pre: 081-pre. +* 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1029,7 +1029,7 @@ releases. * Menu: -* 0.8.1-pre: 081-pre. +* 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. * 0.7.3: 073. @@ -1063,10 +1063,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 081-pre, Next: 08, Up: Changelog +File: README.info, Node: 081, Next: 08, Up: Changelog -5.1 0.8.1-pre -============= +5.1 0.8.1 +========= *Fixes* @@ -1078,7 +1078,7 @@ File: README.info, Node: 081-pre, Next: 08, Up: Changelog reporting.)  -File: README.info, Node: 08, Next: 074, Prev: 081-pre, Up: Changelog +File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog 5.2 0.8 ======= @@ -1208,9 +1208,8 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog ======= *Added* - • Commands ‘org-ql-find’, ‘org-ql-find-heading’, and - ‘org-ql-find-path’, which jump to entries selected using Emacs’s - built-in completion facilities and Org QL queries (like + • Command ‘org-ql-find’, which jumps to entries selected using + Emacs’s built-in completion facilities and Org QL queries (like ‘helm-org-ql’, but doesn’t require Helm.). • Command ‘org-ql-refile’, which refiles the entry at point to one selected using Org QL completion. @@ -1887,77 +1886,77 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1873 -Node: Screenshots1996 -Node: Installation2114 -Node: Quelpa2628 -Node: Helm support3156 -Node: Usage3559 -Node: Commands3957 -Node: org-ql-find4422 -Node: org-ql-open-link5330 -Node: org-ql-refile6185 -Node: org-ql-search6513 -Node: helm-org-ql8444 -Node: org-ql-view8822 -Node: org-ql-view-sidebar9352 -Node: org-ql-view-recent-items9732 -Node: org-ql-sparse-tree10228 -Node: Queries11028 -Node: Non-sexp query syntax12145 -Node: General predicates13904 -Node: Ancestor/descendant predicates20829 -Node: Date/time predicates21957 -Node: Functions / Macros25081 -Node: Agenda-like views25379 -Ref: Function org-ql-block25541 -Node: Listing / acting-on results26802 -Ref: Caching27010 -Ref: Function org-ql-select27923 -Ref: Function org-ql-query30349 -Ref: Macro org-ql (deprecated)32123 -Node: Custom predicates32438 -Ref: Macro org-ql-defpred32662 -Node: Dynamic block36103 -Node: Links38827 -Node: Tips39514 -Node: Changelog39838 -Node: 081-pre40676 -Node: 0841097 -Node: 07443825 -Node: 07344048 -Node: 07244780 -Node: 07145699 -Node: 0746508 -Node: 06349432 -Node: 06249963 -Node: 06150268 -Node: 0650838 -Node: 05253894 -Node: 05154196 -Node: 0554621 -Node: 04956152 -Node: 04856434 -Node: 04756783 -Node: 04657192 -Node: 04557600 -Node: 04457961 -Node: 04358320 -Node: 04258523 -Node: 04158684 -Node: 0458931 -Node: 03263032 -Node: 03163435 -Node: 0363632 -Node: 02366932 -Node: 02267166 -Node: 02167446 -Node: 0267651 -Node: 0171729 -Node: Notes71830 -Node: Comparison with Org Agenda searches71992 -Node: org-sidebar72881 -Node: License73160 +Node: Contents1865 +Node: Screenshots1988 +Node: Installation2106 +Node: Quelpa2620 +Node: Helm support3148 +Node: Usage3551 +Node: Commands3949 +Node: org-ql-find4414 +Node: org-ql-open-link5322 +Node: org-ql-refile6177 +Node: org-ql-search6505 +Node: helm-org-ql8436 +Node: org-ql-view8814 +Node: org-ql-view-sidebar9344 +Node: org-ql-view-recent-items9724 +Node: org-ql-sparse-tree10220 +Node: Queries11020 +Node: Non-sexp query syntax12137 +Node: General predicates13896 +Node: Ancestor/descendant predicates20821 +Node: Date/time predicates21949 +Node: Functions / Macros25073 +Node: Agenda-like views25371 +Ref: Function org-ql-block25533 +Node: Listing / acting-on results26794 +Ref: Caching27002 +Ref: Function org-ql-select27915 +Ref: Function org-ql-query30341 +Ref: Macro org-ql (deprecated)32115 +Node: Custom predicates32430 +Ref: Macro org-ql-defpred32654 +Node: Dynamic block36095 +Node: Links38819 +Node: Tips39506 +Node: Changelog39830 +Node: 08140660 +Node: 0841069 +Node: 07443793 +Node: 07344016 +Node: 07244748 +Node: 07145667 +Node: 0746476 +Node: 06349340 +Node: 06249871 +Node: 06150176 +Node: 0650746 +Node: 05253802 +Node: 05154104 +Node: 0554529 +Node: 04956060 +Node: 04856342 +Node: 04756691 +Node: 04657100 +Node: 04557508 +Node: 04457869 +Node: 04358228 +Node: 04258431 +Node: 04158592 +Node: 0458839 +Node: 03262940 +Node: 03163343 +Node: 0363540 +Node: 02366840 +Node: 02267074 +Node: 02167354 +Node: 0267559 +Node: 0171637 +Node: Notes71738 +Node: Comparison with Org Agenda searches71900 +Node: org-sidebar72789 +Node: License73068  End Tag Table From 8595139f5b3fa4fbf3c1b43629498525d83e686c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:22:38 -0600 Subject: [PATCH 33/43] Meta: v0.8.2-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 221 +++++++++++++++++++++++++++------------------------- 3 files changed, 121 insertions(+), 106 deletions(-) diff --git a/README.org b/README.org index 59235b6..5a7190f 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ 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. +** 0.8.2-pre + +Nothing new yet. + ** 0.8.1 *Fixes* diff --git a/org-ql.el b/org-ql.el index 3bed395..8611708 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.1 +;; Version: 0.8.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 diff --git a/org-ql.info b/org-ql.info index f55af54..57c34a9 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.2-pre: 082-pre. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1029,6 +1030,7 @@ releases. * Menu: +* 0.8.2-pre: 082-pre. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1063,9 +1065,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 081, Next: 08, Up: Changelog +File: README.info, Node: 082-pre, Next: 081, Up: Changelog -5.1 0.8.1 +5.1 0.8.2-pre +============= + +Nothing new yet. + + +File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog + +5.2 0.8.1 ========= *Fixes* @@ -1080,7 +1090,7 @@ File: README.info, Node: 081, Next: 08, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.2 0.8 +5.3 0.8 ======= *Additions* @@ -1136,7 +1146,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.3 0.7.4 +5.4 0.7.4 ========= *Fixes* @@ -1146,7 +1156,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.4 0.7.3 +5.5 0.7.3 ========= *Fixes* @@ -1164,7 +1174,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.5 0.7.2 +5.6 0.7.2 ========= *Fixes* @@ -1185,7 +1195,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.6 0.7.1 +5.7 0.7.1 ========= *Fixes* @@ -1204,7 +1214,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.7 0.7 +5.8 0.7 ======= *Added* @@ -1263,7 +1273,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.8 0.6.3 +5.9 0.6.3 ========= *Fixed* @@ -1279,8 +1289,8 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.9 0.6.2 -========= +5.10 0.6.2 +========== *Fixed* • ‘link’ predicate when used in an ‘or’’ed query. (#279 @@ -1290,7 +1300,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.10 0.6.1 +5.11 0.6.1 ========== *Fixed* @@ -1308,7 +1318,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.11 0.6 +5.12 0.6 ======== *Added* @@ -1375,7 +1385,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.12 0.5.2 +5.13 0.5.2 ========== *Fixed* @@ -1386,7 +1396,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.13 0.5.1 +5.14 0.5.1 ========== *Fixed* @@ -1399,7 +1409,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.14 0.5 +5.15 0.5 ======== *Added* @@ -1440,7 +1450,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.15 0.4.9 +5.16 0.4.9 ========== *Fixed* @@ -1451,7 +1461,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.16 0.4.8 +5.17 0.4.8 ========== *Fixed* @@ -1463,7 +1473,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.17 0.4.7 +5.18 0.4.7 ========== *Fixed* @@ -1476,7 +1486,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.18 0.4.6 +5.19 0.4.6 ========== *Fixed* @@ -1489,7 +1499,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.19 0.4.5 +5.20 0.4.5 ========== *Fixed* @@ -1501,7 +1511,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.20 0.4.4 +5.21 0.4.4 ========== *Fixed* @@ -1513,7 +1523,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.21 0.4.3 +5.22 0.4.3 ========== *Fixed* @@ -1523,7 +1533,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.22 0.4.2 +5.23 0.4.2 ========== *Fixed* @@ -1532,7 +1542,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.23 0.4.1 +5.24 0.4.1 ========== *Fixed* @@ -1542,7 +1552,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.24 0.4 +5.25 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1623,7 +1633,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.25 0.3.2 +5.26 0.3.2 ========== *Fixed* @@ -1636,7 +1646,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.26 0.3.1 +5.27 0.3.1 ========== *Fixed* @@ -1646,7 +1656,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.27 0.3 +5.28 0.3 ======== *Added* @@ -1714,7 +1724,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.28 0.2.3 +5.29 0.2.3 ========== *Fixed* @@ -1724,7 +1734,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.29 0.2.2 +5.30 0.2.2 ========== *Fixed* @@ -1735,7 +1745,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.30 0.2.1 +5.31 0.2.1 ========== *Fixed* @@ -1745,7 +1755,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.31 0.2 +5.32 0.2 ======== *Added* @@ -1828,7 +1838,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.32 0.1 +5.33 0.1 ======== First tagged release. @@ -1886,77 +1896,78 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1865 -Node: Screenshots1988 -Node: Installation2106 -Node: Quelpa2620 -Node: Helm support3148 -Node: Usage3551 -Node: Commands3949 -Node: org-ql-find4414 -Node: org-ql-open-link5322 -Node: org-ql-refile6177 -Node: org-ql-search6505 -Node: helm-org-ql8436 -Node: org-ql-view8814 -Node: org-ql-view-sidebar9344 -Node: org-ql-view-recent-items9724 -Node: org-ql-sparse-tree10220 -Node: Queries11020 -Node: Non-sexp query syntax12137 -Node: General predicates13896 -Node: Ancestor/descendant predicates20821 -Node: Date/time predicates21949 -Node: Functions / Macros25073 -Node: Agenda-like views25371 -Ref: Function org-ql-block25533 -Node: Listing / acting-on results26794 -Ref: Caching27002 -Ref: Function org-ql-select27915 -Ref: Function org-ql-query30341 -Ref: Macro org-ql (deprecated)32115 -Node: Custom predicates32430 -Ref: Macro org-ql-defpred32654 -Node: Dynamic block36095 -Node: Links38819 -Node: Tips39506 -Node: Changelog39830 -Node: 08140660 -Node: 0841069 -Node: 07443793 -Node: 07344016 -Node: 07244748 -Node: 07145667 -Node: 0746476 -Node: 06349340 -Node: 06249871 -Node: 06150176 -Node: 0650746 -Node: 05253802 -Node: 05154104 -Node: 0554529 -Node: 04956060 -Node: 04856342 -Node: 04756691 -Node: 04657100 -Node: 04557508 -Node: 04457869 -Node: 04358228 -Node: 04258431 -Node: 04158592 -Node: 0458839 -Node: 03262940 -Node: 03163343 -Node: 0363540 -Node: 02366840 -Node: 02267074 -Node: 02167354 -Node: 0267559 -Node: 0171637 -Node: Notes71738 -Node: Comparison with Org Agenda searches71900 -Node: org-sidebar72789 -Node: License73068 +Node: Contents1887 +Node: Screenshots2010 +Node: Installation2128 +Node: Quelpa2642 +Node: Helm support3170 +Node: Usage3573 +Node: Commands3971 +Node: org-ql-find4436 +Node: org-ql-open-link5344 +Node: org-ql-refile6199 +Node: org-ql-search6527 +Node: helm-org-ql8458 +Node: org-ql-view8836 +Node: org-ql-view-sidebar9366 +Node: org-ql-view-recent-items9746 +Node: org-ql-sparse-tree10242 +Node: Queries11042 +Node: Non-sexp query syntax12159 +Node: General predicates13918 +Node: Ancestor/descendant predicates20843 +Node: Date/time predicates21971 +Node: Functions / Macros25095 +Node: Agenda-like views25393 +Ref: Function org-ql-block25555 +Node: Listing / acting-on results26816 +Ref: Caching27024 +Ref: Function org-ql-select27937 +Ref: Function org-ql-query30363 +Ref: Macro org-ql (deprecated)32137 +Node: Custom predicates32452 +Ref: Macro org-ql-defpred32676 +Node: Dynamic block36117 +Node: Links38841 +Node: Tips39528 +Node: Changelog39852 +Node: 082-pre40704 +Node: 08140816 +Node: 0841241 +Node: 07443965 +Node: 07344188 +Node: 07244920 +Node: 07145839 +Node: 0746648 +Node: 06349512 +Node: 06250043 +Node: 06150350 +Node: 0650920 +Node: 05253976 +Node: 05154278 +Node: 0554703 +Node: 04956234 +Node: 04856516 +Node: 04756865 +Node: 04657274 +Node: 04557682 +Node: 04458043 +Node: 04358402 +Node: 04258605 +Node: 04158766 +Node: 0459013 +Node: 03263114 +Node: 03163517 +Node: 0363714 +Node: 02367014 +Node: 02267248 +Node: 02167528 +Node: 0267733 +Node: 0171811 +Node: Notes71912 +Node: Comparison with Org Agenda searches72074 +Node: org-sidebar72963 +Node: License73242  End Tag Table From 7ff6cc2ef71ac703c22834eae06550be68daa0f3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:23:55 -0600 Subject: [PATCH 34/43] Fix: (org-ql-find) Don't use org-with-point-at See . Reported-by: Bram Schoenmakers --- README.org | 4 ++- org-ql-find.el | 2 +- org-ql.info | 80 +++++++++++++++++++++++++++----------------------- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/README.org b/README.org index 5a7190f..17249ec 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.2-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ incorrectly restored the buffer after jumping when not using indirect buffers. (See [[https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025][#380]]. Thanks to [[https://github.com/bram85][Bram Schoenmakers]] for reporting.) ** 0.8.1 diff --git a/org-ql-find.el b/org-ql-find.el index fed9ade..3e517c6 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -77,7 +77,7 @@ single predicate)." :prompt prompt))) (set-buffer (marker-buffer marker)) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) - (org-with-point-at marker + (without-restriction (run-hook-with-args 'org-ql-find-goto-hook)))) ;;;###autoload diff --git a/org-ql.info b/org-ql.info index 57c34a9..78a9c54 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1070,7 +1070,13 @@ File: README.info, Node: 082-pre, Next: 081, Up: Changelog 5.1 0.8.2-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ incorrectly restored the buffer after jumping + when not using indirect buffers. (See #380 + (https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025). + Thanks to Bram Schoenmakers (https://github.com/bram85) for + reporting.)  File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog @@ -1932,42 +1938,42 @@ Node: Links38841 Node: Tips39528 Node: Changelog39852 Node: 082-pre40704 -Node: 08140816 -Node: 0841241 -Node: 07443965 -Node: 07344188 -Node: 07244920 -Node: 07145839 -Node: 0746648 -Node: 06349512 -Node: 06250043 -Node: 06150350 -Node: 0650920 -Node: 05253976 -Node: 05154278 -Node: 0554703 -Node: 04956234 -Node: 04856516 -Node: 04756865 -Node: 04657274 -Node: 04557682 -Node: 04458043 -Node: 04358402 -Node: 04258605 -Node: 04158766 -Node: 0459013 -Node: 03263114 -Node: 03163517 -Node: 0363714 -Node: 02367014 -Node: 02267248 -Node: 02167528 -Node: 0267733 -Node: 0171811 -Node: Notes71912 -Node: Comparison with Org Agenda searches72074 -Node: org-sidebar72963 -Node: License73242 +Node: 08141097 +Node: 0841522 +Node: 07444246 +Node: 07344469 +Node: 07245201 +Node: 07146120 +Node: 0746929 +Node: 06349793 +Node: 06250324 +Node: 06150631 +Node: 0651201 +Node: 05254257 +Node: 05154559 +Node: 0554984 +Node: 04956515 +Node: 04856797 +Node: 04757146 +Node: 04657555 +Node: 04557963 +Node: 04458324 +Node: 04358683 +Node: 04258886 +Node: 04159047 +Node: 0459294 +Node: 03263395 +Node: 03163798 +Node: 0363995 +Node: 02367295 +Node: 02267529 +Node: 02167809 +Node: 0268014 +Node: 0172092 +Node: Notes72193 +Node: Comparison with Org Agenda searches72355 +Node: org-sidebar73244 +Node: License73523  End Tag Table From 3448e49d86695707737e9471cfac740afa8e6fc1 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:27:11 -0600 Subject: [PATCH 35/43] Release: v0.8.2 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 156 ++++++++++++++++++++++++++-------------------------- 3 files changed, 80 insertions(+), 80 deletions(-) diff --git a/README.org b/README.org index 17249ec..7fbb935 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ 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. -** 0.8.2-pre +** 0.8.2 *Fixes* diff --git a/org-ql.el b/org-ql.el index 8611708..349c3dd 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.2-pre +;; Version: 0.8.2 ;; 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 diff --git a/org-ql.info b/org-ql.info index 78a9c54..47fc78a 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.2-pre: 082-pre. +* 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1030,7 +1030,7 @@ releases. * Menu: -* 0.8.2-pre: 082-pre. +* 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1065,10 +1065,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 082-pre, Next: 081, Up: Changelog +File: README.info, Node: 082, Next: 081, Up: Changelog -5.1 0.8.2-pre -============= +5.1 0.8.2 +========= *Fixes* @@ -1079,7 +1079,7 @@ File: README.info, Node: 082-pre, Next: 081, Up: Changelog reporting.)  -File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog +File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog 5.2 0.8.1 ========= @@ -1902,78 +1902,78 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1887 -Node: Screenshots2010 -Node: Installation2128 -Node: Quelpa2642 -Node: Helm support3170 -Node: Usage3573 -Node: Commands3971 -Node: org-ql-find4436 -Node: org-ql-open-link5344 -Node: org-ql-refile6199 -Node: org-ql-search6527 -Node: helm-org-ql8458 -Node: org-ql-view8836 -Node: org-ql-view-sidebar9366 -Node: org-ql-view-recent-items9746 -Node: org-ql-sparse-tree10242 -Node: Queries11042 -Node: Non-sexp query syntax12159 -Node: General predicates13918 -Node: Ancestor/descendant predicates20843 -Node: Date/time predicates21971 -Node: Functions / Macros25095 -Node: Agenda-like views25393 -Ref: Function org-ql-block25555 -Node: Listing / acting-on results26816 -Ref: Caching27024 -Ref: Function org-ql-select27937 -Ref: Function org-ql-query30363 -Ref: Macro org-ql (deprecated)32137 -Node: Custom predicates32452 -Ref: Macro org-ql-defpred32676 -Node: Dynamic block36117 -Node: Links38841 -Node: Tips39528 -Node: Changelog39852 -Node: 082-pre40704 -Node: 08141097 -Node: 0841522 -Node: 07444246 -Node: 07344469 -Node: 07245201 -Node: 07146120 -Node: 0746929 -Node: 06349793 -Node: 06250324 -Node: 06150631 -Node: 0651201 -Node: 05254257 -Node: 05154559 -Node: 0554984 -Node: 04956515 -Node: 04856797 -Node: 04757146 -Node: 04657555 -Node: 04557963 -Node: 04458324 -Node: 04358683 -Node: 04258886 -Node: 04159047 -Node: 0459294 -Node: 03263395 -Node: 03163798 -Node: 0363995 -Node: 02367295 -Node: 02267529 -Node: 02167809 -Node: 0268014 -Node: 0172092 -Node: Notes72193 -Node: Comparison with Org Agenda searches72355 -Node: org-sidebar73244 -Node: License73523 +Node: Contents1879 +Node: Screenshots2002 +Node: Installation2120 +Node: Quelpa2634 +Node: Helm support3162 +Node: Usage3565 +Node: Commands3963 +Node: org-ql-find4428 +Node: org-ql-open-link5336 +Node: org-ql-refile6191 +Node: org-ql-search6519 +Node: helm-org-ql8450 +Node: org-ql-view8828 +Node: org-ql-view-sidebar9358 +Node: org-ql-view-recent-items9738 +Node: org-ql-sparse-tree10234 +Node: Queries11034 +Node: Non-sexp query syntax12151 +Node: General predicates13910 +Node: Ancestor/descendant predicates20835 +Node: Date/time predicates21963 +Node: Functions / Macros25087 +Node: Agenda-like views25385 +Ref: Function org-ql-block25547 +Node: Listing / acting-on results26808 +Ref: Caching27016 +Ref: Function org-ql-select27929 +Ref: Function org-ql-query30355 +Ref: Macro org-ql (deprecated)32129 +Node: Custom predicates32444 +Ref: Macro org-ql-defpred32668 +Node: Dynamic block36109 +Node: Links38833 +Node: Tips39520 +Node: Changelog39844 +Node: 08240688 +Node: 08141069 +Node: 0841490 +Node: 07444214 +Node: 07344437 +Node: 07245169 +Node: 07146088 +Node: 0746897 +Node: 06349761 +Node: 06250292 +Node: 06150599 +Node: 0651169 +Node: 05254225 +Node: 05154527 +Node: 0554952 +Node: 04956483 +Node: 04856765 +Node: 04757114 +Node: 04657523 +Node: 04557931 +Node: 04458292 +Node: 04358651 +Node: 04258854 +Node: 04159015 +Node: 0459262 +Node: 03263363 +Node: 03163766 +Node: 0363963 +Node: 02367263 +Node: 02267497 +Node: 02167777 +Node: 0267982 +Node: 0172060 +Node: Notes72161 +Node: Comparison with Org Agenda searches72323 +Node: org-sidebar73212 +Node: License73491  End Tag Table From 694739b31dcd17f0118365945d69a80e8fdb2fe4 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:38:15 -0600 Subject: [PATCH 36/43] Meta: v0.8.3-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 225 +++++++++++++++++++++++++++------------------------- 3 files changed, 123 insertions(+), 108 deletions(-) diff --git a/README.org b/README.org index 7fbb935..c485caa 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ 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. +** 0.8.3-pre + +Nothing new yet. + ** 0.8.2 *Fixes* diff --git a/org-ql.el b/org-ql.el index 349c3dd..98d0423 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.2 +;; Version: 0.8.3-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 diff --git a/org-ql.info b/org-ql.info index 47fc78a..e10accc 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.3-pre: 083-pre. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1030,6 +1031,7 @@ releases. * Menu: +* 0.8.3-pre: 083-pre. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1065,9 +1067,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 082, Next: 081, Up: Changelog +File: README.info, Node: 083-pre, Next: 082, Up: Changelog -5.1 0.8.2 +5.1 0.8.3-pre +============= + +Nothing new yet. + + +File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog + +5.2 0.8.2 ========= *Fixes* @@ -1081,7 +1091,7 @@ File: README.info, Node: 082, Next: 081, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.2 0.8.1 +5.3 0.8.1 ========= *Fixes* @@ -1096,7 +1106,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.3 0.8 +5.4 0.8 ======= *Additions* @@ -1152,7 +1162,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.4 0.7.4 +5.5 0.7.4 ========= *Fixes* @@ -1162,7 +1172,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.5 0.7.3 +5.6 0.7.3 ========= *Fixes* @@ -1180,7 +1190,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.6 0.7.2 +5.7 0.7.2 ========= *Fixes* @@ -1201,7 +1211,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.7 0.7.1 +5.8 0.7.1 ========= *Fixes* @@ -1220,7 +1230,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.8 0.7 +5.9 0.7 ======= *Added* @@ -1279,8 +1289,8 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.9 0.6.3 -========= +5.10 0.6.3 +========== *Fixed* • Non-sexp query parsing with updated version 1.0.1 of the ‘peg’ @@ -1295,7 +1305,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.10 0.6.2 +5.11 0.6.2 ========== *Fixed* @@ -1306,7 +1316,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.11 0.6.1 +5.12 0.6.1 ========== *Fixed* @@ -1324,7 +1334,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.12 0.6 +5.13 0.6 ======== *Added* @@ -1391,7 +1401,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.13 0.5.2 +5.14 0.5.2 ========== *Fixed* @@ -1402,7 +1412,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.14 0.5.1 +5.15 0.5.1 ========== *Fixed* @@ -1415,7 +1425,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.15 0.5 +5.16 0.5 ======== *Added* @@ -1456,7 +1466,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.16 0.4.9 +5.17 0.4.9 ========== *Fixed* @@ -1467,7 +1477,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.17 0.4.8 +5.18 0.4.8 ========== *Fixed* @@ -1479,7 +1489,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.18 0.4.7 +5.19 0.4.7 ========== *Fixed* @@ -1492,7 +1502,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.19 0.4.6 +5.20 0.4.6 ========== *Fixed* @@ -1505,7 +1515,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.20 0.4.5 +5.21 0.4.5 ========== *Fixed* @@ -1517,7 +1527,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.21 0.4.4 +5.22 0.4.4 ========== *Fixed* @@ -1529,7 +1539,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.22 0.4.3 +5.23 0.4.3 ========== *Fixed* @@ -1539,7 +1549,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.23 0.4.2 +5.24 0.4.2 ========== *Fixed* @@ -1548,7 +1558,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.24 0.4.1 +5.25 0.4.1 ========== *Fixed* @@ -1558,7 +1568,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.25 0.4 +5.26 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1639,7 +1649,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.26 0.3.2 +5.27 0.3.2 ========== *Fixed* @@ -1652,7 +1662,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.27 0.3.1 +5.28 0.3.1 ========== *Fixed* @@ -1662,7 +1672,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.28 0.3 +5.29 0.3 ======== *Added* @@ -1730,7 +1740,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.29 0.2.3 +5.30 0.2.3 ========== *Fixed* @@ -1740,7 +1750,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.30 0.2.2 +5.31 0.2.2 ========== *Fixed* @@ -1751,7 +1761,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.31 0.2.1 +5.32 0.2.1 ========== *Fixed* @@ -1761,7 +1771,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.32 0.2 +5.33 0.2 ======== *Added* @@ -1844,7 +1854,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.33 0.1 +5.34 0.1 ======== First tagged release. @@ -1902,78 +1912,79 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1879 -Node: Screenshots2002 -Node: Installation2120 -Node: Quelpa2634 -Node: Helm support3162 -Node: Usage3565 -Node: Commands3963 -Node: org-ql-find4428 -Node: org-ql-open-link5336 -Node: org-ql-refile6191 -Node: org-ql-search6519 -Node: helm-org-ql8450 -Node: org-ql-view8828 -Node: org-ql-view-sidebar9358 -Node: org-ql-view-recent-items9738 -Node: org-ql-sparse-tree10234 -Node: Queries11034 -Node: Non-sexp query syntax12151 -Node: General predicates13910 -Node: Ancestor/descendant predicates20835 -Node: Date/time predicates21963 -Node: Functions / Macros25087 -Node: Agenda-like views25385 -Ref: Function org-ql-block25547 -Node: Listing / acting-on results26808 -Ref: Caching27016 -Ref: Function org-ql-select27929 -Ref: Function org-ql-query30355 -Ref: Macro org-ql (deprecated)32129 -Node: Custom predicates32444 -Ref: Macro org-ql-defpred32668 -Node: Dynamic block36109 -Node: Links38833 -Node: Tips39520 -Node: Changelog39844 -Node: 08240688 -Node: 08141069 -Node: 0841490 -Node: 07444214 -Node: 07344437 -Node: 07245169 -Node: 07146088 -Node: 0746897 -Node: 06349761 -Node: 06250292 -Node: 06150599 -Node: 0651169 -Node: 05254225 -Node: 05154527 -Node: 0554952 -Node: 04956483 -Node: 04856765 -Node: 04757114 -Node: 04657523 -Node: 04557931 -Node: 04458292 -Node: 04358651 -Node: 04258854 -Node: 04159015 -Node: 0459262 -Node: 03263363 -Node: 03163766 -Node: 0363963 -Node: 02367263 -Node: 02267497 -Node: 02167777 -Node: 0267982 -Node: 0172060 -Node: Notes72161 -Node: Comparison with Org Agenda searches72323 -Node: org-sidebar73212 -Node: License73491 +Node: Contents1901 +Node: Screenshots2024 +Node: Installation2142 +Node: Quelpa2656 +Node: Helm support3184 +Node: Usage3587 +Node: Commands3985 +Node: org-ql-find4450 +Node: org-ql-open-link5358 +Node: org-ql-refile6213 +Node: org-ql-search6541 +Node: helm-org-ql8472 +Node: org-ql-view8850 +Node: org-ql-view-sidebar9380 +Node: org-ql-view-recent-items9760 +Node: org-ql-sparse-tree10256 +Node: Queries11056 +Node: Non-sexp query syntax12173 +Node: General predicates13932 +Node: Ancestor/descendant predicates20857 +Node: Date/time predicates21985 +Node: Functions / Macros25109 +Node: Agenda-like views25407 +Ref: Function org-ql-block25569 +Node: Listing / acting-on results26830 +Ref: Caching27038 +Ref: Function org-ql-select27951 +Ref: Function org-ql-query30377 +Ref: Macro org-ql (deprecated)32151 +Node: Custom predicates32466 +Ref: Macro org-ql-defpred32690 +Node: Dynamic block36131 +Node: Links38855 +Node: Tips39542 +Node: Changelog39866 +Node: 083-pre40732 +Node: 08240844 +Node: 08141241 +Node: 0841662 +Node: 07444386 +Node: 07344609 +Node: 07245341 +Node: 07146260 +Node: 0747069 +Node: 06349933 +Node: 06250466 +Node: 06150773 +Node: 0651343 +Node: 05254399 +Node: 05154701 +Node: 0555126 +Node: 04956657 +Node: 04856939 +Node: 04757288 +Node: 04657697 +Node: 04558105 +Node: 04458466 +Node: 04358825 +Node: 04259028 +Node: 04159189 +Node: 0459436 +Node: 03263537 +Node: 03163940 +Node: 0364137 +Node: 02367437 +Node: 02267671 +Node: 02167951 +Node: 0268156 +Node: 0172234 +Node: Notes72335 +Node: Comparison with Org Agenda searches72497 +Node: org-sidebar73386 +Node: License73665  End Tag Table From 0b1e4b43ec522aaedeac4abf8858b8b3b86753e6 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:55:16 -0600 Subject: [PATCH 37/43] Fix: (org-ql-find) Moving point and widening buffer as needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #380. Reported-by: Omar Antolín Camarena --- README.org | 4 ++- org-ql-find.el | 15 +++++++++- org-ql.info | 81 +++++++++++++++++++++++++++----------------------- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/README.org b/README.org index c485caa..52740c7 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.3-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ incorrectly moved point. (See [[https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025][#380]]. Thanks to [[https://github.com/oantolin][Omar Antolín Camarena]] for reporting.) ** 0.8.2 diff --git a/org-ql-find.el b/org-ql-find.el index 3e517c6..591e958 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -78,7 +78,20 @@ single predicate)." (set-buffer (marker-buffer marker)) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (without-restriction - (run-hook-with-args 'org-ql-find-goto-hook)))) + (goto-char marker) + (run-hook-with-args 'org-ql-find-goto-hook)) + (when (equal (current-buffer) (marker-buffer marker)) + ;; Ensure point is still within visible portion of buffer. (If + ;; `org-tree-to-indirect-buffer' is used in `org-ql-find-goto-hook', + ;; the buffer will have been changed and it won't matter; otherwise, + ;; the buffer could have been narrowed to a region excluding the + ;; selected entry.) + (let ((end-of-subtree (org-with-point-at marker + (org-end-of-subtree 'invisible-ok)))) + (unless (and (<= (point-min) marker) + (>= (point-max) end-of-subtree)) + (widen) + (goto-char marker)))))) ;;;###autoload (defun org-ql-refile (marker) diff --git a/org-ql.info b/org-ql.info index e10accc..174bbb1 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1072,7 +1072,12 @@ File: README.info, Node: 083-pre, Next: 082, Up: Changelog 5.1 0.8.3-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ incorrectly moved point. (See #380 + (https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025). + Thanks to Omar Antolín Camarena (https://github.com/oantolin) for + reporting.)  File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog @@ -1948,43 +1953,43 @@ Node: Links38855 Node: Tips39542 Node: Changelog39866 Node: 083-pre40732 -Node: 08240844 -Node: 08141241 -Node: 0841662 -Node: 07444386 -Node: 07344609 -Node: 07245341 -Node: 07146260 -Node: 0747069 -Node: 06349933 -Node: 06250466 -Node: 06150773 -Node: 0651343 -Node: 05254399 -Node: 05154701 -Node: 0555126 -Node: 04956657 -Node: 04856939 -Node: 04757288 -Node: 04657697 -Node: 04558105 -Node: 04458466 -Node: 04358825 -Node: 04259028 -Node: 04159189 -Node: 0459436 -Node: 03263537 -Node: 03163940 -Node: 0364137 -Node: 02367437 -Node: 02267671 -Node: 02167951 -Node: 0268156 -Node: 0172234 -Node: Notes72335 -Node: Comparison with Org Agenda searches72497 -Node: org-sidebar73386 -Node: License73665 +Node: 08241073 +Node: 08141470 +Node: 0841891 +Node: 07444615 +Node: 07344838 +Node: 07245570 +Node: 07146489 +Node: 0747298 +Node: 06350162 +Node: 06250695 +Node: 06151002 +Node: 0651572 +Node: 05254628 +Node: 05154930 +Node: 0555355 +Node: 04956886 +Node: 04857168 +Node: 04757517 +Node: 04657926 +Node: 04558334 +Node: 04458695 +Node: 04359054 +Node: 04259257 +Node: 04159418 +Node: 0459665 +Node: 03263766 +Node: 03164169 +Node: 0364366 +Node: 02367666 +Node: 02267900 +Node: 02168180 +Node: 0268385 +Node: 0172463 +Node: Notes72564 +Node: Comparison with Org Agenda searches72726 +Node: org-sidebar73615 +Node: License73894  End Tag Table From 7d8bd8b8847e4cf7a9fa04c7d4a4cbb2ae223e46 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:56:00 -0600 Subject: [PATCH 38/43] Release: v0.8.3 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 158 ++++++++++++++++++++++++++-------------------------- 3 files changed, 81 insertions(+), 81 deletions(-) diff --git a/README.org b/README.org index 52740c7..88daaf5 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ 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. -** 0.8.3-pre +** 0.8.3 *Fixes* diff --git a/org-ql.el b/org-ql.el index 98d0423..394cdcb 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.3-pre +;; Version: 0.8.3 ;; 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 diff --git a/org-ql.info b/org-ql.info index 174bbb1..aa16159 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.3-pre: 083-pre. +* 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1031,7 +1031,7 @@ releases. * Menu: -* 0.8.3-pre: 083-pre. +* 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1067,10 +1067,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 083-pre, Next: 082, Up: Changelog +File: README.info, Node: 083, Next: 082, Up: Changelog -5.1 0.8.3-pre -============= +5.1 0.8.3 +========= *Fixes* @@ -1080,7 +1080,7 @@ File: README.info, Node: 083-pre, Next: 082, Up: Changelog reporting.)  -File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog +File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog 5.2 0.8.2 ========= @@ -1917,79 +1917,79 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1901 -Node: Screenshots2024 -Node: Installation2142 -Node: Quelpa2656 -Node: Helm support3184 -Node: Usage3587 -Node: Commands3985 -Node: org-ql-find4450 -Node: org-ql-open-link5358 -Node: org-ql-refile6213 -Node: org-ql-search6541 -Node: helm-org-ql8472 -Node: org-ql-view8850 -Node: org-ql-view-sidebar9380 -Node: org-ql-view-recent-items9760 -Node: org-ql-sparse-tree10256 -Node: Queries11056 -Node: Non-sexp query syntax12173 -Node: General predicates13932 -Node: Ancestor/descendant predicates20857 -Node: Date/time predicates21985 -Node: Functions / Macros25109 -Node: Agenda-like views25407 -Ref: Function org-ql-block25569 -Node: Listing / acting-on results26830 -Ref: Caching27038 -Ref: Function org-ql-select27951 -Ref: Function org-ql-query30377 -Ref: Macro org-ql (deprecated)32151 -Node: Custom predicates32466 -Ref: Macro org-ql-defpred32690 -Node: Dynamic block36131 -Node: Links38855 -Node: Tips39542 -Node: Changelog39866 -Node: 083-pre40732 -Node: 08241073 -Node: 08141470 -Node: 0841891 -Node: 07444615 -Node: 07344838 -Node: 07245570 -Node: 07146489 -Node: 0747298 -Node: 06350162 -Node: 06250695 -Node: 06151002 -Node: 0651572 -Node: 05254628 -Node: 05154930 -Node: 0555355 -Node: 04956886 -Node: 04857168 -Node: 04757517 -Node: 04657926 -Node: 04558334 -Node: 04458695 -Node: 04359054 -Node: 04259257 -Node: 04159418 -Node: 0459665 -Node: 03263766 -Node: 03164169 -Node: 0364366 -Node: 02367666 -Node: 02267900 -Node: 02168180 -Node: 0268385 -Node: 0172463 -Node: Notes72564 -Node: Comparison with Org Agenda searches72726 -Node: org-sidebar73615 -Node: License73894 +Node: Contents1893 +Node: Screenshots2016 +Node: Installation2134 +Node: Quelpa2648 +Node: Helm support3176 +Node: Usage3579 +Node: Commands3977 +Node: org-ql-find4442 +Node: org-ql-open-link5350 +Node: org-ql-refile6205 +Node: org-ql-search6533 +Node: helm-org-ql8464 +Node: org-ql-view8842 +Node: org-ql-view-sidebar9372 +Node: org-ql-view-recent-items9752 +Node: org-ql-sparse-tree10248 +Node: Queries11048 +Node: Non-sexp query syntax12165 +Node: General predicates13924 +Node: Ancestor/descendant predicates20849 +Node: Date/time predicates21977 +Node: Functions / Macros25101 +Node: Agenda-like views25399 +Ref: Function org-ql-block25561 +Node: Listing / acting-on results26822 +Ref: Caching27030 +Ref: Function org-ql-select27943 +Ref: Function org-ql-query30369 +Ref: Macro org-ql (deprecated)32143 +Node: Custom predicates32458 +Ref: Macro org-ql-defpred32682 +Node: Dynamic block36123 +Node: Links38847 +Node: Tips39534 +Node: Changelog39858 +Node: 08340716 +Node: 08241045 +Node: 08141438 +Node: 0841859 +Node: 07444583 +Node: 07344806 +Node: 07245538 +Node: 07146457 +Node: 0747266 +Node: 06350130 +Node: 06250663 +Node: 06150970 +Node: 0651540 +Node: 05254596 +Node: 05154898 +Node: 0555323 +Node: 04956854 +Node: 04857136 +Node: 04757485 +Node: 04657894 +Node: 04558302 +Node: 04458663 +Node: 04359022 +Node: 04259225 +Node: 04159386 +Node: 0459633 +Node: 03263734 +Node: 03164137 +Node: 0364334 +Node: 02367634 +Node: 02267868 +Node: 02168148 +Node: 0268353 +Node: 0172431 +Node: Notes72532 +Node: Comparison with Org Agenda searches72694 +Node: org-sidebar73583 +Node: License73862  End Tag Table From 0168171a14cb55adf31c80c9155eaa8ab7967be5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 12 Jan 2024 23:58:41 -0600 Subject: [PATCH 39/43] Meta: v0.8.4-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 229 +++++++++++++++++++++++++++------------------------- 3 files changed, 125 insertions(+), 110 deletions(-) diff --git a/README.org b/README.org index 88daaf5..b8f2475 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ 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. +** 0.8.4-pre + +Nothing new yet. + ** 0.8.3 *Fixes* diff --git a/org-ql.el b/org-ql.el index 394cdcb..865c598 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.3 +;; Version: 0.8.4-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 diff --git a/org-ql.info b/org-ql.info index aa16159..10249a2 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.4-pre: 084-pre. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1031,6 +1032,7 @@ releases. * Menu: +* 0.8.4-pre: 084-pre. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1067,9 +1069,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 083, Next: 082, Up: Changelog +File: README.info, Node: 084-pre, Next: 083, Up: Changelog -5.1 0.8.3 +5.1 0.8.4-pre +============= + +Nothing new yet. + + +File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog + +5.2 0.8.3 ========= *Fixes* @@ -1082,7 +1092,7 @@ File: README.info, Node: 083, Next: 082, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.2 0.8.2 +5.3 0.8.2 ========= *Fixes* @@ -1096,7 +1106,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.3 0.8.1 +5.4 0.8.1 ========= *Fixes* @@ -1111,7 +1121,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.4 0.8 +5.5 0.8 ======= *Additions* @@ -1167,7 +1177,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.5 0.7.4 +5.6 0.7.4 ========= *Fixes* @@ -1177,7 +1187,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.6 0.7.3 +5.7 0.7.3 ========= *Fixes* @@ -1195,7 +1205,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.7 0.7.2 +5.8 0.7.2 ========= *Fixes* @@ -1216,7 +1226,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.8 0.7.1 +5.9 0.7.1 ========= *Fixes* @@ -1235,8 +1245,8 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.9 0.7 -======= +5.10 0.7 +======== *Added* • Command ‘org-ql-find’, which jumps to entries selected using @@ -1294,7 +1304,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.10 0.6.3 +5.11 0.6.3 ========== *Fixed* @@ -1310,7 +1320,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.11 0.6.2 +5.12 0.6.2 ========== *Fixed* @@ -1321,7 +1331,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.12 0.6.1 +5.13 0.6.1 ========== *Fixed* @@ -1339,7 +1349,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.13 0.6 +5.14 0.6 ======== *Added* @@ -1406,7 +1416,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.14 0.5.2 +5.15 0.5.2 ========== *Fixed* @@ -1417,7 +1427,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.15 0.5.1 +5.16 0.5.1 ========== *Fixed* @@ -1430,7 +1440,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.16 0.5 +5.17 0.5 ======== *Added* @@ -1471,7 +1481,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.17 0.4.9 +5.18 0.4.9 ========== *Fixed* @@ -1482,7 +1492,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.18 0.4.8 +5.19 0.4.8 ========== *Fixed* @@ -1494,7 +1504,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.19 0.4.7 +5.20 0.4.7 ========== *Fixed* @@ -1507,7 +1517,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.20 0.4.6 +5.21 0.4.6 ========== *Fixed* @@ -1520,7 +1530,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.21 0.4.5 +5.22 0.4.5 ========== *Fixed* @@ -1532,7 +1542,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.22 0.4.4 +5.23 0.4.4 ========== *Fixed* @@ -1544,7 +1554,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.23 0.4.3 +5.24 0.4.3 ========== *Fixed* @@ -1554,7 +1564,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.24 0.4.2 +5.25 0.4.2 ========== *Fixed* @@ -1563,7 +1573,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.25 0.4.1 +5.26 0.4.1 ========== *Fixed* @@ -1573,7 +1583,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.26 0.4 +5.27 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1654,7 +1664,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.27 0.3.2 +5.28 0.3.2 ========== *Fixed* @@ -1667,7 +1677,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.28 0.3.1 +5.29 0.3.1 ========== *Fixed* @@ -1677,7 +1687,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.29 0.3 +5.30 0.3 ======== *Added* @@ -1745,7 +1755,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.30 0.2.3 +5.31 0.2.3 ========== *Fixed* @@ -1755,7 +1765,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.31 0.2.2 +5.32 0.2.2 ========== *Fixed* @@ -1766,7 +1776,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.32 0.2.1 +5.33 0.2.1 ========== *Fixed* @@ -1776,7 +1786,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.33 0.2 +5.34 0.2 ======== *Added* @@ -1859,7 +1869,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.34 0.1 +5.35 0.1 ======== First tagged release. @@ -1917,79 +1927,80 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1893 -Node: Screenshots2016 -Node: Installation2134 -Node: Quelpa2648 -Node: Helm support3176 -Node: Usage3579 -Node: Commands3977 -Node: org-ql-find4442 -Node: org-ql-open-link5350 -Node: org-ql-refile6205 -Node: org-ql-search6533 -Node: helm-org-ql8464 -Node: org-ql-view8842 -Node: org-ql-view-sidebar9372 -Node: org-ql-view-recent-items9752 -Node: org-ql-sparse-tree10248 -Node: Queries11048 -Node: Non-sexp query syntax12165 -Node: General predicates13924 -Node: Ancestor/descendant predicates20849 -Node: Date/time predicates21977 -Node: Functions / Macros25101 -Node: Agenda-like views25399 -Ref: Function org-ql-block25561 -Node: Listing / acting-on results26822 -Ref: Caching27030 -Ref: Function org-ql-select27943 -Ref: Function org-ql-query30369 -Ref: Macro org-ql (deprecated)32143 -Node: Custom predicates32458 -Ref: Macro org-ql-defpred32682 -Node: Dynamic block36123 -Node: Links38847 -Node: Tips39534 -Node: Changelog39858 -Node: 08340716 -Node: 08241045 -Node: 08141438 -Node: 0841859 -Node: 07444583 -Node: 07344806 -Node: 07245538 -Node: 07146457 -Node: 0747266 -Node: 06350130 -Node: 06250663 -Node: 06150970 -Node: 0651540 -Node: 05254596 -Node: 05154898 -Node: 0555323 -Node: 04956854 -Node: 04857136 -Node: 04757485 -Node: 04657894 -Node: 04558302 -Node: 04458663 -Node: 04359022 -Node: 04259225 -Node: 04159386 -Node: 0459633 -Node: 03263734 -Node: 03164137 -Node: 0364334 -Node: 02367634 -Node: 02267868 -Node: 02168148 -Node: 0268353 -Node: 0172431 -Node: Notes72532 -Node: Comparison with Org Agenda searches72694 -Node: org-sidebar73583 -Node: License73862 +Node: Contents1915 +Node: Screenshots2038 +Node: Installation2156 +Node: Quelpa2670 +Node: Helm support3198 +Node: Usage3601 +Node: Commands3999 +Node: org-ql-find4464 +Node: org-ql-open-link5372 +Node: org-ql-refile6227 +Node: org-ql-search6555 +Node: helm-org-ql8486 +Node: org-ql-view8864 +Node: org-ql-view-sidebar9394 +Node: org-ql-view-recent-items9774 +Node: org-ql-sparse-tree10270 +Node: Queries11070 +Node: Non-sexp query syntax12187 +Node: General predicates13946 +Node: Ancestor/descendant predicates20871 +Node: Date/time predicates21999 +Node: Functions / Macros25123 +Node: Agenda-like views25421 +Ref: Function org-ql-block25583 +Node: Listing / acting-on results26844 +Ref: Caching27052 +Ref: Function org-ql-select27965 +Ref: Function org-ql-query30391 +Ref: Macro org-ql (deprecated)32165 +Node: Custom predicates32480 +Ref: Macro org-ql-defpred32704 +Node: Dynamic block36145 +Node: Links38869 +Node: Tips39556 +Node: Changelog39880 +Node: 084-pre40760 +Node: 08340872 +Node: 08241217 +Node: 08141610 +Node: 0842031 +Node: 07444755 +Node: 07344978 +Node: 07245710 +Node: 07146629 +Node: 0747438 +Node: 06350304 +Node: 06250837 +Node: 06151144 +Node: 0651714 +Node: 05254770 +Node: 05155072 +Node: 0555497 +Node: 04957028 +Node: 04857310 +Node: 04757659 +Node: 04658068 +Node: 04558476 +Node: 04458837 +Node: 04359196 +Node: 04259399 +Node: 04159560 +Node: 0459807 +Node: 03263908 +Node: 03164311 +Node: 0364508 +Node: 02367808 +Node: 02268042 +Node: 02168322 +Node: 0268527 +Node: 0172605 +Node: Notes72706 +Node: Comparison with Org Agenda searches72868 +Node: org-sidebar73757 +Node: License74036  End Tag Table From 34f8b75b35f6cf4d886385d3d0f8f965bef3db22 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:02:16 -0600 Subject: [PATCH 40/43] Fix: (org-ql-find) Go to base buffer if possible Use the base buffer if it has one, because if we run the search from an indirect buffer, it's likely already narrowed to a different entry, and making an indirect buffer from that one would end up with a restriction that would likely hide the selected entry. --- README.org | 4 ++- org-ql-find.el | 3 +- org-ql.info | 84 +++++++++++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 41 deletions(-) diff --git a/README.org b/README.org index b8f2475..d1c606e 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.4-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ goes to the selected entry in the base buffer (rather than potentially an indirect buffer, whose narrowing could leave the selected entry hidden. The nuances around going to entries in buffers that may be indirect and/or narrowed are surprisingly complicated. Hopefully this is the last fix). ** 0.8.3 diff --git a/org-ql-find.el b/org-ql-find.el index 591e958..f6f2b9c 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -75,7 +75,8 @@ single predicate)." :query-prefix query-prefix :query-filter query-filter :prompt prompt))) - (set-buffer (marker-buffer marker)) + (set-buffer (or (buffer-base-buffer (marker-buffer marker)) + (marker-buffer marker))) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (without-restriction (goto-char marker) diff --git a/org-ql.info b/org-ql.info index 10249a2..e501628 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1074,7 +1074,13 @@ File: README.info, Node: 084-pre, Next: 083, Up: Changelog 5.1 0.8.4-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ goes to the selected entry in the base buffer + (rather than potentially an indirect buffer, whose narrowing could + leave the selected entry hidden. The nuances around going to + entries in buffers that may be indirect and/or narrowed are + surprisingly complicated. Hopefully this is the last fix).  File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog @@ -1963,44 +1969,44 @@ Node: Links38869 Node: Tips39556 Node: Changelog39880 Node: 084-pre40760 -Node: 08340872 -Node: 08241217 -Node: 08141610 -Node: 0842031 -Node: 07444755 -Node: 07344978 -Node: 07245710 -Node: 07146629 -Node: 0747438 -Node: 06350304 -Node: 06250837 -Node: 06151144 -Node: 0651714 -Node: 05254770 -Node: 05155072 -Node: 0555497 -Node: 04957028 -Node: 04857310 -Node: 04757659 -Node: 04658068 -Node: 04558476 -Node: 04458837 -Node: 04359196 -Node: 04259399 -Node: 04159560 -Node: 0459807 -Node: 03263908 -Node: 03164311 -Node: 0364508 -Node: 02367808 -Node: 02268042 -Node: 02168322 -Node: 0268527 -Node: 0172605 -Node: Notes72706 -Node: Comparison with Org Agenda searches72868 -Node: org-sidebar73757 -Node: License74036 +Node: 08341212 +Node: 08241557 +Node: 08141950 +Node: 0842371 +Node: 07445095 +Node: 07345318 +Node: 07246050 +Node: 07146969 +Node: 0747778 +Node: 06350644 +Node: 06251177 +Node: 06151484 +Node: 0652054 +Node: 05255110 +Node: 05155412 +Node: 0555837 +Node: 04957368 +Node: 04857650 +Node: 04757999 +Node: 04658408 +Node: 04558816 +Node: 04459177 +Node: 04359536 +Node: 04259739 +Node: 04159900 +Node: 0460147 +Node: 03264248 +Node: 03164651 +Node: 0364848 +Node: 02368148 +Node: 02268382 +Node: 02168662 +Node: 0268867 +Node: 0172945 +Node: Notes73046 +Node: Comparison with Org Agenda searches73208 +Node: org-sidebar74097 +Node: License74376  End Tag Table From 9606aaf81230d1faf2c7f54925b45e527fa32bf0 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:03:28 -0600 Subject: [PATCH 41/43] Release: v0.8.4 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 160 ++++++++++++++++++++++++++-------------------------- 3 files changed, 82 insertions(+), 82 deletions(-) diff --git a/README.org b/README.org index d1c606e..9175943 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ 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. -** 0.8.4-pre +** 0.8.4 *Fixes* diff --git a/org-ql.el b/org-ql.el index 865c598..9f24c03 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.4-pre +;; Version: 0.8.4 ;; 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 diff --git a/org-ql.info b/org-ql.info index e501628..0ce52d0 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.4-pre: 084-pre. +* 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1032,7 +1032,7 @@ releases. * Menu: -* 0.8.4-pre: 084-pre. +* 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1069,10 +1069,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 084-pre, Next: 083, Up: Changelog +File: README.info, Node: 084, Next: 083, Up: Changelog -5.1 0.8.4-pre -============= +5.1 0.8.4 +========= *Fixes* @@ -1083,7 +1083,7 @@ File: README.info, Node: 084-pre, Next: 083, Up: Changelog surprisingly complicated. Hopefully this is the last fix).  -File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog +File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog 5.2 0.8.3 ========= @@ -1933,80 +1933,80 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1915 -Node: Screenshots2038 -Node: Installation2156 -Node: Quelpa2670 -Node: Helm support3198 -Node: Usage3601 -Node: Commands3999 -Node: org-ql-find4464 -Node: org-ql-open-link5372 -Node: org-ql-refile6227 -Node: org-ql-search6555 -Node: helm-org-ql8486 -Node: org-ql-view8864 -Node: org-ql-view-sidebar9394 -Node: org-ql-view-recent-items9774 -Node: org-ql-sparse-tree10270 -Node: Queries11070 -Node: Non-sexp query syntax12187 -Node: General predicates13946 -Node: Ancestor/descendant predicates20871 -Node: Date/time predicates21999 -Node: Functions / Macros25123 -Node: Agenda-like views25421 -Ref: Function org-ql-block25583 -Node: Listing / acting-on results26844 -Ref: Caching27052 -Ref: Function org-ql-select27965 -Ref: Function org-ql-query30391 -Ref: Macro org-ql (deprecated)32165 -Node: Custom predicates32480 -Ref: Macro org-ql-defpred32704 -Node: Dynamic block36145 -Node: Links38869 -Node: Tips39556 -Node: Changelog39880 -Node: 084-pre40760 -Node: 08341212 -Node: 08241557 -Node: 08141950 -Node: 0842371 -Node: 07445095 -Node: 07345318 -Node: 07246050 -Node: 07146969 -Node: 0747778 -Node: 06350644 -Node: 06251177 -Node: 06151484 -Node: 0652054 -Node: 05255110 -Node: 05155412 -Node: 0555837 -Node: 04957368 -Node: 04857650 -Node: 04757999 -Node: 04658408 -Node: 04558816 -Node: 04459177 -Node: 04359536 -Node: 04259739 -Node: 04159900 -Node: 0460147 -Node: 03264248 -Node: 03164651 -Node: 0364848 -Node: 02368148 -Node: 02268382 -Node: 02168662 -Node: 0268867 -Node: 0172945 -Node: Notes73046 -Node: Comparison with Org Agenda searches73208 -Node: org-sidebar74097 -Node: License74376 +Node: Contents1907 +Node: Screenshots2030 +Node: Installation2148 +Node: Quelpa2662 +Node: Helm support3190 +Node: Usage3593 +Node: Commands3991 +Node: org-ql-find4456 +Node: org-ql-open-link5364 +Node: org-ql-refile6219 +Node: org-ql-search6547 +Node: helm-org-ql8478 +Node: org-ql-view8856 +Node: org-ql-view-sidebar9386 +Node: org-ql-view-recent-items9766 +Node: org-ql-sparse-tree10262 +Node: Queries11062 +Node: Non-sexp query syntax12179 +Node: General predicates13938 +Node: Ancestor/descendant predicates20863 +Node: Date/time predicates21991 +Node: Functions / Macros25115 +Node: Agenda-like views25413 +Ref: Function org-ql-block25575 +Node: Listing / acting-on results26836 +Ref: Caching27044 +Ref: Function org-ql-select27957 +Ref: Function org-ql-query30383 +Ref: Macro org-ql (deprecated)32157 +Node: Custom predicates32472 +Ref: Macro org-ql-defpred32696 +Node: Dynamic block36137 +Node: Links38861 +Node: Tips39548 +Node: Changelog39872 +Node: 08440744 +Node: 08341184 +Node: 08241525 +Node: 08141918 +Node: 0842339 +Node: 07445063 +Node: 07345286 +Node: 07246018 +Node: 07146937 +Node: 0747746 +Node: 06350612 +Node: 06251145 +Node: 06151452 +Node: 0652022 +Node: 05255078 +Node: 05155380 +Node: 0555805 +Node: 04957336 +Node: 04857618 +Node: 04757967 +Node: 04658376 +Node: 04558784 +Node: 04459145 +Node: 04359504 +Node: 04259707 +Node: 04159868 +Node: 0460115 +Node: 03264216 +Node: 03164619 +Node: 0364816 +Node: 02368116 +Node: 02268350 +Node: 02168630 +Node: 0268835 +Node: 0172913 +Node: Notes73014 +Node: Comparison with Org Agenda searches73176 +Node: org-sidebar74065 +Node: License74344  End Tag Table From 9c63a458211c2b6214f352fdd80f2363a761d42e Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:47:35 -0600 Subject: [PATCH 42/43] Meta: Update makem.sh --- makem.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 14 deletions(-) diff --git a/makem.sh b/makem.sh index 82a2db0..c320e5d 100755 --- a/makem.sh +++ b/makem.sh @@ -3,7 +3,7 @@ # * makem.sh --- Script to aid building and testing Emacs Lisp packages # URL: https://github.com/alphapapa/makem.sh -# Version: 0.6-pre +# Version: 0.7 # * Commentary: @@ -112,6 +112,12 @@ Source files are automatically discovered from git, or may be specified with options. Package dependencies are discovered from "Package-Requires" headers in source files, from -pkg.el files, and 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 } @@ -177,6 +183,7 @@ function elisp-checkdoc-file { (setq makem-checkdoc-errors-p t) ;; Return nil because we *are* generating a buffered list of errors. nil)))) + (put 'ispell-buffer-session-localwords 'safe-local-variable #'list-of-strings-p) (mapcar #'checkdoc-file files) (when makem-checkdoc-errors-p (kill-emacs 1)))) @@ -379,6 +386,36 @@ function byte-compile-file { # ** 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 { # Echo list of directories to be used in load path. files-project-feature | dirnames @@ -387,7 +424,7 @@ function dirs-project { function files-project-elisp { # Echo list of Elisp files in project. - git ls-files 2>/dev/null \ + files-project 2>/dev/null \ | egrep "\.el$" \ | filter-files-exclude-default \ | filter-files-exclude-args @@ -396,13 +433,13 @@ function files-project-elisp { function files-project-feature { # Echo list of Elisp files that are not tests and provide a feature. files-project-elisp \ - | egrep -v "$test_files_regexp" \ + | grep -E -v "$test_files_regexp" \ | filter-files-feature } function files-project-test { # Echo list of Elisp test files. - files-project-elisp | egrep "$test_files_regexp" + files-project-elisp | grep -E "$test_files_regexp" } function dirnames { @@ -415,7 +452,7 @@ function dirnames { function filter-files-exclude-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 { @@ -441,7 +478,7 @@ function filter-files-feature { # Read paths on STDIN and echo ones that (provide 'a-feature). while read path do - egrep "^\\(provide '" "$path" &>/dev/null \ + grep -E "^\\(provide '" "$path" &>/dev/null \ && echo "$path" done } @@ -489,7 +526,7 @@ function ert-tests-p { function package-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 ]] then @@ -512,23 +549,23 @@ function dependencies { # 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. - egrep -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \ - | egrep -o '\([^([:space:]][^)]*\)' \ - | egrep -o '^[^[:space:])]+' \ + grep -E -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \ + | grep -E -o '\([^([:space:]][^)]*\)' \ + | grep -E -o '^[^[:space:])]+' \ | sed -r 's/\(//g' \ - | egrep -v '^emacs$' # Ignore Emacs version requirement. + | grep -E -v '^emacs$' # Ignore Emacs version requirement. # Search Cask file. if [[ -r Cask ]] then - egrep '\(depends-on "[^"]+"' Cask \ + grep -E '\(depends-on "[^"]+"' Cask \ | sed -r -e 's/\(depends-on "([^"]+)".*/\1/g' fi # Search -pkg.el file. - if [[ $(git ls-files ./*-pkg.el 2>/dev/null) ]] + if [[ $(files-project "*-pkg.el" 2>/dev/null) ]] 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 } @@ -581,6 +618,9 @@ function sandbox { local deps=($(dependencies)) 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[@]}" do args_sandbox_package_install+=(--eval "(package-install '$package)") @@ -1193,6 +1233,9 @@ paths_temp+=("$package_initialize_file") trap cleanup EXIT INT TERM +# Change to project root directory first. +cd "$(project-root)" + # Discover project files. files_project_feature=($(files-project-feature)) files_project_test=($(files-project-test)) From 8d3c93b8838bd5d5347dd8962b68cc3cabcf0147 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:47:47 -0600 Subject: [PATCH 43/43] 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. --- org-ql-completing-read.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 4db51e6..640033d 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -26,6 +26,8 @@ (require 'org-ql) +(declare-function org-ql-search "org-ql-search") + ;;;; Variables (defvar-keymap org-ql-completing-read-map