[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-edna dc320fe 17/72: Use existing org-xor instead of n
From: |
Ian Dunn |
Subject: |
[elpa] scratch/org-edna dc320fe 17/72: Use existing org-xor instead of new function |
Date: |
Sun, 21 May 2017 21:11:21 -0400 (EDT) |
branch: scratch/org-edna
commit dc320fe84fb6c0a100bf9c3d760214e355dd35dd
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
Use existing org-xor instead of new function
* org-edna.el (org-edna--xor): Removed.
(org-edna-condition/todo-state):
(org-edna-condition/headings):
(org-edna-condition/variable-set):
(org-edna-condition/has-property): Use org-xor
---
org-edna.el | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/org-edna.el b/org-edna.el
index e75127e..a605179 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -393,10 +393,6 @@ IDS are all UUIDs as understood by `org-id-find'."
;; This means that we want to take the exclusive-or of condition and neg.
-(defsubst org-edna--xor (lhs rhs)
- (or (and lhs (not rhs))
- (and (not lhs) rhs)))
-
(defun org-edna-condition/done (neg)
(when-let ((condition
(if neg
@@ -406,23 +402,23 @@ IDS are all UUIDs as understood by `org-id-find'."
(defun org-edna-condition/todo-state (neg state)
(let ((condition (string-equal (org-entry-get nil "TODO") state)))
- (when (org-edna--xor condition neg)
+ (when (org-xor condition neg)
(org-get-heading))))
;; Block if there are headings
(defun org-edna-condition/headings (neg)
(let ((condition (not (seq-empty-p (org-map-entries (lambda nil t))))))
- (when (org-edna--xor condition neg)
+ (when (org-xor condition neg)
(buffer-name))))
(defun org-edna-condition/variable-set (neg var val)
(let ((condition (string-equal (symbol-value (intern var)) (read val))))
- (when (org-edna--xor condition neg)
+ (when (org-xor condition neg)
(format "%s %s= %s" var (or neg "=") val))))
(defun org-edna-condition/has-property (neg prop val)
(let ((condition (string-equal (org-entry-get nil prop) val)))
- (when (org-edna--xor condition neg)
+ (when (org-xor condition neg)
(org-get-heading))))
- [elpa] scratch/org-edna 0273bf1 02/72: Make all finders return lists of markers, (continued)
- [elpa] scratch/org-edna 0273bf1 02/72: Make all finders return lists of markers, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 03a6a95 03/72: Added Makefile., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 5e69f84 04/72: Added .bzrignore., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6ec67b8 10/72: Improved org-bat-parse-form to handle new argument types, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 8b58c07 14/72: Clarified use of case-fold-search in `org-bat--handle-planning', Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 00ef89a 11/72: Added tests for org-bat-parse-form, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 8aeb66c 08/72: Added more custom IDs to documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 89baba4 13/72: Added chain action, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna e2db4dc 19/72: Remove duplicate targets, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 68b01b8 16/72: Fixed bug in Makefile, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna dc320fe 17/72: Use existing org-xor instead of new function,
Ian Dunn <=
- [elpa] scratch/org-edna 0977b83 20/72: Don't assume arguments will be symbols or strings, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 8a8cfd6 12/72: Cleaned up condition handling, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna b40f7f0 05/72: Added initial documentation, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 4a54e3b 09/72: Fixed headings condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna dcbb344 18/72: Fixed up indenting, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna ef34291 26/72: Fixed chain-find, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6cd8a40 28/72: Added test for parsing multiple forms, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 3e1ed0c 29/72: Added re-search condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna c49aeba 36/72: Fixed consideration handling, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 1dfc66f 01/72: Initial Commit., Ian Dunn, 2017/05/21