[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a71c519 068/135: Added docstrings to some finders
From: |
Ian Dunn |
Subject: |
[elpa] master a71c519 068/135: Added docstrings to some finders |
Date: |
Mon, 17 Feb 2020 10:52:54 -0500 (EST) |
branch: master
commit a71c5191bc316e4b420ddc4747825f32b0996241
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
Added docstrings to some finders
* org-edna.el (org-edna-finder/match):
(org-edna-finder/ids):
(org-edna-finder/ancestors):
(org-edna-finder/olp): Added docstrings from org-edna.org
---
org-edna.el | 53 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 45 insertions(+), 8 deletions(-)
diff --git a/org-edna.el b/org-edna.el
index 46046ab..883e92d 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -293,15 +293,23 @@ Remove Edna's workers from `org-trigger-hook' and
;; Tag Finder
(defun org-edna-finder/match (match-spec &optional scope skip)
- "Find entries with match-spec MATCH-SPEC.
+ "Find entries using Org matching.
MATCH-SPEC may be any valid match string; it is passed straight
-into `org-map-entries', with 'agenda as the scope.
+into `org-map-entries'.
-SCOPE and SKIP are their counterparts in `org-map-entries', but
-as strings.
+SCOPE and SKIP are their counterparts in `org-map-entries'.
+SCOPE defaults to agenda, and SKIP defaults to nil.
-SCOPE defaults to \"agenda\", and SKIP defaults to nil."
+#+BEGIN_SRC org
+,* TODO Test
+ :PROPERTIES:
+ :BLOCKER: match(\"test&mine\" agenda)
+ :END:
+#+END_SRC
+
+\"Test\" will block until all entries tagged \"test\" and
+\"mine\" in the agenda files are marked DONE."
(setq scope (or scope 'agenda))
(org-map-entries
;; Find all entries in the agenda files that match the given tag.
@@ -310,7 +318,7 @@ SCOPE defaults to \"agenda\", and SKIP defaults to nil."
;; ID finder
(defun org-edna-finder/ids (&rest ids)
- "Find entries with IDs in IDS.
+ "Find a list of headlines with given IDs.
IDS are all UUIDs as understood by `org-id-find'."
(mapcar (lambda (id) (org-id-find id 'marker)) ids))
@@ -395,14 +403,43 @@ IDS are all UUIDs as understood by `org-id-find'."
nil 'tree)))
(defun org-edna-finder/ancestors ()
+ "Find a list of ancestors.
+
+Example:
+
+#+BEGIN_SRC org
+,* TODO Heading 1
+,** TODO Heading 2
+,*** TODO Heading 3
+,**** TODO Heading 4
+,***** TODO Heading 5
+ :PROPERTIES:
+ :BLOCKER: ancestors
+ :END:
+#+END_SRC
+
+In the above example, Heading 5 will be blocked until Heading 1, Heading
+3, and Heading 4 are marked DONE, while Heading 2 is ignored."
(org-with-wide-buffer
(let ((markers))
(while (org-up-heading-safe)
(push (point-marker) markers))
(nreverse markers))))
-(defun org-edna-finder/olp (file path)
- (let ((marker (org-find-olp (cons file (split-string-and-unquote path
"/")))))
+(defun org-edna-finder/olp (file olp)
+ "Find a headline by its outline path.
+
+Finds the heading given by OLP in FILE. Both arguments are strings.
+
+#+BEGIN_SRC org
+,* TODO Test
+ :PROPERTIES:
+ :BLOCKER: olp(\"test.org\" \"path/to/heading\")
+ :END:
+#+END_SRC
+
+Test will block if the heading \"path/to/heading\" in \"test.org\" is not
DONE."
+ (let ((marker (org-find-olp (cons file (split-string-and-unquote olp "/")))))
(when (markerp marker)
(list marker))))
- [elpa] master bb3c739 044/135: Fixed license blocks in elisp files, (continued)
- [elpa] master bb3c739 044/135: Fixed license blocks in elisp files, Ian Dunn, 2020/02/17
- [elpa] master 3a3ed39 046/135: Various parsing fixes, Ian Dunn, 2020/02/17
- [elpa] master eda515d 039/135: Added check and local settings to Makefile, Ian Dunn, 2020/02/17
- [elpa] master f560f1b 056/135: Fixed error reporting, Ian Dunn, 2020/02/17
- [elpa] master 827d7c1 060/135: Fixed up chain test, Ian Dunn, 2020/02/17
- [elpa] master 89c2ecf 057/135: Added tests for conditions, Ian Dunn, 2020/02/17
- [elpa] master 03bafb0 061/135: Documented delete-property! action, Ian Dunn, 2020/02/17
- [elpa] master 4c26cc8 041/135: Added copyright and licensing information to all files, Ian Dunn, 2020/02/17
- [elpa] master 390ee68 067/135: Fixed ancestors example, Ian Dunn, 2020/02/17
- [elpa] master 3b3625f 064/135: Cleaned up package header and added various docstrings, Ian Dunn, 2020/02/17
- [elpa] master a71c519 068/135: Added docstrings to some finders,
Ian Dunn <=
- [elpa] master 3ff308b 055/135: Updated to new syntax, Ian Dunn, 2020/02/17
- [elpa] master 7618794 066/135: Added in-buffer settings and new sections to Documentation, Ian Dunn, 2020/02/17
- [elpa] master 9a6ba17 071/135: Fixed up documentation, Ian Dunn, 2020/02/17
- [elpa] master d493232 077/135: Added support for interactive editing of blockers and triggers, Ian Dunn, 2020/02/17
- [elpa] master 0aa0bf8 082/135: Don't present variables for keyword completion, Ian Dunn, 2020/02/17
- [elpa] master f265a6b 102/135: Fixed error reporting, Ian Dunn, 2020/02/17
- [elpa] master 9a38d60 050/135: Fixed chain-find and planning actions, Ian Dunn, 2020/02/17
- [elpa] master 836feb4 062/135: Fixed actions and documentation, Ian Dunn, 2020/02/17
- [elpa] master 24a0228 059/135: Added tests for actions, Ian Dunn, 2020/02/17
- [elpa] master 0b0cb67 063/135: Use org source blocks instead of example blocks in documentation, Ian Dunn, 2020/02/17