[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a9eb761 13/13: Merge commit '35acd8c2f9710e54ec3f433ae4af4
From: |
Ian Dunn |
Subject: |
[elpa] master a9eb761 13/13: Merge commit '35acd8c2f9710e54ec3f433ae4af40cfff635295' |
Date: |
Sun, 4 Feb 2018 12:32:36 -0500 (EST) |
branch: master
commit a9eb761b83817adb312defcbc55df44eef0e5970
Merge: f4d03a3 35acd8c
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Merge commit '35acd8c2f9710e54ec3f433ae4af40cfff635295'
---
packages/org-edna/.bzrignore | 3 +-
packages/org-edna/.elpaignore | 5 +
packages/org-edna/Makefile | 68 -------
packages/org-edna/Project.ede | 28 +++
packages/org-edna/defaults.mk | 2 +-
packages/org-edna/org-edna-tests.el | 52 ++++-
packages/org-edna/org-edna-tests.org | 5 +-
packages/org-edna/org-edna.el | 104 +++++++++-
packages/org-edna/org-edna.info | 366 ++++++++++++++++-------------------
packages/org-edna/org-edna.org | 115 ++++++++---
packages/org-edna/test.mk | 28 +++
11 files changed, 480 insertions(+), 296 deletions(-)
diff --git a/packages/org-edna/.bzrignore b/packages/org-edna/.bzrignore
index 5228a6a..bbb6def 100644
--- a/packages/org-edna/.bzrignore
+++ b/packages/org-edna/.bzrignore
@@ -2,4 +2,5 @@
local.mk
org-edna-autoloads.el
org-edna.texi
-org-edna.html
\ No newline at end of file
+org-edna.html
+.deps
\ No newline at end of file
diff --git a/packages/org-edna/.elpaignore b/packages/org-edna/.elpaignore
new file mode 100644
index 0000000..3ef4d79
--- /dev/null
+++ b/packages/org-edna/.elpaignore
@@ -0,0 +1,5 @@
+Project.ede
+Makefile
+test.mk
+org-edna-tests.el
+org-edna-tests.org
\ No newline at end of file
diff --git a/packages/org-edna/Makefile b/packages/org-edna/Makefile
deleted file mode 100644
index 765fe32..0000000
--- a/packages/org-edna/Makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-# This is part of org-edna
-#
-# Copyright (C) 2017 Ian Dunn.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Load defaults
-include defaults.mk
-
-# Load local definitions
-include local.mk
-
-EMACS=$(emacs) --batch -L $(org_path)
-ALLSRC=org-edna.el
-SOURCE=$(ALLSRC)
-TARGET=$(patsubst %.el,%.elc,$(SOURCE))
-
-.PHONY: clean check local.mk help
-
-all: $(TARGET)
-
-compile: $(TARGET)
-
-%.elc: %.el
- @$(EMACS) \
- -L "." \
- -f batch-byte-compile $<
-
-autoloads: org-edna-autoloads.el
-
-org-edna-autoloads.el:
- @$(EMACS) \
- --eval "(require 'package)" \
- --eval "(setq inhibit-message t)" \
- --eval "(package-generate-autoloads \"org-edna\" \"$$(pwd)\")"
-
-clean:
- -rm -f *.elc
-
-check: compile
- @$(EMACS) \
- -L "." \
- --load "ert" \
- --load "org-edna-tests.el" \
- -f ert-run-tests-batch-and-exit
-
-local.mk:
- @cp -n defaults.mk local.mk
-
-help:
- $(info )
- $(info make all - Default)
- $(info make compile - Compile Emacs Lisp Files)
- $(info make autoloads - Generate Autoloads)
- $(info make clean - Remove generated .elc files)
- $(info make check - Run Tests)
- @echo ""
diff --git a/packages/org-edna/Project.ede b/packages/org-edna/Project.ede
new file mode 100644
index 0000000..decef82
--- /dev/null
+++ b/packages/org-edna/Project.ede
@@ -0,0 +1,28 @@
+;; Object ede-proj-project
+;; EDE Project Files are auto generated: Do Not Edit
+(ede-proj-project "ede-proj-project"
+ :file "Project.ede"
+ :name "Org Edna"
+ :targets
+ (list
+ (ede-proj-target-elisp "ede-proj-target-elisp"
+ :name "compile"
+ :path ""
+ :source '("org-edna.el")
+ :aux-packages '("org"))
+ (ede-proj-target-makefile-miscelaneous
"ede-proj-target-makefile-miscelaneous"
+ :name "check"
+ :path ""
+ :source '("org-edna-tests.el" "org-edna-tests.org")
+ :partofall nil
+ :submakefile "test.mk")
+ (ede-proj-target-aux "ede-proj-target-aux"
+ :name "extra"
+ :path ""
+ :source '("org-edna.org" "COPYING" "dir" "org-edna.info" ".elpaignore"))
+ (ede-proj-target-elisp-autoloads "ede-proj-target-elisp-autoloads"
+ :name "autoloads"
+ :path ""
+ :source '("org-edna.el")
+ :autoload-file "org-edna-autoloads.el"))
+ :web-site-url "https://savannah.nongnu.org/projects/org-edna-el/")
diff --git a/packages/org-edna/defaults.mk b/packages/org-edna/defaults.mk
index aed4ab3..f599ee4 100644
--- a/packages/org-edna/defaults.mk
+++ b/packages/org-edna/defaults.mk
@@ -1,6 +1,6 @@
# This is part of org-edna
#
-# Copyright (C) 2017 Ian Dunn.
+# Copyright (C) 2017-2018 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/packages/org-edna/org-edna-tests.el
b/packages/org-edna/org-edna-tests.el
index 83c05a3..6ce4f64 100644
--- a/packages/org-edna/org-edna-tests.el
+++ b/packages/org-edna/org-edna-tests.el
@@ -1,6 +1,6 @@
;;; org-edna-tests.el --- Tests for org-edna
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
;; Author: Ian Dunn <address@hidden>
;; Keywords: convenience, text, org
@@ -1039,7 +1039,6 @@
(pairs '((cp . rm) (copy . remove) ("cp" . "rm") ("copy" .
"remove"))))
(org-with-point-at target
(dolist (pair pairs)
- ;; (message "Pair: %s" pair)
(org-edna-action/scheduled! source (car pair))
(should (string-equal (org-entry-get nil "SCHEDULED")
"<2000-01-15 Sat 00:00>"))
@@ -1179,6 +1178,55 @@
(org-edna-action/delete-property! nil "TEST")
(should-not (org-entry-get nil "TEST")))))
+(ert-deftest org-edna-action-property/inc-dec ()
+ (let ((pom (org-edna-find-test-heading org-edna-test-id-heading-one)))
+ (org-with-point-at pom
+ (org-edna-action/set-property! nil "TEST" "1")
+ (should (equal (org-entry-get nil "TEST") "1"))
+ (org-edna-action/set-property! nil "TEST" 'inc)
+ (should (equal (org-entry-get nil "TEST") "2"))
+ (org-edna-action/set-property! nil "TEST" 'dec)
+ (should (equal (org-entry-get nil "TEST") "1"))
+ (org-edna-action/delete-property! nil "TEST")
+ (should-not (org-entry-get nil "TEST"))
+ (should-error (org-edna-action/set-property! nil "TEST" 'inc))
+ (should-error (org-edna-action/set-property! nil "TEST" 'dec))
+ (org-edna-action/set-property! nil "TEST" "a")
+ (should (equal (org-entry-get nil "TEST") "a"))
+ (should-error (org-edna-action/set-property! nil "TEST" 'inc))
+ (should-error (org-edna-action/set-property! nil "TEST" 'dec))
+ (org-edna-action/delete-property! nil "TEST")
+ (should-not (org-entry-get nil "TEST")))))
+
+(ert-deftest org-edna-action-property/next-prev ()
+ (let ((pom (org-edna-find-test-heading org-edna-test-id-heading-one)))
+ (org-with-point-at pom
+ (org-edna-action/set-property! nil "TEST" "a")
+ (should (equal (org-entry-get nil "TEST") "a"))
+ (should-error (org-edna-action/set-property! nil "TEST" 'next))
+ (should-error (org-edna-action/set-property! nil "TEST" 'prev))
+ (should-error (org-edna-action/set-property! nil "TEST" 'previous))
+ (org-edna-action/delete-property! nil "TEST")
+ (should-not (org-entry-get nil "TEST"))
+ ;; Test moving forwards
+ (org-edna-action/set-property! nil "COUNTER" "a")
+ (should (equal (org-entry-get nil "COUNTER") "a"))
+ (org-edna-action/set-property! nil "COUNTER" 'next)
+ (should (equal (org-entry-get nil "COUNTER") "b"))
+ ;; Test moving forwards past the last one
+ (org-edna-action/set-property! nil "COUNTER" "d")
+ (should (equal (org-entry-get nil "COUNTER") "d"))
+ (org-edna-action/set-property! nil "COUNTER" 'next)
+ (should (equal (org-entry-get nil "COUNTER") "a"))
+ ;; Test moving backwards past the first one
+ (org-edna-action/set-property! nil "COUNTER" 'prev)
+ (should (equal (org-entry-get nil "COUNTER") "d"))
+ ;; Test moving backwards normally
+ (org-edna-action/set-property! nil "COUNTER" 'previous)
+ (should (equal (org-entry-get nil "COUNTER") "c"))
+ (org-edna-action/delete-property! nil "COUNTER")
+ (should-not (org-entry-get nil "COUNTER")))))
+
(ert-deftest org-edna-action-clock ()
(let ((pom (org-edna-find-test-heading org-edna-test-id-heading-one)))
(org-with-point-at pom
diff --git a/packages/org-edna/org-edna-tests.org
b/packages/org-edna/org-edna-tests.org
index 01c0dcc..5e20614 100644
--- a/packages/org-edna/org-edna-tests.org
+++ b/packages/org-edna/org-edna-tests.org
@@ -1,8 +1,9 @@
#+STARTUP: nologdone
-#+PROPERTY: EFFORT_ALL 0:01 0:02 0:03
+#+PROPERTY: Effort_ALL 0:01 0:02 0:03
+#+PROPERTY: COUNTER_ALL a b c d
* COMMENT Copying
-Copyright (C) 2017 Ian Dunn
+Copyright (C) 2017-2018 Free Software Foundation, Inc.
#+BEGIN_QUOTE
This program is free software: you can redistribute it and/or modify
diff --git a/packages/org-edna/org-edna.el b/packages/org-edna/org-edna.el
index b071b38..cfd6d16 100644
--- a/packages/org-edna/org-edna.el
+++ b/packages/org-edna/org-edna.el
@@ -1,13 +1,13 @@
;;; org-edna.el --- Extensible Dependencies 'N' Actions -*- lexical-binding:
t; -*-
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
;; Author: Ian Dunn <address@hidden>
;; Maintainer: Ian Dunn <address@hidden>
;; Keywords: convenience, text, org
;; URL: https://savannah.nongnu.org/projects/org-edna-el/
;; Package-Requires: ((emacs "25.1") (seq "2.19") (org "9.0.5"))
-;; Version: 1.0beta4
+;; Version: 1.0beta5
;; This file is part of GNU Emacs.
@@ -1551,6 +1551,39 @@ Edna Syntax: tag!(\"TAGS\")
TAGS is a valid tag specification, such as \":aa:bb:cc:\"."
(org-set-tags-to tags))
+(defun org-edna--string-is-numeric-p (string)
+ "Return non-nil if STRING is a valid numeric string.
+
+Examples of valid numeric strings are \"1\", \"-3\", or \"123\"."
+ ;; Can't use string-to-number, because it returns 0 if STRING isn't a
+ ;; number, which is ambiguous.
+ (numberp (car (read-from-string string))))
+
+(defun org-edna--increment-numeric-property (pom property &optional decrement)
+ "Return the incremented value of PROPERTY at POM.
+
+If optional argument DECREMENT is non-nil, decrement the property
+value instead."
+ (let* ((prop-value (org-entry-get pom property)))
+ (unless prop-value
+ (error "Attempted to increment/decrement unset property %s" property))
+ (unless (org-edna--string-is-numeric-p prop-value)
+ (error "Property %s doesn't have a numeric value (got %s)" property
prop-value))
+ (number-to-string (+ (if decrement -1 1) (string-to-number prop-value)))))
+
+(defun org-edna--cycle-property (pom property &optional previous)
+ "Cycle the property PROPERTY at POM through its allowed values.
+
+Change PROPERTY to the next allowed value, unless PREVIOUS is
+non-nil, in which case, cycle to the previous allowed value."
+ (let* ((prop-value (org-entry-get pom property)))
+ (unless prop-value
+ (error "Attempted to cycle an unset property %s" property))
+ (save-excursion
+ ;; Jump to the property line, (required for
`org-property-next-allowed-value')
+ (re-search-forward (org-re-property property nil nil prop-value))
+ (org-property-next-allowed-value previous))))
+
(defun org-edna-action/set-property! (_last-entry property value)
"Action to set the property PROPERTY of a target heading to VALUE.
@@ -1558,7 +1591,15 @@ Edna Syntax: set-property!(\"PROPERTY\" \"VALUE\")
PROPERTY and VALUE are both strings. PROPERTY must be a valid
org mode property."
- (org-entry-put nil property value))
+ (pcase value
+ ((pred stringp)
+ (org-entry-put (point) property value))
+ ((or `inc `dec)
+ (let* ((new-value (org-edna--increment-numeric-property (point) property
+ (eq value 'dec))))
+ (org-entry-put (point) property new-value)))
+ ((or `next `prev `previous)
+ (org-edna--cycle-property (point) property (memq value '(prev
previous))))))
(defun org-edna-action/delete-property! (_last-entry property)
"Action to delete a property from a target heading.
@@ -1607,6 +1648,59 @@ Form 4: Set the target's priority to the character P."
(string-to-char priority-action)
priority-action)))
+(defun org-edna-set-effort (value increment)
+ "Set the effort property of the current entry.
+With numerical prefix arg, use the nth allowed value, 0 stands for the
+10th allowed value.
+
+When INCREMENT is non-nil, set the property to the next allowed value."
+ ;; NOTE: Copied from `org-set-effort', because the signature changed in
9.1.7.
+ ;; Since the Org repo doesn't change its version string until after a
release,
+ ;; there's no way to tell when to use the old or new signature until after
+ ;; 9.1.7 is released. Therefore, we cut out the middle man and slap the
+ ;; entire function here.
+ (interactive "P")
+ (when (equal value 0) (setq value 10))
+ (let* ((completion-ignore-case t)
+ (prop org-effort-property)
+ (cur (org-entry-get nil prop))
+ (allowed (org-property-get-allowed-values nil prop 'table))
+ (existing (mapcar 'list (org-property-values prop)))
+ rpl
+ (val (cond
+ ((stringp value) value)
+ ((and allowed (integerp value))
+ (or (car (nth (1- value) allowed))
+ (car (org-last allowed))))
+ ((and allowed increment)
+ (or (cl-caadr (member (list cur) allowed))
+ (user-error "Allowed effort values are not set")))
+ (allowed
+ (message "Select 1-9,0, [RET%s]: %s"
+ (if cur (concat "=" cur) "")
+ (mapconcat 'car allowed " "))
+ (setq rpl (read-char-exclusive))
+ (if (equal rpl ?\r)
+ cur
+ (setq rpl (- rpl ?0))
+ (when (equal rpl 0) (setq rpl 10))
+ (if (and (> rpl 0) (<= rpl (length allowed)))
+ (car (nth (1- rpl) allowed))
+ (org-completing-read "Effort: " allowed nil))))
+ (t
+ (org-completing-read
+ (concat "Effort" (and cur (string-match "\\S-" cur)
+ (concat " [" cur "]"))
+ ": ")
+ existing nil nil "" nil cur)))))
+ (unless (equal (org-entry-get nil prop) val)
+ (org-entry-put nil prop val))
+ (org-refresh-property
+ '((effort . identity)
+ (effort-minutes . org-duration-to-minutes))
+ val)
+ (message "%s is now %s" prop val)))
+
(defun org-edna-action/set-effort! (_last-entry value)
"Action to set the effort of a target heading.
@@ -1619,8 +1713,8 @@ the raw value for the effort.
For form 2, increment the effort to the next allowed value."
(if (eq value 'increment)
- (org-set-effort nil value)
- (org-set-effort value nil)))
+ (org-edna-set-effort nil value)
+ (org-edna-set-effort value nil)))
(defun org-edna-action/archive! (_last-entry)
"Action to archive a target heading.
diff --git a/packages/org-edna/org-edna.info b/packages/org-edna/org-edna.info
index 5a7db99..184755b 100644
--- a/packages/org-edna/org-edna.info
+++ b/packages/org-edna/org-edna.info
@@ -95,9 +95,9 @@ Conditions
Extending Edna
* Naming Conventions:: How to name new functions
-* Finders: Finders (1). Making a new finder
-* Actions: Actions (1). Making a new action
-* Conditions: Conditions (1). Making a new condition
+* Finders: Finders 1. Making a new finder
+* Actions: Actions 1. Making a new action
+* Conditions: Conditions 1. Making a new condition
Contributing
@@ -107,32 +107,11 @@ Contributing
Changelog
+* 1.0beta5: 10beta5.
* 1.0beta4: 10beta4.
* 1.0beta3: 10beta3.
* 1.0beta2: 10beta2.
-1.0beta4
-
-* Fixed multiple forms getting incorrect targets::
-* Fixed multiple forms not evaluating::
-
-
-1.0beta3
-
-* Conditional Forms: Conditional Forms (1).
-* Overhauled Internal Parsing::
-* Fixed consideration keywords::
-* Added 'any consideration::
-
-
-1.0beta2
-
-* Added interactive keyword editor with completion::
-* New uses of schedule! and deadline!::
-* New ``relatives'' finder::
-* New finders::
-
-
File: org-edna.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top
@@ -140,7 +119,7 @@ File: org-edna.info, Node: Copying, Next: Introduction,
Prev: Top, Up: Top
Copying
*******
-Copyright (C) 2017 Free Software Foundation, Inc.
+Copyright (C) 2017-2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -953,13 +932,69 @@ Property
--------
• Syntax: set-property!(“PROPERTY” “VALUE”)
+ • Syntax: set-property!(“PROPERTY” inc)
+ • Syntax: set-property!(“PROPERTY” dec)
+ • Syntax: set-property!(“PROPERTY” next)
+ • Syntax: set-property!(“PROPERTY” prev)
+ • Syntax: set-property!(“PROPERTY” previous)
+
+ The first form sets the property PROPERTY on all targets to VALUE.
+
+ If VALUE is a symbol, it is interpreted as follows:
+
+inc
+ Increment a numeric property value by one
+dec
+ Decrement a numeric property value by one
+
+ If either ‘inc’ or ‘dec’ attempt to modify a non-numeric property
+value, Edna will fail with an error message.
+
+next
+ Cycle the property through to the next allowed property value
+previous
+ Cycle the property through to the previous allowed property value
+
+ The symbol ‘prev’ may be used as an abbreviation for ‘previous’.
+Similar to ‘inc’ and ‘dec’, any of these will fail if there are no
+defined properties. When reaching the end of the list of allowed
+properties, ‘next’ will cycle back to the beginning.
- Sets the property PROPERTY on all targets to VALUE.
+ Example:
+
+ #+PROPERTY: TEST_ALL a b c d
+
+ * TODO Test Heading
+ :PROPERTIES:
+ :TEST: d
+ :TRIGGER: self set-property!("TEST" next)
+ :END:
+
+ When “Test Heading” is set to DONE, its TEST property will change to
+“a”. This also works with ‘previous’, but in the opposite direction.
+
+ Additionally, all special forms will fail if the property is not
+already set:
+
+ * TODO Test
+ :PROPERTIES:
+ :TRIGGER: self set-property("TEST" inc)
+ :END:
+
+ In the above example, if “Test” is set to DONE, Edna will fail to
+increment the TEST property, since it doesn’t exist.
• Syntax: delete-property!(“PROPERTY”)
Deletes the property PROPERTY from all targets.
+ Examples:
+
+ • set-property!(“COUNTER” “1”) -> Sets the property COUNTER to 1 on
+ all targets
+ • set-property!(“COUNTER” inc) -> Increments the property COUNTER by
+ 1. Following the previous example, it would be 2.
+
File: org-edna.info, Node: Priority, Next: Tag, Prev: Property, Up: Actions
@@ -1302,12 +1337,12 @@ org-edna-TYPE/KEYWORD.
* Menu:
* Naming Conventions:: How to name new functions
-* Finders: Finders (1). Making a new finder
-* Actions: Actions (1). Making a new action
-* Conditions: Conditions (1). Making a new condition
+* Finders: Finders 1. Making a new finder
+* Actions: Actions 1. Making a new action
+* Conditions: Conditions 1. Making a new condition
-File: org-edna.info, Node: Naming Conventions, Next: Finders (1), Up:
Extending Edna
+File: org-edna.info, Node: Naming Conventions, Next: Finders 1, Up:
Extending Edna
Naming Conventions
==================
@@ -1321,7 +1356,7 @@ predicates with ’?’.
finds a file.
-File: org-edna.info, Node: Finders (1), Next: Actions (1), Prev: Naming
Conventions, Up: Extending Edna
+File: org-edna.info, Node: Finders 1, Next: Actions 1, Prev: Naming
Conventions, Up: Extending Edna
Finders
=======
@@ -1335,7 +1370,7 @@ Finders have the form org-edna-finder/KEYWORD, like so:
or nil if no targets were found.
-File: org-edna.info, Node: Actions (1), Next: Conditions (1), Prev: Finders
(1), Up: Extending Edna
+File: org-edna.info, Node: Actions 1, Next: Conditions 1, Prev: Finders 1,
Up: Extending Edna
Actions
=======
@@ -1352,7 +1387,7 @@ target).
The rest of the arguments are the arguments specified in the form.
-File: org-edna.info, Node: Conditions (1), Prev: Actions (1), Up: Extending
Edna
+File: org-edna.info, Node: Conditions 1, Prev: Actions 1, Up: Extending Edna
Conditions
==========
@@ -1475,34 +1510,37 @@ Changelog
* Menu:
+* 1.0beta5: 10beta5.
* 1.0beta4: 10beta4.
* 1.0beta3: 10beta3.
* 1.0beta2: 10beta2.
-File: org-edna.info, Node: 10beta4, Next: 10beta3, Up: Changelog
+File: org-edna.info, Node: 10beta5, Next: 10beta4, Up: Changelog
-1.0beta4
+1.0beta5
========
-Just some bug fixes from the new form parsing.
+Some new forms and a new build system.
-* Menu:
+ • Added new forms to set-property!
+ • Now allows ’inc, ’dec, ’previous, and ’next as values
+
+ • Changed build system to EDE to properly handle dependencies
-* Fixed multiple forms getting incorrect targets::
-* Fixed multiple forms not evaluating::
+ • Fixed compatibility with new Org effort functions
-File: org-edna.info, Node: Fixed multiple forms getting incorrect targets,
Next: Fixed multiple forms not evaluating, Up: 10beta4
+File: org-edna.info, Node: 10beta4, Next: 10beta3, Prev: 10beta5, Up:
Changelog
-Fixed multiple forms getting incorrect targets
-----------------------------------------------
+1.0beta4
+========
-
-File: org-edna.info, Node: Fixed multiple forms not evaluating, Prev: Fixed
multiple forms getting incorrect targets, Up: 10beta4
+Just some bug fixes from the new form parsing.
+
+ • Fixed multiple forms getting incorrect targets
-Fixed multiple forms not evaluating
------------------------------------
+ • Fixed multiple forms not evaluating
File: org-edna.info, Node: 10beta3, Next: 10beta2, Prev: 10beta4, Up:
Changelog
@@ -1512,42 +1550,17 @@ File: org-edna.info, Node: 10beta3, Next: 10beta2,
Prev: 10beta4, Up: Change
HUGE addition here
-* Menu:
-
-* Conditional Forms: Conditional Forms (1).
-* Overhauled Internal Parsing::
-* Fixed consideration keywords::
-* Added 'any consideration::
-
-
-File: org-edna.info, Node: Conditional Forms (1), Next: Overhauled Internal
Parsing, Up: 10beta3
-
-Conditional Forms
------------------
+ • Conditional Forms
+ • See *note Conditional Forms:: for more information
- • See *note Conditional Forms:: for more information
-
-
-File: org-edna.info, Node: Overhauled Internal Parsing, Next: Fixed
consideration keywords, Prev: Conditional Forms (1), Up: 10beta3
+ • Overhauled Internal Parsing
-Overhauled Internal Parsing
----------------------------
-
-
-File: org-edna.info, Node: Fixed consideration keywords, Next: Added 'any
consideration, Prev: Overhauled Internal Parsing, Up: 10beta3
-
-Fixed consideration keywords
-----------------------------
+ • Fixed consideration keywords
• Both consider and consideration are accepted now
-
-File: org-edna.info, Node: Added 'any consideration, Prev: Fixed
consideration keywords, Up: 10beta3
-
-Added ’any consideration
-------------------------
-
- • Allows passage if just one target is fulfilled
+ • Added ’any consideration
+ • Allows passage if just one target is fulfilled
File: org-edna.info, Node: 10beta2, Prev: 10beta3, Up: Changelog
@@ -1557,130 +1570,95 @@ File: org-edna.info, Node: 10beta2, Prev: 10beta3,
Up: Changelog
Big release here, with three new features.
-* Menu:
-
-* Added interactive keyword editor with completion::
-* New uses of schedule! and deadline!::
-* New ``relatives'' finder::
-* New finders::
-
-
-File: org-edna.info, Node: Added interactive keyword editor with completion,
Next: New uses of schedule! and deadline!, Up: 10beta2
-
-Added interactive keyword editor with completion
-------------------------------------------------
-
- • See *note Setting the Properties:: for how to do that
-
-
-File: org-edna.info, Node: New uses of schedule! and deadline!, Next: New
``relatives'' finder, Prev: Added interactive keyword editor with completion,
Up: 10beta2
-
-New uses of schedule! and deadline!
------------------------------------
-
- • New “float” form that mimics diary-float
- • New “landing” addition to “+1d” and friends to force planning
- changes to land on a certain day or type of day (weekend/weekday)
- • See *note Scheduled/Deadline:: for details
-
-
-File: org-edna.info, Node: New ``relatives'' finder, Next: New finders,
Prev: New uses of schedule! and deadline!, Up: 10beta2
+ • Added interactive keyword editor with completion
+ • See *note Setting the Properties:: for how to do that
-New “relatives” finder
-----------------------
+ • New uses of schedule! and deadline!
+ • New “float” form that mimics diary-float
+ • New “landing” addition to “+1d” and friends to force planning
+ changes to land on a certain day or type of day
+ (weekend/weekday)
+ • See *note Scheduled/Deadline:: for details
- • Renamed from chain-find with tons of new keywords
- • Modified all other relative finders (previous-sibling, first-child,
- etc.) to use the same keywords
- • See *note relatives:: for details
-
-
-File: org-edna.info, Node: New finders, Prev: New ``relatives'' finder, Up:
10beta2
-
-New finders
------------
+ • New “relatives” finder
+ • Renamed from chain-find with tons of new keywords
+ • Modified all other relative finders (previous-sibling,
+ first-child, etc.) to use the same keywords
+ • See *note relatives:: for details
- • *note previous-sibling-wrap::
- • *note rest-of-siblings-wrap::
+ • New finders
+ • *note previous-sibling-wrap::
+ • *note rest-of-siblings-wrap::
Tag Table:
Node: Top225
-Node: Copying4054
-Node: Introduction4871
-Node: Installation and Setup5819
-Node: Basic Operation6612
-Node: Blockers8463
-Node: Triggers8749
-Node: Syntax9011
-Node: Basic Features9701
-Node: Finders10004
-Node: ancestors11769
-Node: children12363
-Node: descendants12773
-Node: file13295
-Node: first-child14044
-Node: ids14304
-Node: match14965
-Node: next-sibling15603
-Node: next-sibling-wrap15860
-Node: olp16174
-Node: org-file16586
-Node: parent17231
-Node: previous-sibling17429
-Node: previous-sibling-wrap17690
-Node: relatives17969
-Node: rest-of-siblings21590
-Node: rest-of-siblings-wrap21875
-Node: self22224
-Node: siblings22385
-Node: siblings-wrap22622
-Node: Actions22926
-Node: Scheduled/Deadline23668
-Node: TODO State27243
-Node: Archive27611
-Node: Chain Property27931
-Node: Clocking28214
-Node: Property28626
-Node: Priority28948
-Node: Tag29517
-Node: Effort29734
-Node: Advanced Features30123
-Node: Conditions30507
-Node: done31122
-Node: headings31286
-Node: todo-state31662
-Node: variable-set31918
-Node: has-property32347
-Node: re-search32616
-Node: Negating Conditions32976
-Node: Consideration33363
-Node: Conditional Forms34932
-Node: Setting the Properties37588
-Node: Extending Edna38672
-Node: Naming Conventions39162
-Node: Finders (1)39625
-Node: Actions (1)39991
-Node: Conditions (1)40456
-Node: Contributing41346
-Node: Bugs41897
-Node: Development42249
-Node: Documentation43402
-Node: Changelog43847
-Node: 10beta444013
-Node: Fixed multiple forms getting incorrect targets44252
-Node: Fixed multiple forms not evaluating44483
-Node: 10beta344692
-Node: Conditional Forms (1)44966
-Node: Overhauled Internal Parsing45165
-Node: Fixed consideration keywords45362
-Node: Added 'any consideration45621
-Node: 10beta245836
-Node: Added interactive keyword editor with completion46118
-Node: New uses of schedule! and deadline!46417
-Node: New ``relatives'' finder46912
-Node: New finders47308
+Node: Copying3672
+Node: Introduction4494
+Node: Installation and Setup5442
+Node: Basic Operation6235
+Node: Blockers8086
+Node: Triggers8372
+Node: Syntax8634
+Node: Basic Features9324
+Node: Finders9627
+Node: ancestors11392
+Node: children11986
+Node: descendants12396
+Node: file12918
+Node: first-child13667
+Node: ids13927
+Node: match14588
+Node: next-sibling15226
+Node: next-sibling-wrap15483
+Node: olp15797
+Node: org-file16209
+Node: parent16854
+Node: previous-sibling17052
+Node: previous-sibling-wrap17313
+Node: relatives17592
+Node: rest-of-siblings21213
+Node: rest-of-siblings-wrap21498
+Node: self21847
+Node: siblings22008
+Node: siblings-wrap22245
+Node: Actions22549
+Node: Scheduled/Deadline23291
+Node: TODO State26866
+Node: Archive27234
+Node: Chain Property27554
+Node: Clocking27837
+Node: Property28249
+Node: Priority30436
+Node: Tag31005
+Node: Effort31222
+Node: Advanced Features31611
+Node: Conditions31995
+Node: done32610
+Node: headings32774
+Node: todo-state33150
+Node: variable-set33406
+Node: has-property33835
+Node: re-search34104
+Node: Negating Conditions34464
+Node: Consideration34851
+Node: Conditional Forms36420
+Node: Setting the Properties39076
+Node: Extending Edna40160
+Node: Naming Conventions40650
+Node: Finders 141111
+Node: Actions 141473
+Node: Conditions 141932
+Node: Contributing42818
+Node: Bugs43369
+Node: Development43721
+Node: Documentation44874
+Node: Changelog45319
+Node: 10beta545506
+Node: 10beta445877
+Node: 10beta346130
+Node: 10beta246569
End Tag Table
diff --git a/packages/org-edna/org-edna.org b/packages/org-edna/org-edna.org
index cb59d06..936ce84 100644
--- a/packages/org-edna/org-edna.org
+++ b/packages/org-edna/org-edna.org
@@ -14,7 +14,7 @@
#+TEXINFO_DIR_DESC: Extensible Dependencies 'N' Actions for Org Mode tasks
* Copying
-Copyright (C) 2017 Free Software Foundation, Inc.
+Copyright (C) 2017-2018 Free Software Foundation, Inc.
#+BEGIN_QUOTE
This program is free software: you can redistribute it and/or modify
@@ -761,13 +761,66 @@ clock, if any.
:END:
- Syntax: set-property!("PROPERTY" "VALUE")
+- Syntax: set-property!("PROPERTY" inc)
+- Syntax: set-property!("PROPERTY" dec)
+- Syntax: set-property!("PROPERTY" next)
+- Syntax: set-property!("PROPERTY" prev)
+- Syntax: set-property!("PROPERTY" previous)
-Sets the property PROPERTY on all targets to VALUE.
+The first form sets the property PROPERTY on all targets to VALUE.
+
+If VALUE is a symbol, it is interpreted as follows:
+
+- inc :: Increment a numeric property value by one
+- dec :: Decrement a numeric property value by one
+
+If either ~inc~ or ~dec~ attempt to modify a non-numeric property value, Edna
will
+fail with an error message.
+
+- next :: Cycle the property through to the next allowed property value
+- previous :: Cycle the property through to the previous allowed property value
+
+The symbol ~prev~ may be used as an abbreviation for ~previous~. Similar to
+~inc~ and ~dec~, any of these will fail if there are no defined properties.
+When reaching the end of the list of allowed properties, ~next~ will cycle back
+to the beginning.
+
+Example:
+
+#+begin_src org
+,#+PROPERTY: TEST_ALL a b c d
+
+,* TODO Test Heading
+ :PROPERTIES:
+ :TEST: d
+ :TRIGGER: self set-property!("TEST" next)
+ :END:
+#+end_src
+
+When "Test Heading" is set to DONE, its TEST property will change to "a". This
+also works with ~previous~, but in the opposite direction.
+
+Additionally, all special forms will fail if the property is not already set:
+
+#+begin_src org
+,* TODO Test
+ :PROPERTIES:
+ :TRIGGER: self set-property("TEST" inc)
+ :END:
+#+end_src
+
+In the above example, if "Test" is set to DONE, Edna will fail to increment the
+TEST property, since it doesn't exist.
- Syntax: delete-property!("PROPERTY")
Deletes the property PROPERTY from all targets.
+Examples:
+
+- set-property!("COUNTER" "1") -> Sets the property COUNTER to 1 on all targets
+- set-property!("COUNTER" inc) -> Increments the property COUNTER by 1.
Following the previous example, it would be 2.
+
*** Priority
:PROPERTIES:
:CUSTOM_ID: priorities
@@ -1238,35 +1291,51 @@ making any changes:
:PROPERTIES:
:DESCRIPTION: List of changes by version
:END:
+** 1.0beta5
+Some new forms and a new build system.
+
+- Added new forms to set-property!
+ - Now allows 'inc, 'dec, 'previous, and 'next as values
+
+- Changed build system to EDE to properly handle dependencies
+
+- Fixed compatibility with new Org effort functions
** 1.0beta4
Just some bug fixes from the new form parsing.
-*** Fixed multiple forms getting incorrect targets
-*** Fixed multiple forms not evaluating
+
+- Fixed multiple forms getting incorrect targets
+
+- Fixed multiple forms not evaluating
** 1.0beta3
HUGE addition here
-*** Conditional Forms
-- See [[#conditional_forms][Conditional Forms]] for more information
-*** Overhauled Internal Parsing
-*** Fixed consideration keywords
+
+- Conditional Forms
+ - See [[#conditional_forms][Conditional Forms]] for more information
+
+- Overhauled Internal Parsing
+
+- Fixed consideration keywords
+
- Both consider and consideration are accepted now
-*** Added 'any consideration
-- Allows passage if just one target is fulfilled
+
+- Added 'any consideration
+ - Allows passage if just one target is fulfilled
** 1.0beta2
Big release here, with three new features.
-*** Added interactive keyword editor with completion
-- See [[#setting_keywords][Setting the Properties]] for how to do that
+- Added interactive keyword editor with completion
+ - See [[#setting_keywords][Setting the Properties]] for how to do that
-*** New uses of schedule! and deadline!
-- New "float" form that mimics diary-float
-- New "landing" addition to "+1d" and friends to force planning changes to
land on a certain day or type of day (weekend/weekday)
-- See [[#planning][Scheduled/Deadline]] for details
+- New uses of schedule! and deadline!
+ - New "float" form that mimics diary-float
+ - New "landing" addition to "+1d" and friends to force planning changes to
land on a certain day or type of day (weekend/weekday)
+ - See [[#planning][Scheduled/Deadline]] for details
-*** New "relatives" finder
-- Renamed from chain-find with tons of new keywords
-- Modified all other relative finders (previous-sibling, first-child, etc.) to
use the same keywords
-- See [[#relatives][relatives]] for details
+- New "relatives" finder
+ - Renamed from chain-find with tons of new keywords
+ - Modified all other relative finders (previous-sibling, first-child, etc.)
to use the same keywords
+ - See [[#relatives][relatives]] for details
-*** New finders
-- [[#previous-sibling-wrap][previous-sibling-wrap]]
-- [[#rest-of-siblings-wrap][rest-of-siblings-wrap]]
+- New finders
+ - [[#previous-sibling-wrap][previous-sibling-wrap]]
+ - [[#rest-of-siblings-wrap][rest-of-siblings-wrap]]
diff --git a/packages/org-edna/test.mk b/packages/org-edna/test.mk
new file mode 100644
index 0000000..87fe6ad
--- /dev/null
+++ b/packages/org-edna/test.mk
@@ -0,0 +1,28 @@
+# Copyright (C) 2017-2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# EDE only allows arbitrary code from an external makefile, so this is how
we've
+# got to do testing.
+
+test:
+ $(EMACS) \
+ $(EMACSFLAGS) \
+ $(addprefix -L ,$(LOADPATH)) \
+ -L "." \
+ -l "ert" \
+ -l "org-edna-tests.el" \
+ -f ert-run-tests-batch-and-exit
+
+include Makefile
- [elpa] master 01069d1 02/13: Fixed failing effort test, (continued)
- [elpa] master 01069d1 02/13: Fixed failing effort test, Ian Dunn, 2018/02/04
- [elpa] master c7fc9a4 01/13: Updated copyright, Ian Dunn, 2018/02/04
- [elpa] master 13c02a6 06/13: Added dictionary printing, Ian Dunn, 2018/02/04
- [elpa] master a9d3d12 07/13: Added support for choosing which side of thing-at-point to consider for exclusion, Ian Dunn, 2018/02/04
- [elpa] master 56eeaff 04/13: Fixed up Changelog in documentation, Ian Dunn, 2018/02/04
- [elpa] master b73fff8 09/13: Added paced-repopulate-current-dictionary-async, Ian Dunn, 2018/02/04
- [elpa] master 1171a76 08/13: Added support for excluding words past a certain character limit, Ian Dunn, 2018/02/04
- [elpa] master bc5d7cd 10/13: Silenced byte-compiler, Ian Dunn, 2018/02/04
- [elpa] master d57675f 03/13: Added new forms for set-property! and fixed up build system, Ian Dunn, 2018/02/04
- [elpa] master 35acd8c 05/13: Cleaned up Changelog some more, Ian Dunn, 2018/02/04
- [elpa] master a9eb761 13/13: Merge commit '35acd8c2f9710e54ec3f433ae4af40cfff635295',
Ian Dunn <=
- [elpa] master 463d752 11/13: Cleaned up code and added documentation of new features, Ian Dunn, 2018/02/04
- [elpa] master f4d03a3 12/13: Merge commit '463d752d4703af93ea86df8f07b244e8fc851617', Ian Dunn, 2018/02/04