[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 8e20fb9 098/135: Fixed failing effort test

From: Ian Dunn
Subject: [elpa] master 8e20fb9 098/135: Fixed failing effort test
Date: Mon, 17 Feb 2020 10:53:00 -0500 (EST)

branch: master
commit 8e20fb9287124fc9cdea6cb6caaace39c75b6d1e
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Fixed failing effort test
    * org-edna.el (org-edna-set-effort): New defun for compatibility
      (org-edna-action/set-effort!): Use it.
 org-edna.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/org-edna.el b/org-edna.el
index 9e19f40..9925af3 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -1607,6 +1607,13 @@ Form 4: Set the target's priority to the character P."
                     (string-to-char priority-action)
+(defun org-edna-set-effort (increment value)
+  "Compatibility function for `org-set-effort'."
+  ;; The signature of `org-set-effort' changed in 9.1.6
+  (if (version< org-version "9.1.6")
+      (org-set-effort value increment)
+    (org-set-effort increment value)))
 (defun org-edna-action/set-effort! (_last-entry value)
   "Action to set the effort of a target heading.
@@ -1619,8 +1626,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 value nil)
+    (org-edna-set-effort nil value)))
 (defun org-edna-action/archive! (_last-entry)
   "Action to archive a target heading.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]