emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] scratch/org-edna c49aeba 36/72: Fixed consideration handling


From: Ian Dunn
Subject: [elpa] scratch/org-edna c49aeba 36/72: Fixed consideration handling
Date: Sun, 21 May 2017 21:11:24 -0400 (EDT)

branch: scratch/org-edna
commit c49aebafe9c1f329610e26e08f8c5c0fe3c6d0e2
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Fixed consideration handling
    
    * org-edna.el (org-edna-handle-consideration): Use >= instead of > when
      comparing fulfilled to consideration.
---
 org-edna.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-edna.el b/org-edna.el
index 50cfe54..440c4d9 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -526,9 +526,9 @@ IDS are all UUIDs as understood by `org-id-find'."
 
 (defun org-edna-transform-consideration (consideration)
   (pcase consideration
-    ;; Leave symbols alone
+    ;; Change all into a symbol
     ('"all" (intern consideration))
-    ;; Change strings into numbers
+    ;; Change other strings into numbers
     ((pred stringp)
      (string-to-number consideration))
     (_
@@ -545,14 +545,14 @@ IDS are all UUIDs as understood by `org-id-find'."
        ;; A fixed number of them must be fulfilled, so check how many aren't.
        (let* ((unfulfilled (seq-count #'identity blocks))
               (fulfilled   (- total-blocks unfulfilled)))
-         (if (> fulfilled consideration)
+         (if (>= fulfilled consideration)
              nil
            first-block)))
       ((pred floatp)
        ;; A certain percentage of them must be fulfilled
        (let* ((unfulfilled (seq-count #'identity blocks))
               (fulfilled   (- total-blocks unfulfilled)))
-         (if (> (/ fulfilled total-blocks) consideration)
+         (if (>= (/ fulfilled total-blocks) consideration)
              nil
            first-block))))))
 



reply via email to

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