[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-edna 65d3049 37/72: Fix considerations
From: |
Ian Dunn |
Subject: |
[elpa] scratch/org-edna 65d3049 37/72: Fix considerations |
Date: |
Sun, 21 May 2017 21:11:24 -0400 (EDT) |
branch: scratch/org-edna
commit 65d30497356c80b37f218f30fb9f3ad9f400e6bb
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
Fix considerations
* org-edna.el (org-edna-handle-consideration): Use floats when computing
percentage of fulfilled blocks.
---
org-edna.el | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/org-edna.el b/org-edna.el
index 440c4d9..bb6e548 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -543,16 +543,14 @@ IDS are all UUIDs as understood by `org-id-find'."
first-block)
((pred integerp)
;; A fixed number of them must be fulfilled, so check how many aren't.
- (let* ((unfulfilled (seq-count #'identity blocks))
- (fulfilled (- total-blocks unfulfilled)))
+ (let* ((fulfilled (seq-count #'not blocks)))
(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)
+ (let* ((fulfilled (seq-count #'not blocks)))
+ (if (>= (/ (float fulfilled) (float total-blocks)) consideration)
nil
first-block))))))
- [elpa] scratch/org-edna d248565 21/72: Fix uses of substring, (continued)
- [elpa] scratch/org-edna d248565 21/72: Fix uses of substring, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 7978874 24/72: Added tests for ids and match finders, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6448307 30/72: Added test for empty argument list, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 9e4d833 32/72: Fixed error in re-search, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d022d2f 40/72: Added copyright and licensing information to all files, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 991782f 31/72: Added documentation for each condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d527569 48/72: Handle all errors in Edna forms, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna f27a89f 45/72: Use example instead of src to make HTML export prettier, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna cc3cd47 22/72: Added configuration option to use inheritance, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 3cc0913 34/72: Added some more test headings, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 65d3049 37/72: Fix considerations,
Ian Dunn <=
- [elpa] scratch/org-edna 1b492e1 42/72: Fixed copyright notices, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 5a9a42a 43/72: Added copyright date to source files, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 1f76403 15/72: Renamed to Org-Edna., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna e03fa9c 60/72: Fixed up chain test, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna ad7bdc9 62/72: Fixed actions and documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 96ca42c 65/72: Compile targets before running tests, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 24b323d 52/72: Finished rough draft of documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 7517c15 63/72: Use org source blocks instead of example blocks in documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna ce425a3 71/72: Fixed up documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna c62886d 55/72: Updated to new syntax, Ian Dunn, 2017/05/21